Handle vectors that don't fit in an integer.
[official-gcc.git] / gcc / ChangeLog
blob7b46b67122776672a0766f91afaeffd35739c372
1 2018-11-15  Andrew Stubbs  <ams@codesourcery.com>
2             Kwok Cheung Yeung  <kcy@codesourcery.com>
4         * tree-vect-stmts.c (vectorizable_store): Don't ICE when
5         int_mode_for_size fails.
6         (vectorizable_load): Likewise.
8 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
10         * doc/ux.texi (Group logically-related diagnostics): Move
11         discussion of auto_diagnostic_group into this new subsection.
12         Give an example of where this grouping is used.
14 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
16         PR other/19165
17         * Makefile.in (OBJS): Move json.o to...
18         (OBJS-libcommon): ...here and add diagnostic-format-json.o.
19         * common.opt (fdiagnostics-format=): New option.
20         (diagnostics_output_format): New enum.
21         * diagnostic-format-json.cc: New file.
22         * diagnostic.c (default_diagnostic_final_cb): New function, taken
23         from start of diagnostic_finish.
24         (diagnostic_initialize): Initialize final_cb to
25         default_diagnostic_final_cb.
26         (diagnostic_finish): Move "being treated as errors" messages to
27         default_diagnostic_final_cb.  Call any final_cb.
28         (default_diagnostic_finalizer): Add diagnostic_t param.
29         (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
30         diagnostic_finalizer callback.
31         * diagnostic.h (enum diagnostics_output_format): New enum.
32         (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
33         (struct diagnostic_context): Add "final_cb".
34         (default_diagnostic_finalizer): Add diagnostic_t param.
35         (diagnostic_output_format_init): New decl.
36         * doc/invoke.texi (-fdiagnostics-format): New option.
37         * dwarf2out.c (gen_producer_string): Ignore
38         OPT_fdiagnostics_format_.
39         * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
40         * lto-wrapper.c (append_diag_options): Ignore it.
41         * opts.c (common_handle_option): Handle it.
43 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
45         PR tree-optimization/88015
46         * graphite-isl-ast-to-gimple.c
47         (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
48         for dump_enabled_p.
49         * graphite-sese-to-poly.c (build_poly_scop): Likewise.
51 2018-11-15  Richard Biener  <rguenther@suse.de>
53         PR middle-end/88029
54         * gimple.c (gimple_call_flags): Union flags from decl, type
55         and call fntype.
56         * trans-mem.c (is_tm_pure_call): Simplify.
58 2018-11-15  Richard Biener  <rguenther@suse.de>
60         PR tree-optimization/88031
61         * tree-vect-loop.c (vectorizable_reduction): Move check
62         for multiple types earlier so we get the expected dump.
63         Simplify calls to vectorizable_condition.
64         * tree-vect-stmts.h (vectorizable_condition): Update prototype.
65         * tree-vect-stmts.c (vectorizable_condition): Instead of
66         reduc_def and reduc_index take just a flag.  Simplify
67         code-generation now that we can rely on the defs being set up.
68         (vectorizable_comparison): Remove unused argument.
70 2018-11-15  Richard Biener  <rguenther@suse.de>
72         PR tree-optimization/88030
73         * tree-complex.c (need_eh_cleanup): New global.
74         (update_complex_assignment): Mark blocks that need EH update.
75         (expand_complex_comparison): Likewise.
76         (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
77         perform EH cleanup and schedule CFG cleanup if that did anything.
79 2018-11-15  Jakub Jelinek  <jakub@redhat.com>
81         PR rtl-optimization/88018
82         * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
83         on the presence of fallthru edge, rather than if it is a USE or not.
85 2018-11-15  Richard Biener  <rguenther@suse.de>
87         PR middle-end/87917
88         * tree-data-ref.c (analyze_miv_subscript): Guard calls to
89         analyze_subscript_affine_affine properly.
91 2018-11-15  Xianmiao Qu  <xianmiao_qu@c-sky.com>
93         * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
94         (GLIBC_DYNAMIC_LINKER): Define.
95         (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
97 2018-11-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
99         PR tree-optimization/84648
100         * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
101         (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
102         by calling adjust_cond_for_loop_until_wrap.
104 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
106         PR other/56334
107         * doc/extend.texi (Common Function Attributes): Clarify linker
108         restrictions on "aligned" attribute.
109         (Common Variable Attributes): Likewise.  Mention that linker
110         restrictions don't apply to stack-allocated variables.
112 2018-11-15  Joern Rennecke  <joern.rennecke@riscy-ip.com>
114         * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
115         as an lvalue.
117 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
119         PR lto/55102
120         PR lto/56700
121         * doc/invoke.texi (Optimize Options): Remove bad example about
122         interaction between -flto and -O.  Replace it with a note that
123         you need to compile with -O and not just link.  Copy-edit -flto
124         discussion to reduce verbiage and improve flow.
126 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
128         PR middle-end/59658
129         * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
130         also suppress many optimizations.  Alphabetize option lists for
131         -O1, -O2, and -Os.  Add list of options disabled with -Og, and
132         correct documentation for those options to say that.
133         * opts.c (default_options_table): Sort table by level and option
134         name, to make it easier to correlate to the manual.
136 2018-11-14  Uros Bizjak  <ubizjak@gmail.com>
138         * config/i386/i386.c (ix86_print_operand_address_as): Simplify
139         printing of the names of segment registers.
141 2018-11-14  Nathan Sidwell  <nathan@acm.org>
143         PR debug/88006
144         PR debug/87462
145         * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
146         type list.
148 2018-11-14  David Malcolm  <dmalcolm@redhat.com>
150         * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
152 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
154         P1236R1 - Signed integers are two's complement
155         * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
157         PR bootstrap/86739
158         * hash-map.h (hash_map::iterator::reference_pair): New class.
159         (hash_map::iterator::operator*): Return it rather than std::pair.
161 2018-11-14  Jeff Law  <law@redhat.com>
163         * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
164         iff the operand is a constant.
166 2018-11-14  Aldy Hernandez  <aldyh@redhat.com>
168         * gimple-ssa-evrp-analyze.c
169         (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
170         ignore_equivs_equal_p to equal_p.
171         * ipa-cp.c (meet_with_1): Use equal_p instead of
172         ignore_equivs_equal_p.
173         * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
174         * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
175         (value_range::operator==): Remove.
176         (value_range::operator!=): Remove.
177         (vrp_prop::visit_stmt): Use equal_p.
178         * tree-vrp.h (value_range): Remove operator==, operator!=,
179         ignore_equivs_equal_p.
180         * vr-values.c (update_value_range): Use equal_p.
182 2018-11-14  Michael Matz  <matz@suse.de>
184         PR middle-end/86575
185         * gimplify.c (collect_fallthrough_labels): Add new argument,
186         return location via that, don't modify statements.
187         (warn_implicit_fallthrough_r): Adjust call, don't use
188         statement location directly.
190 2018-11-14  Richard Biener  <rguenther@suse.de>
192         PR middle-end/87985
193         * tree-data-ref.c (split_constant_offset): Add wrapper
194         allocating a cache hash-map.
195         (split_constant_offset_1): Cache results of expanding
196         expressions from SSA def stmts.
198 2018-11-14  Richard Biener  <rguenther@suse.de>
200         PR middle-end/88021
201         * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
202         to lambda_int.
203         (lambda_vector_mult_const): Likewise.
204         (lambda_matrix_right_hermite): Use lambda_int temporaries.
206 2018-11-14  Wilco Dijkstra  <wdijkstr@arm.com>
207             Jackson Woodruff  <jackson.woodruff@arm.com>
209         PR 71026/tree-optimization
210         * match.pd: Simplify floating point comparisons.
212 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
214         PR rtl-optimization/87817
215         * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
216         last argument has low 8 bits clear, fold to 0.
218 2018-11-14  Iain Sandoe  <iain@sandoe.co.uk>
220         * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
221         MAX_OFILE_ALIGNMENT as needed.
223 2018-11-14  Richard Biener  <rguenther@suse.de>
225         PR tree-optimization/88019
226         * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
227         COND_EXPR arguments to non-trapping overflow.
229 2018-11-14  Claudiu Zissulescu  <claziss@synopsys.com>
231         * config/arc/arc.h (reg_class): Reorder registers classes, remove
232         unused register classes.
233         (REG_CLASS_NAMES): Likewise.
234         (REG_CLASS_CONTENTS): Likewise.
235         (FIXED_REGISTERS): Make lp_count fixed.
236         (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
237         (PROGRAM_COUNTER_REGNO): Remove.
238         * config/arc/arc.c (arc_conditional_register_usage): Remove unused
239         register classes, use constants for register numbers, remove
240         reg_class_contents references.
241         (arc_process_double_reg_moves): Add asserts.
242         (arc_secondary_reload): Remove LPCOUNT_REG reference, use
243         lra_in_progress predicate.
244         (arc_init_reg_tables): Remove unused register classes.
245         (arc_register_move_cost): Likewise.
246         (arc_preferred_reload_class): Likewise.
247         (hwloop_optimize): Update rtx patterns involving lp_count register.
248         (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
249         * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
250         CHEAP_CORE_REGS.  Former one will be used for LRA.
251         ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS.  Former
252         one will be used for LRA.
253         ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS.  Former
254         one will be used for LRA.
255         ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
256         Former one will be used for LRA.
257         ("f"): Delete constraint.
258         ("k"): Likewise.
259         ("e"): Likewise.
260         ("l"): Change it from register constraint to constraint.
261         * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
262         (movhi_insn): Likewise.
263         (movsi_insn): Update pattern.
264         (arc_lp): Likewise.
265         (dbnz): Likewise.
266         (stack_tie): Remove 'b' constraint letter.
267         (R4_REG): Define.
268         (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
269         (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
270         (R57_REG, R59_REG, PCL_REG): Likewise.
271         (ILINK1_REGNUM): Renamed to ILINK1_REG.
272         (ILINK2_REGNUM): Renamed to ILINK2_REG.
273         (Rgp): Remove.
274         (SP_REGS): Likewise.
275         (Rcw): Remove unused reg classes.
276         * config/arc/predicates.md (dest_reg_operand): Just default on
277         register_operand predicate.
278         (mpy_dest_reg_operand): Likewise.
279         (move_dest_operand): Use macros instead of constants.
280         * config/arc/arc.opt (mlra): Switch to lra as default.
282 2018-11-14  Richard Biener  <rguenther@suse.de>
284         PR tree-optimization/87974
285         * tree-vect-loop.c (vectorizable_reduction): When computing
286         the vectorized reduction PHI vector type ignore constant
287         and external defs.
289 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
291         PR tree-optimization/87977
292         * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
293         stmt, build a new one and replace the old one with it.  Formatting fix.
294         Call release_ssa_name (x) if !has_other_use and !delete_div.
295         (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
296         verify lhs of stmt is still def.
298 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
300         PR rtl-optimization/87507
301         * lower-subreg.c (operand_for_swap_move_operator): New function.
302         (simple_move): Strip simple operators.
303         (find_pseudo_copy): Likewise.
304         (resolve_operand_for_swap_move_operator): New function.
305         (resolve_simple_move): Strip simple operators and swap operands.
307 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
309         PR tree-optimization/87898
310         * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
311         (ipa_simd_modify_function_body): Remove debug stmts where the first
312         argument was changed into a non-decl.
314 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
316         PR rtl-optimization/87899
317         * lra-lives.c (start_living): Update white space in comment.
318         (enum point_type): New.
319         (sparseset_contains_pseudos_p): New function.
320         (update_pseudo_point): Likewise.
321         (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
322         (make_hard_regno_dead): Likewise.  Remove ignore_reg_for_conflicts
323         handling.  Move early exit after adding conflicts.
324         (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro.  Add early exit
325         if regno is already live.  Remove all handling of program points.
326         (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro.  Add early exit
327         after adding conflicts.  Remove all handling of program points and
328         ignore_reg_for_conflicts.
329         (mark_regno_live): Use HARD_REGISTER_NUM_P macro.  Remove return value
330         and do not guard call to mark_pseudo_live.
331         (mark_regno_dead): Use HARD_REGISTER_NUM_P macro.  Remove return value
332         and do not guard call to mark_pseudo_dead.
333         (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
334         (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
335         Use new function update_pseudo_point.  Handle register copies by
336         removing the source register from the live set.  Handle INOUT operands.
337         Update to the next program point using the unused_set, dead_set and
338         start_dying sets.
339         (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
341 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
343         * builtins.c: Replace "source_location" with "location_t".
344         * diagnostic-show-locus.c: Likewise.
345         * diagnostic.c: Likewise.
346         * dumpfile.c: Likewise.
347         * gcc-rich-location.h: Likewise.
348         * genmatch.c: Likewise.
349         * gimple.h: Likewise.
350         * gimplify.c: Likewise.
351         * input.c: Likewise.
352         * input.h: Likewise.  Eliminate the typedef.
353         * omp-expand.c: Likewise.
354         * selftest.h: Likewise.
355         * substring-locations.h (get_source_location_for_substring):
356         Rename to...
357         (get_location_within_string): ...this.
358         * tree-cfg.c: Replace "source_location" with "location_t".
359         * tree-cfgcleanup.c: Likewise.
360         * tree-diagnostic.c: Likewise.
361         * tree-into-ssa.c: Likewise.
362         * tree-outof-ssa.c: Likewise.
363         * tree-parloops.c: Likewise.
364         * tree-phinodes.c: Likewise.
365         * tree-phinodes.h: Likewise.
366         * tree-ssa-loop-ivopts.c: Likewise.
367         * tree-ssa-loop-manip.c: Likewise.
368         * tree-ssa-phiopt.c: Likewise.
369         * tree-ssa-phiprop.c: Likewise.
370         * tree-ssa-threadupdate.c: Likewise.
371         * tree-ssa.c: Likewise.
372         * tree-ssa.h: Likewise.
373         * tree-vect-loop-manip.c: Likewise.
375 2018-11-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
377         * doc/extend.texi: Fix typo in the weakref description.
379 2018-11-13  Richard Biener  <rguenther@suse.de>
381         PR tree-optimization/86991
382         * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
383         group building until we have successfully detected the SLP
384         reduction.
385         (vect_is_simple_reduction): Remove fixup code here.
387 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
389         * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
390         (dump_gimple_stmt): Use it.
391         (dump_gimple_stmt_loc): Likewise.
392         (dump_gimple_expr): Likewise.
393         (dump_gimple_expr_loc): Likewise.
394         (dump_generic_expr): Likewise.
395         (dump_generic_expr_loc): Likewise.
396         (dump_printf): Likewise.
397         (dump_printf_loc): Likewise.
398         (dump_dec): Likewise.
399         (dump_dec): Likewise.
400         (dump_hex): Likewise.
401         (dump_symtab_node): Likewise.
402         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
403         Guard dump call with dump_enabled_p.
404         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
405         * graphite-optimize-isl.c (optimize_isl): Likewise.
406         * graphite.c (graphite_transform_loops): Likewise.
407         * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
408         * tree-parloops.c (parallelize_loops): Likewise.
409         * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
410         * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
411         (vect_prune_runtime_alias_test_list): Likewise.
412         * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
413         (vect_estimate_min_profitable_iters): Likewise.
414         * tree-vect-slp.c (vect_record_max_nunits): Likewise.
415         (vect_build_slp_tree_2): Likewise.
416         (vect_supported_load_permutation_p): Likewise.
417         (vect_slp_analyze_operations): Likewise.
418         (vect_slp_analyze_bb_1): Likewise.
419         (vect_slp_bb): Likewise.
420         * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
421         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
422         (pass_slp_vectorize::execute): Likewise.
423         (increase_alignment): Likewise.
425 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
427         PR ipa/87955
428         * ipa-inline.c (report_inline_failed_reason): Guard calls to
429         cl_target_option_print_diff and cl_optimization_print_diff with
430         if (dump_file).
432 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
434         * doc/invoke.texi (-fsave-optimization-record): Note that the
435         output is compressed.
436         * optinfo-emit-json.cc: Include <zlib.h>.
437         (optrecord_json_writer::write): Compress the output.
439 2018-11-13  Aldy Hernandez  <aldyh@redhat.com>
441         * tree-vrp.c (value_range_base::dump): Dump type.
442         Do not use INF nomenclature for 1-bit types.
443         (dump_value_range): Group all variants to common dumping code.
444         (debug): New overloaded functions for value_ranges.
445         (value_range_base::dump): Remove no argument version.
446         (value_range::dump): Same.
448 2018-11-13  Richard Biener  <rguenther@suse.de>
450         PR tree-optimization/87931
451         * tree-vect-loop.c (vect_is_simple_reduction): Restrict
452         nested cycles we support to latch computations vectorizable_reduction
453         handles.
455 2018-11-13  Martin Liska  <mliska@suse.cz>
457         PR tree-optimization/87885
458         * cfghooks.c (account_profile_record): Rename
459         to ...
460         (profile_record_check_consistency): ... this.
461         Calculate missing num_mismatched_freq_in.
462         (profile_record_account_profile): New function
463         that calculates time and size of a function.
464         * cfghooks.h (struct profile_record): Remove
465         all tuples.
466         (struct cfg_hooks): Remove after_pass flag.
467         (account_profile_record): Rename to ...
468         (profile_record_check_consistency): ... this.
469         (profile_record_account_profile): New.
470         * cfgrtl.c (rtl_account_profile_record): Remove
471         after_pass flag.
472         * passes.c (check_profile_consistency): Do only
473         checking.
474         (account_profile): Calculate size and time of
475         function only.
476         (pass_manager::dump_profile_report): Reformat
477         output.
478         (execute_one_ipa_transform_pass): Call
479         consistency check before clean upand call account_profile
480         after a clean up is done.
481         (execute_one_pass): Call check_profile_consistency and
482         account_profile instead of using after_pass flag..
483         * tree-cfg.c (gimple_account_profile_record): Likewise.
485 2018-11-13  Martin Liska  <mliska@suse.cz>
487         PR sanitizer/87930
488         * config/i386/i386.c (ix86_option_override_internal): Error
489         about usage -mabi=ms and -fsanitize={,kernel-}address.
491 2018-11-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
493         * config/aarch64/aarch64.c
494         (aarch64_vectorize_preferred_vector_alignment): Change return type to
495         poly_uint64.
496         (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
497         alignment being a poly int.
498         * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
499         return type to poly_uint64.
500         * target.def (default_preferred_vector_alignment): Likewise.
501         * targhooks.c (default_preferred_vector_alignment): Likewise.
502         * targhooks.h (default_preferred_vector_alignment): Likewise.
503         * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
504         (vect_compute_data_ref_alignment): Adapt to vector alignment being a
505         poly int.
506         (vect_update_misalignment_for_peel): Likewise.
507         (vect_enhance_data_refs_alignment): Likewise.
508         (vect_find_same_alignment_drs): Likewise.
509         (vect_duplicate_ssa_name_ptr_info): Likewise.
510         (vect_setup_realignment): Likewise.
511         (vect_can_force_dr_alignment_p): Change alignment parameter type to
512         poly_uint64.
513         * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
514         mask with a compile time variable vector alignment.
515         (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
516         int.
517         (vect_do_peeling): Exit early if vector alignment is not constant.
518         * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
519         a poly int.
520         (vectorizable_store): Likewise.
521         (vectorizable_load): Likweise.
522         * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
523         poly_uint64.
524         (vect_known_alignment_in_bytes): Adapt to vector alignment being a
525         poly int.
526         (vect_can_force_dr_alignment_p): Change alignment parameter type to
527         poly_uint64.
529 2018-11-13  Richard Biener  <rguenther@suse.de>
531         PR tree-optimization/87962
532         * tree-vect-loop.c (vect_is_simple_reduction): More reliably
533         detect outer reduction for disqualifying in-loop uses.
535 2018-11-13  Richard Biener  <rguenther@suse.de>
537         PR tree-optimization/87967
538         * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
539         for constants for the scalar loop.
541 2018-11-13  Alan Modra  <amodra@gmail.com>
543         * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
544         integer constants when -mcmodel=medium.
546 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
548         * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
549         * config/arc/elf.h (PROFILE_HOOK): Define.
550         * config/arc/linux.h (PROFILE_HOOK): Likewise.
552 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
554         * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
555         jump table data in the text section.
557 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
559         * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
560         to fit the eh_return pattern.
561         * config/arc/arc.md (eh_return): Define.
562         (VUNSPEC_ARC_EH_RETURN): Likewise.
563         * config/arc/arc-protos.h (arc_eh_return_address_location): Match
564         new implementation.
565         * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
568 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
570         * common/config/arc/arc-common.c (arc_option_optimization_table):
571         Millicode optimization is default on for size optimizations.
572         * config/arc/arc-protos.h (arc_check_multi): New function.
573         * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
574         (ENTER_LEAVE_START_REG): Define.
575         (ENTER_LEAVE_END_REG): Likewise.
576         (arc_override_options): Disable millicode when long calls option
577         is on.
578         (arc_frame_info): Change it from int to bool.
579         (arc_compute_frame_size): Clean up.
580         (arc_save_restore): Remove.
581         (frame_save_reg): New function.
582         (frame_restore_reg): Likewise.
583         (arc_enter_leave_p): Likewise.
584         (arc_save_callee_saves): Likewise.
585         (arc_restore_callee_saves): Likewise.
586         (arc_save_callee_enter): Likewise.
587         (arc_restore_callee_leave): Likewise.
588         (arc_save_callee_milli): Likewise.
589         (arc_restore_callee_milli): Likewise.
590         (arc_expand_prologue): Reimplement to emit enter/leave
591         instructions.
592         (arc_expand_epilogue): Likewise.
593         (arc_check_multi): New function.
594         * config/arc/arc.md (push_multi_fp): New pattern.
595         (push_multi_fp_blink): Likewise.
596         (pop_multi_fp): Likewise.
597         (pop_multi_fp_blink): Likewise.
598         (pop_multi_fp_ret): Likewise.
599         (pop_multi_fp_blink_ret): Likewise.
600         * config/arc/arc.opt (mmillicode): Update option.
601         (mcode-density-frame): New option.
602         * config/arc/predicates.md (push_multi_operand): New predicate.
603         (pop_multi_operand): Likewise.
604         * doc/invoke.texi (ARC): Update ARC options information.
607 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
609         * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
610         * config/arc/arc.c (operands_ok_ldd_std): New function.
611         (mem_ok_for_ldd_std): Likewise.
612         (gen_operands_ldd_std): Likewise.
613         * config/arc/arc.md: Add peephole2 rules for std/ldd.
615 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
617         * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
618         test on stack_usage_file.
619         (lang_dependent_init): Do not open the .su file if generating LTO.
621 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
623         PR rtl-optimization/87918
624         * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
625         simplify_gen_relational rather than simplify_gen_binary.
627 2018-11-13  Richard Biener  <rguenther@suse.de>
629         * tree-ssanames.h (set_range_info): Use value_range_base.
630         (get_range_info): Likewise.
631         * tree-ssanames.c (set_range_info): Likewise.
632         (get_range_info): Likewise.
633         * tree-vrp.c (value_range_base::union_helper): Split
634         out common parts of value_range[_base]::union_.
635         (value_range_base::union_): Update.
636         (value_range::union_): Likewise.
637         (determine_value_range_1): Use value_range_base.
638         (determine_value_range): Likewise.
639         * tree-vrp.h (value_range_base::union_helper): Move ...
640         (value_range::union_helper): ... from here.
642 2018-11-13  Alan Modra  <amodra@gmail.com>
644         * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
645         offset for PRE_DEC.
646         (rs6000_secondary_reload_gpr): Don't call find_replacement.
648 2018-11-13  Sandra Loosemore  <sandra@codesourcery.com>
650         PR middle-end/59634
651         * doc/invoke.texi (Optimize Options): Clarify that the
652         l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
653         apply to data cache size.
655 2018-11-13  Alan Modra  <amodra@gmail.com>
657         * config/rs6000/predicates.md (logical_const_operand),
658         (logical_operand): Correct comment.
659         * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
661 2018-11-13  Alan Modra  <amodra@gmail.com>
663         * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
665 2018-11-13  Alan Modra  <amodra@gmail.com>
667         * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
668         description.
669         * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
670         covered by alternative.
671         (movcc_internal1): Ignore h for register preference.
672         (mov<mode>_hardfloat64): Likewise.
673         (mov<mode>_softfloat): Ignore c, l, h for register preference.
675 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
677         PR preprocessor/47823
678         * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
679         documentation to...
680         (Pragmas): ...here.
681         * doc/extend.texi (Pragmas): Note additional pragmas documented
682         in the CPP manual.
684 2018-11-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
686         PR middle-end/86677
687         PR middle-end/87528
688         * tree-scalar-evolution.c (expression_expensive_p): Make
689         BUILTIN POPCOUNT as expensive when backend does not define it.
691 2018-11-12  Fredrik Noring  <noring@nocrew.org>
693         * config.gcc: Update with-llsc defaults for MIPS r5900.
695 2018-11-12  Martin Liska  <mliska@suse.cz>
697         PR gcov-profile/87442
698         * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
699         options.
700         * doc/invoke.texi: Document them.
701         * tree-profile.c (parse_profile_filter): New.
702         (parse_profile_file_filtering): Likewise.
703         (release_profile_file_filtering): Likewise.
704         (include_source_file_for_profile): Likewise.
705         (tree_profiling): Filter source files based on the
706         newly added options.
708 2018-11-12  Martin Liska  <mliska@suse.cz>
710         PR target/87903
711         * doc/extend.texi: Add missing values for __builtin_cpu_is and
712         __builtin_cpu_supports for x86 target.
714 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
716         PR middle-end/21110
717         * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
718         have to be Pmode.
719         (Arithmetic): Likewise for "lo_sum".
721 2018-11-12  Renlin Li  <renlin.li@arm.com>
723         PR target/87815
724         * dse.c (get_stored_val): Add check for compile-time constantness
725         of gap.
727 2018-11-12  Sudakshina Das  <sudi.das@arm.com>
729         * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
730         (ARMv8_5a): New fgroup.
731         (armv8.5-a): New arch.
732         (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
733         sb and predres.
734         * config/arm/arm-tables.opt: Regenerate.
735         * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
736         * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
737         * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
738         Add matching rules for -march=armv8.5-a and extensions.
739         * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
740         Add sb and predres to all armv8-a except armv8.5-a.
742 2018-11-12  Richard Biener  <rguenther@suse.de>
744         * tree-vrp.h (value_range[_base]::set): Make public.  Provide
745         overload for single value.
746         (value_range[_base]::set_nonnull): New.
747         (value_range[_base]::set_null): Likewise.
748         (value_range): Document bitmap copying behavior, mark
749         copy constructor and assignment operator deleted.
750         (value_range::move): New.
751         (value_range::set_and_canonicalize): Default bitmap to zero.
752         (set_value_range_to_nonnull): Remove.
753         (set_value_range_to_null): Likewise.
754         (set_value_range): Likewise.
755         (set_value_range_to_value): Likewise.
756         (extract_range_from_unary_expr): Work on value_range_base.
757         (extract_range_from_binary_expr_1): Likewise.  Rename to...
758         (extract_range_from_binary_expr): ... this.
759         * tree-vrp.c (value_range::update): Clear equiv bitmap
760         if required.
761         (value_range::move): New, move equiv bitmap.
762         (value_range_base::set_undefined): Avoid assignment.
763         (value_range::set_undefined): Likewise.
764         (value_range_base::set_varying): Likewise.
765         (value_range::set_varying): Likewise.
766         (set_value_range): Remove.
767         (value_range_base::set): New overload for value.
768         (value_range::set): Likewise.
769         (set_value_range_to_nonnull): Remove.
770         (value_range_base::set_nonnull): New.
771         (value_range::set_nonnull): Likewise.
772         (set_value_range_to_null): Remove.
773         (value_range_base::set_null): New.
774         (value_range::set_null): Likewise.
775         (range_is_null): Work on value_range_base.
776         (range_is_nonnull): Likewise.
777         (ranges_from_anti_range): Likewise.
778         (extract_range_into_wide_ints): Likewise.
779         (extract_range_from_multiplicative_op): Likewise.
780         (extract_range_from_binary_expr): Likewise.  Update for API changes.
781         (extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
782         handling.
783         (value_range::intersect_helper): Avoid copy and assignment.
784         (value_range::union_helper): Likewise.
785         (determine_value_range_1): Adjust.
786         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
787         Avoid assignment by using move.
788         (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
789         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
790         Likewise.
791         * tree-ssanames.c (get_range_info): Likewise.
792         * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
793         * vr-values.c (vr_values::get_value_range): Adjust.
794         (vr_values::update_value_range): Likewise.
795         (symbolic_range_based_on_p): Work on value_range_base.
796         (vr_values::extract_range_from_binary_expr): Use value_range_base.
797         (vr_values::extract_range_from_unary_expr): Likewise.
798         (vr_values::extract_range_from_cond_expr): Avoid assignment.
799         (vr_values::extract_range_from_comparison): Adjust.
800         (vr_values::check_for_binary_op_overflow): Use value_range_base.
801         (vr_values::extract_range_basic): Adjust.
802         (vr_values::adjust_range_with_scev): Likewise.
803         (vr_values::vrp_visit_assignment_or_call): Likewise.
804         (vr_values::get_vr_for_comparison): Change API to avoid
805         assignment and copy construction.
806         (vr_values::compare_name_with_value): Adjust accordingly.
807         (vr_values::compare_names): Likewise.
808         (vr_values::extract_range_from_phi_node): Avoid assignment and
809         bogus in-place modify of equiv bitmap.
810         (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
811         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
812         for extract_range_from_unary_expr API change.
813         * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
815 2018-11-12  Eric Botcazou  <ebotcazou@adacore.com>
817         * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
819 2018-11-12  Richard Biener  <rguenther@suse.de>
821         * tree-vrp.h (value_range_base::symbolic_p,
822         value_range_base::constant_p, value_range_base::zero_p,
823         value_range_base::singleton_p): Move from value_range.
824         (value_range::dump): Add.
825         * gimple-ssa-evrp-analyze.c
826         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
827         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
828         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
829         Use set_varying.
830         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
831         (value_range::constant_p): Likewise.
832         (value_range::singleton_p): Likewise.
833         (value_range_base::dump): Add.
834         (set_value_range_to_undefined): Remove.
835         (set_value_range_to_varying): Likewise.
836         (range_int_cst_p): Take value_range_base argument.
837         (range_int_cst_singleton_p): Likewise.
838         (value_range_constant_singleton): Likewise.
839         (vrp_set_zero_nonzero_bits): Likewise.
840         (extract_range_from_multiplicative_op): Use set_varying.
841         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
842         (extract_range_from_unary_expr): Likewise.
843         (dump_value_range_base): Change to overload of dump_value_range.
844         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
845         (vrp_prop::visit_stmt): Likewise.
846         (value_range::intersect_helper): Likewise.
847         (value_range::union_helper): Likewise.
848         (determine_value_range_1): Likewise.
850 2018-11-12  Richard Biener  <rguenther@suse.de>
852         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
853         (set_value_range_to_null): Likewise.
854         * vr-values.c (vr_values::extract_range_from_comparison):
855         Clear equiv for constant singleton ranges.
857 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
859         * config/i386/sse.md: Combine VFIXUPIMM* patterns
860         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
861         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
862         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
863         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
864         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
865         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
867 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
869         PR c/69502
870         * doc/extend.texi (Common Type Attributes): For the align type
871         attribute, copy language about decreasing alignment from the
872         corresponding variable attribute.
874 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
876         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
877         -frounding-math.
879 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
881         PR c++/43105
882         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
883         -frtti and -fno-rtti code.
885 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
887         PR c/26366
888         * doc/extend.texi (Other Builtins): Document probability associated
889         with __builtin_expect.
891 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
893         PR target/87928
894         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
895         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
896         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
897         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
899 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
901         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
903 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
905         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
907 2018-11-11  Richard Biener  <rguenther@suse.de>
909         * tree-vrp.h (class value_range_base): New base class for
910         value_range containing all but the m_equiv member.
911         (dump_value_range_base): Add.
912         (range_includes_zero_p): Work on value_range_base.
913         * tree-vrp.c (value_range_base::set): Split out base handling
914         from...
915         (value_range::set): this.
916         (value_range::set_equiv): New.
917         (value_range_base::value_range_base): New constructors.
918         (value_range_base::check): Split out base handling from...
919         (value_range::check): this.
920         (value_range::equal_p): Refactor in terms of
921         ignore_equivs_equal_p which is now member of the base.
922         (value_range_base::set_undefined): New.
923         (value_range_base::set_varying): Likewise.
924         (value_range_base::dump):Split out base handling from...
925         (value_range::dump): this.
926         (value_range_base::set_and_canonicalize): Split out base handling
927         from...
928         (value_range::set_and_canonicalize): this.
929         (value_range_base::union_): New.
930         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
931         for m_vr.
932         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
933         instead of value_range everywhere.
934         (ipcp_vr_lattice::print): Use dump_value_range_base.
935         (ipcp_vr_lattice::meet_with): Adjust.
936         (ipcp_vr_lattice::meet_with_1): Likewise.
937         (ipa_vr_operation_and_type_effects): Likewise.
938         (propagate_vr_across_jump_function): Likewise.
939         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
940         (ipa_get_value_range): Likewise.
941         (ipa_set_jfunc_vr): Likewise.
942         (ipa_compute_jump_functions_for_edge): Likewise.
944 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
946         PR middle-end/65703
947         * doc/invoke.texi (Optimize Options): Add @opindex entries
948         for the positive forms of -fno-xxx and -mno-xxx options
949         that were lacking them.
951 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
953         * combine.c (make_more_copies): Only make an intermediate copy if the
954         dest of a move is a pseudo.
956 2018-11-09  Maya Rashish  <coypu@sdf.org>
958         PR target/87221
959         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
960         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
962 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
964         PR driver/41179
965         PR middle-end/65703
966         * doc/invoke.texi (Optimize Options): Clarify default behavior
967         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
969 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
971         PR tree-optimization/87940
972         * expr.c (string_constant): Don't strip NOPS in subexpressions.
973         Fold PLUS_EXPR correctly.
975 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
977         PR target/87762
978         * config/s390/s390.c (s390_safe_relative_long_p): New function.
979         (annotate_constant_pool_refs): Skip insns which support
980         relative addressing.
981         (annotate_constant_pool_refs_1): New helper function.
982         (find_constant_pool_ref): Skip insns which support relative
983         addression.
984         (find_constant_pool_ref_1): New helper function.
985         (replace_constant_pool_ref): Skip insns which support
986         relative addressing.
987         (replace_constant_pool_ref_1): New helper function.
988         (s390_mainpool_start): Adapt to the new signature.
989         (s390_mainpool_finish): Likewise.
990         (s390_chunkify_start): Likewise.
991         (s390_chunkify_finish): Likewise.
992         (pass_s390_early_mach::execute): Likewise.
993         (s390_prologue_plus_offset): Likewise.
994         (s390_emit_prologue): Likewise.
995         (s390_emit_epilogue): Likewise.
997 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
999         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
1000         but unsupported lastprivate with conditional modifier.
1002 2018-11-09  Jeff Law  <law@redhat.com>
1004         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
1005         unused argument better.  Add gcc_unreachable to silence warning.
1007 2018-11-09  Martin Sebor  <msebor@redhat.com>
1009         PR middle-end/81824
1010         * attribs.c (has_attribute): New helper function.
1011         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
1012         * attribs.h (decls_mismatched_attributes): Declare.
1013         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
1014         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
1015         * common.opt (-Wattribute-alias): Take an argument.
1016         (-Wno-attribute-alias): New option.
1017         * doc/extend.texi (Common Function Attributes): Document copy.
1018         (Common Variable Attributes): Same.
1019         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
1020         (-Wattribute-alias): Document new option argument.
1022 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
1024         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
1025         matching criteria.  Remove unused array initializer.
1027 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
1028             Jinsong Ji  <jji@us.ibm.com>
1030         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
1031         constraints by introducing a new temporary.
1032         (_mm_cvtss_si64): Likewise.
1034 2018-11-09  Martin Liska  <mliska@suse.cz>
1036         * common.opt: Add -fipa-stack-alignment flag.
1037         * doc/invoke.texi: Document it.
1038         * final.c (rest_of_clean_state): Guard stack
1039         shrinking with flag.
1041 2018-11-09  Martin Liska  <mliska@suse.cz>
1043         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
1044         to ...
1045         (ipa_discover_variable_flags): ... this.
1046         * common.opt: Come up with new flag -fipa-reference-addressable.
1047         * doc/invoke.texi: Document it.
1048         * ipa-reference.c (propagate): Call the renamed fn.
1049         * ipa-visibility.c (whole_program_function_and_variable_visibility):
1050         Likewise.
1051         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
1052         ...
1053         (ipa_discover_variable_flags): ... this.  Discover
1054         non-addressable variables only with the newly added flag.
1055         * opts.c: Enable the newly added flag with -O1 and higher
1056         optimization level.
1058 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
1060         * json.cc (selftest::test_writing_literals): Fix comment.
1062 2018-11-09  Martin Liska  <mliska@suse.cz>
1064         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
1065         string to a stack buffer.
1066         (aarch64_parse_cpu): Likewise.
1067         (aarch64_parse_tune): Likewise.
1069 2018-11-09  Richard Biener  <rguenther@suse.de>
1071         PR tree-optimization/87953
1072         * tree-vect-loop.c (vectorizable_reduction): For analysis
1073         always pass ops[0] to vectorizable_condition.
1075 2018-11-09  Stafford Horne  <shorne@gmail.com>
1076             Richard Henderson  <rth@twiddle.net>
1077             Joel Sherrill  <joel@rtems.org>
1079         * common/config/or1k/or1k-common.c: New file.
1080         * config/or1k/*: New.
1081         * config.gcc (or1k*-*-*): New.
1082         * configure.ac (or1k*-*-*): New test for openrisc tls.
1083         * configure: Regenerated.
1084         * doc/install.texi: Document OpenRISC triplets.
1085         * doc/invoke.texi: Document OpenRISC arguments.
1086         * doc/md.texi: Document OpenRISC.
1088 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
1090         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
1091         (arm7tdmi-s): Delete CPU.
1092         (arm710t): Add aliases for arm720t and arm740t.
1093         (arm720t, arm740t): Delete CPUs.
1094         (arm920t): Add aliases for arm920, arm922t and arm940t.
1095         (arm920, arm922t, arm940t): Delete CPUs.
1096         (arm10tdmi): Add alias for arm1020t.
1097         (arm1020t): Delete CPU.
1098         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
1099         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
1100         (arm10e): Add aliases for arm1020e and arm1022e.
1101         (arm1020e, arm1022e): Delete CPU.
1102         * config/arm/arm.md (generic_sched): Remove entries that are now
1103         handled by aliases.
1104         (generic_vfp): Likewise.
1105         * config/arm/arm1020e.md: Simplify tuning selection based on alias
1106         changes.
1107         * config/arm/arm-tune.md: Regenerated.
1108         * config/arm/arm-tables.opt: Regenerated.
1110 2018-11-09  Richard Biener  <rguenther@suse.de>
1112         PR tree-optimization/87621
1113         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
1114         op with only phi inputs.
1115         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
1116         (ch_base::copy_headers): Run CSE on copied loop headers.
1117         (pass_ch_vect::process_loop_p): Simplify.
1119 2018-11-09  Alexandre Oliva <oliva@adacore.com>
1121         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
1122         for non-w64 x86_64 biarch.
1124 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
1126         PR rtl-optimization/86438
1127         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
1128         of in_b for the compare if in_b is SET_DEST.
1130         PR target/87793
1131         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
1132         non-toplevel UNSPEC.
1134 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
1136         * tree-vrp.c (value_range::check): Do not access internals
1137         directly.
1138         (value_range::singleton_p): Same.
1139         (value_range::type): Same.
1140         (vrp_finalize): Use value_range API.
1142 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
1144         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
1146 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
1148         * vr-values.c (vr_values::get_value_range): Use value_range API
1149         instead of piecing together ranges.
1150         (vr_values::update_value_range): Same.
1152 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
1154         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
1155         of performing ad-hoc calculations.
1156         * tree-ssanames.c (set_range_info): New overloaded function
1157         accepting value_range &.
1158         (get_range_info): Same.
1159         * tree-ssanames.h (set_range_info_raw): Remove.
1160         (set_range_info): New prototype.
1161         (get_range_info): Same.
1162         * tree-vrp.h (value_range::null_p): Rename to zero_p.
1163         * tree-vrp.c (value_range::null_p): Same.
1165 2018-11-09  Jan Hubicka  <jh@suse.cz>
1167         * tree.c (fld_type_variant_equal_p): Test user align flag.
1168         (flt_type_variant): Copy user align flag.
1169         (fld_incomplete_type_of): Clear it.
1171 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1173         * config/arm/neon.md (div<mode>3): New pattern.
1175 2018-11-08  Andi Kleen  <ak@linux.intel.com>
1177         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
1178         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
1179         (ix86_handle_option): Handle OPT_mptwrite.
1180         * config/i386/cpuid.h (bit_PTWRITE): Add.
1181         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
1182         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
1183         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
1184         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
1185         (ix86_option_override_internal): Handle PTA_PTWRITE.
1186         (ix86_valid_target_attribute_inner_p): Define ptwrite.
1187         (def_builtin2): Force UINT64 to be 64bit only.
1188         * config/i386/i386.h (TARGET_PTWRITE): Add.
1189         (TARGET_PTWRITE_P): Add.
1190         (PTA_PTWRITE): Add.
1191         * config/i386/i386.md: Define ptwrite.
1192         * config/i386/i386.opt: Add -mptwrite.
1193         * config/i386/immintrin.h (_ptwrite64): Add.
1194         (_ptwrite32): Add
1195         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
1196         * doc/invoke.texi: Document -mptwrite.
1198 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
1200         PR rtl-optimization/87600
1201         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
1202         * lra-constraints.c (process_alt_operands): Skip illegal hard
1203         register usage.  Prefer reloading non hard register operands.
1205 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
1207         PR other/36572
1208         * doc/invoke.texi (Optimize Options): Clarify default behavior
1209         for -fno-sched-interblock and -fno-sched-spec.
1211 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
1213         * collect2.c (linker_select):  Add USE_LLD_LD.
1214         (ld_suffixes): Add ld.lld.
1215         (main): Handle -fuse-ld=lld.
1216         * common.opt (-fuse-ld=lld): New option.
1217         * doc/invoke.texi (-fuse-ld=lld): Document.
1218         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1220 2018-11-08  Paul Koning  <ni1d@arrl.net>
1222         * config/pdp11/constraints.md: Add "Z" series constraints for use
1223         with pre-dec and post-inc addressing.
1224         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1225         (pdp11_expand_operands): Add int argument (word count).
1226         (pdp11_sp_frame_offset): Delete.
1227         (pdp11_cmp_length): New function.
1228         (pushpop_regeq): New function.
1229         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1230         Add hook.
1231         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1232         frame layout.
1233         (pdp11_initial_elimination_offset): Ditto.
1234         (pdp11_expand_operands): Add word count argument.  Bugfixes.
1235         (output_move_multiple): Change how pointer adjustment is done.
1236         (pdp11_gen_int_label): Correct format.
1237         (output_ascii): Ditto.
1238         (pdp11_asm_output_var): Add code for DEC assembler case.
1239         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1240         value.
1241         (legitimate_const_double_p): Ditto.
1242         (pdp11_register_move_cost): Adjust for new register classes.
1243         (pdp11_regno_reg_class): Ditto.
1244         (expand_block_move): Delete.
1245         (pushpop_regeq): New function.
1246         (pdp11_legitimate_address_p): Bugfix in check for constant
1247         offset.
1248         (pdp11_sp_frame_offset): Delete.
1249         (pdp11_reg_save_size): New helper function for new frame layout.
1250         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1251         (pdp11_expand_shift): Bugfix in check for constant shift count.
1252         (pdp11_shift_length): Ditto.
1253         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1254         (pdp11_cmp_length): New function.
1255         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1256         some compile options.
1257         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1258         (CALL_USED_REGISTERS): Ditto.
1259         (ELIMINABLE_REGS): Ditto.
1260         (REGISTER_NAMES): Ditto.
1261         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1262         constraints.
1263         (REG_CLASS_NAMES): Ditto.
1264         (REG_CLASS_CONTENTS): Ditto.  Also remove
1265         HARD_FRAME_POINTER_REGNUM.
1266         (CPU_REG_CLASS): New macro.
1267         (CLASS_MAX_NREGS): Adjust for new register classes.
1268         (FUNCTION_PROFILER): Make no-op.
1269         (may_call_alloca): Remove unused declaration.
1270         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1271         (ASM_OUTPUT_SKIP): Fix format.
1272         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1273         (HARD_FRAME_POINTER_REGNUM): Remove.
1274         (return): Delete.
1275         (*rts): Rename.  Remove epilogue related checks.
1276         (cmpsi, cmpdi): New insn.
1277         (cbranch<mode>4): Change to apply to SI and DI modes as well.
1278         (mov<mode>): Change constraints to enforce that push/pop
1279         destination cannot use the same register as source.
1280         (*mov<mode><cc_cc>): Ditto.
1281         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1282         at assembly output rather than as RTL expander.
1283         (zero_extendqihi2): Bugfix in check for same registers.
1284         (adddi3_nocc): Bugfix in check for constant operand.
1285         (addsi3_nocc): Ditto.
1286         (subdi3_nocc): Ditto.
1287         (subsi3_nocc): Ditto.
1288         (negdi2_nocc): Copy input to pdp11_expand_operands.
1289         (negsi2_nocc): Ditto.
1290         (bswap2_nocc): Ditto.
1291         * config/pdp11/pdp11.opt (mlra): Fix documentation.
1292         * config/pdp11/t-pdp11: Use -Os.
1294 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
1296         * config/arm/parsecpu.awk (/alias/): New parsing rule.
1297         (/begin cpu/): Check that the cpu name hasn't been previously defined.
1298         (gen_comm_data): Print out CPU alias tables.
1299         (check_cpu): Match aliases when checking the CPU name.
1300         * config/arm/arm-protos.h (cpu_alias): New structure.
1301         (cpu_option): Add entry for aliases.
1302         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1303         strongarm1100 and strongarm1110.
1304         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1305         (config/arm/arm-generic.md): Remove redundant references to
1306         strongarm110, strongarm1100 and strongarm1110.
1307         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1308         Scan aliases for additional hints.
1309         (arm_parse_cpu_option_name): Also match a cpu name against the list
1310         of aliases.
1311         * config/arm/arm-tables.opt: Regenerated.
1312         * config/arm/arm-tune.md: Regenerated.
1314 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
1316         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1317         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1318         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1319         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1320         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1321         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1322         * gengtype.c (open_base_files): Add omp-general.h.
1323         * gimple.c (gimple_build_omp_critical):
1324         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
1325         gimple_omp_taskgroup_set_clauses.
1326         (gimple_build_omp_atomic_load): Add mo argument, call
1327         gimple_omp_atomic_set_memory_order.
1328         (gimple_build_omp_atomic_store): Likewise.
1329         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1330         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1331         instead of GSS_OMP.
1332         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1333         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1334         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1335         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
1336         different value for GF_OMP_ATOMIC_NEED_VALUE.
1337         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1338         comments.
1339         (struct gimple_statement_omp_single_layout): And remove here.
1340         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1341         than gimple_statement_omp_single_layout.
1342         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1343         GIMPLE_OMP_TEAMS.
1344         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1345         (gimple_omp_subcode): Formatting fix.
1346         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1347         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1348         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1349         gimple_omp_teams_host, gimple_omp_teams_set_host,
1350         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1351         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1352         gimple_omp_taskgroup_set_clauses): New inline functions.
1353         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1354         (gimple_build_omp_atomic_store): Likewise.
1355         (gimple_omp_atomic_seq_cst_p): Remove.
1356         (gimple_omp_atomic_memory_order): New function.
1357         (gimple_omp_atomic_set_seq_cst): Remove.
1358         (gimple_omp_atomic_set_memory_order): New function.
1359         (gimple_build_omp_taskgroup): Add clauses argument.
1360         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1361         (dump_gimple_omp_task): Print taskwait with depend clauses.
1362         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1363         dump_omp_atomic_memory_order.
1364         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1365         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1366         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1367         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1368         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1369         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1370         ORT_UNTIED_TASKLOOP enumerators.
1371         (enum gimplify_defaultmap_kind): New.
1372         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1373         target_map_pointers_as_0len_arrays members, add defaultmap.
1374         (new_omp_context): Initialize defaultmap member.
1375         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1376         (maybe_fold_stmt): Don't fold even in host teams regions.
1377         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1378         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
1379         ctx->omp_firstprivatize_variable.
1380         (omp_add_variable): Don't add private/firstprivate for VLAs in
1381         ORT_TASKGROUP.
1382         (omp_default_clause): Print "taskloop" rather than "task" if
1383         ORT_*TASKLOOP.
1384         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1385         Handle new defaultmap clause kinds.
1386         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
1387         iterator to be lastprivate or private.  Fix up diagnostics if linear
1388         is used on collapse>1 simd iterator.
1389         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1390         (gimplify_omp_depend): New function.
1391         (gimplify_scan_omp_clauses): Add shared clause on parallel for
1392         combined parallel master taskloop{, simd} if taskloop has
1393         firstprivate, lastprivate or reduction clause.  Handle
1394         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
1395         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
1396         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
1397         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
1398         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
1399         lastprivate.
1400         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
1401         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.  
1402         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
1403         OMP_CLAUSE_{TASK,IN}_REDUCTION.
1404         (gimplify_omp_task): Handle taskwait with depend clauses.
1405         (gimplify_omp_for): Add shared clause on parallel for combined
1406         parallel master taskloop{, simd} if taskloop has firstprivate,
1407         lastprivate or reduction clause.  Use ORT_TASKLOOP or
1408         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
1409         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
1410         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
1411         __for_end and __for_range temporaries on OMP_PARALLEL for
1412         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
1413         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1414         sandwiched in between two taskloops.
1415         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1416         instead of ctx->omp_firstprivatize_variable.
1417         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1418         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
1419         host teams, use gimplify_and_return_first etc. for body like
1420         for target or target data constructs, and at the end call
1421         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1422         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1423         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1424         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1425         gimple_omp_atomic_set_seq_cst calls.
1426         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1427         case, handle taskgroup clauses.
1428         * lto-streamer-out.c (hash_tree): Handle
1429         OMP_CLAUSE_{TASK,IN}_REDUCTION.
1430         * Makefile.in (GTFILES): Add omp-general.h.
1431         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1432         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1433         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1434         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1435         BUILT_IN_GOMP_LOOP_DOACROSS_START,
1436         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1437         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1438         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1439         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1440         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1441         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1442         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1443         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1444         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1445         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1446         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1447         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1448         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1449         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1450         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1451         * omp-expand.c (workshare_safe_to_combine_p): Return false for
1452         non-worksharing loops.
1453         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1454         (determine_parallel_type): Don't combine parallel with worksharing
1455         which has _reductemp_ clause.
1456         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1457         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1458         if there is nonmonotonic modifier or if there is no modifier and no
1459         ordered clause.  For dynamic and guided schedule without monotonic
1460         and nonmonotonic modifier, default to nonmonotonic.
1461         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
1462         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1463         task reductions.
1464         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1465         there are any reduction clauses.
1466         (expand_taskwait_call): New function.
1467         (expand_teams_call): New function.
1468         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1469         expand_teams_call for it.  Formatting fix.  Handle taskwait with
1470         depend clauses.
1471         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
1472         of worksharing loops with task reductions.
1473         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1474         expansion of worksharing loops with task reductions.
1475         (expand_omp_sections): Handle expansion of sections with task
1476         reductions.
1477         (expand_omp_synch): For host teams call expand_omp_taskreg.
1478         (omp_memory_order_to_memmodel): New function.
1479         (expand_omp_atomic_load, expand_omp_atomic_store,
1480         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1481         instead of gimple_omp_atomic_seq_cst_p.
1482         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1483         depend clauses as a standalone directive.
1484         * omp-general.c (enum omp_requires): New variable.
1485         (omp_extract_for_data): Initialize have_reductemp member.  Allow
1486         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1487         GT_EXPR loops depending on incr sign.  Formatting fixes.
1488         * omp-general.h (struct omp_for_data): Add have_reductemp member.
1489         (enum omp_requires): New enum.
1490         (omp_requires_mask): Declare.
1491         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1492         Fix comment typos.
1493         * omp-low.c (struct omp_context): Add task_reductions and
1494         task_reduction_map fields.
1495         (is_host_teams_ctx): New function.
1496         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1497         (use_pointer_for_field): Use is_global_var instead of
1498         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1499         in outer contexts.
1500         (build_outer_var_ref): Ignore taskgroup outer contexts.
1501         (delete_omp_context): Release task_reductions and task_reduction_map.
1502         (scan_sharing_clauses): Don't add any fields for reduction clause on
1503         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
1504         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1505         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
1506         Handle OMP_CLAUSE_NONTEMPORAL.
1507         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1508         needed.
1509         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1510         clauses with task modifier.
1511         (scan_omp_task): Handle taskwait with depend clauses.
1512         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1513         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1514         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1515         (scan_omp_for): Fix comment formatting.
1516         (scan_omp_teams): Handle host teams constructs.
1517         (check_omp_nesting_restrictions): Allow teams with no outer
1518         OpenMP context.  Adjust diagnostics for teams strictly nested into
1519         some explicit OpenMP construct other than target.  Allow OpenMP atomics
1520         inside of simd regions.
1521         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1522         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1523         taskreg_nesting_level while scanning host teams construct.
1524         (task_reduction_read): New function.
1525         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1526         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1527         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
1528         second argument create_tmp_var if it is NULL.  Don't ignore shared
1529         clauses in is_host_teams_ctx contexts.  Handle
1530         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1531         clauses.
1532         (lower_reduction_clauses): Ignore reduction clauses with task
1533         modifier.  Remove second argument create_tmp_var if it is NULL.
1534         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1535         (lower_send_clauses): Ignore reduction clauses with task modifier.
1536         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
1537         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
1538         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1539         rely that it is the last stmt in body so far.  Ignore outer taskgroup
1540         contexts.
1541         (omp_task_reductions_find_first, omp_task_reduction_iterate,
1542         lower_omp_task_reductions): New functions.
1543         (lower_omp_sections): Handle reduction clauses with taskgroup
1544         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
1545         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1546         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
1547         modifiers.
1548         (lower_omp_taskgroup): Handle taskgroup reductions.
1549         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1550         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1551         (lower_depend_clauses): If there are any
1552         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1553         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
1554         seen, assume lowering is done already and return early.  Set kind
1555         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1556         (lower_omp_taskreg): Handle reduction clauses with task modifier on
1557         parallel construct.  Handle reduction clause on taskloop construct.
1558         Handle taskwait with depend clauses.
1559         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1560         for host teams constructs.
1561         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1562         nontemporal and _reductemp_ clause entries.
1563         (omp_clause_code_name): Likewise.
1564         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1565         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1566         * tree-core.h (enum omp_clause_code): Add
1567         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1568         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1569         (struct tree_base): Add omp_atomic_memory_order field into union.
1570         Remove OMP_ATOMIC_SEQ_CST comment.
1571         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1572         and OMP_CLAUSE_DEPEND_DEPOBJ.
1573         (struct tree_omp_clause): Add subcode.defaultmap_kind.
1574         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1575         OpenMP constructs with body and clauses operands.
1576         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1577         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1578         (OMP_TASKGROUP_CLAUSES): Define.
1579         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1580         OMP_CLAUSE__LOOPTEMP_.
1581         (OMP_ATOMIC_SEQ_CST): Remove.
1582         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1583         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1584         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1585         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1586         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1587         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1588         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1589         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1590         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1591         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1592         Define.
1593         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1594         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1595         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1596         (convert_local_omp_clauses): Likewise.  Remove useless test.
1597         * tree-parloops.c (create_call_for_reduction_1): Pass
1598         OMP_MEMORY_ORDER_RELAXED as new argument to
1599         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1600         * tree-pretty-print.c (dump_omp_iterators): New function.
1601         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1602         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
1603         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1604         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
1605         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
1606         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
1607         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1608         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1609         (dump_omp_atomic_memory_order): New function.
1610         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
1611         taskwait with depend clauses.
1612         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1613         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1614         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1615         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1616         write_ts_omp_clause_tree_pointers): Likewise.
1618 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1620         PR ipa/86395
1621         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1622         "-missed", "-note", and "-all" sub-options.
1623         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1624         API.
1625         (can_early_inline_edge_p): Likewise.
1626         (want_early_inline_function_p): Likewise.
1627         (want_inline_self_recursive_call_p): Likewise.
1628         (recursive_inlining): Likewise.
1629         (inline_small_functions): Likewise.
1630         (flatten_function): Likewise.
1631         (ipa_inline): Likewise.
1632         (inline_always_inline_functions): Likewise.
1633         (early_inline_small_functions): Likewise.
1634         (early_inliner): Likewise.
1635         * tree-inline.c (expand_call_inline): Likewise.
1637 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1639         * pretty-print.c (pp_format): Handle %f.
1640         (selftest::test_pp_format): Add test of %f.
1641         * pretty-print.h (pp_double): New macro.
1643 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1645         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1646         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1647         (dump_pretty_printer::decode_format): Implement "%C" for
1648         cgraph_node *.
1649         (selftest::test_capture_of_dump_calls): Rename "where" to
1650         "stmt_loc".  Convert test_decl to a function decl and set its
1651         location.  Add a symbol_table_test RAII instance and a
1652         cgraph_node, using it to test "%C" and dump_symtab_node.
1654 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
1656         PR middle-end/87916
1657         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1659 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1661         * cgraph.c: Include "selftest.h".
1662         (saved_symtab): New variable.
1663         (selftest::symbol_table_test::symbol_table_test): New ctor.
1664         (selftest::symbol_table_test::~symbol_table_test): New dtor.
1665         (selftest::test_symbol_table_test): New test.
1666         (selftest::cgraph_c_tests): New.
1667         * cgraph.h (saved_symtab): New decl.
1668         (selftest::symbol_table_test): New class.
1669         * selftest-run-tests.c (selftest::run_tests): Call
1670         selftest::cgraph_c_tests.
1671         * selftest.h (selftest::cgraph_c_tests): New decl.
1673 2018-11-08  Richard Biener  <rguenther@suse.de>
1675         * tree-data-ref.h (lambda_int): New typedef.
1676         (lambda_vector_gcd): Adjust.
1677         (lambda_vector_new): Likewise.
1678         (lambda_matrix_new): Likewise.
1679         * tree-data-ref.c  (print_lambda_vector): Adjust.
1681 2018-11-08  Richard Biener  <rguenther@suse.de>
1683         PR tree-optimization/87929
1684         * tree-complex.c (expand_complex_comparison): Clean EH.
1686 2018-11-08  Martin Liska  <mliska@suse.cz>
1688         * doc/extend.texi: Reword.
1689         * predict.c (expr_expected_value_1): Likewise.
1691 2018-11-08  Richard Biener  <rguenther@suse.de>
1693         PR tree-optimization/87913
1694         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1695         of extreme values to ordered comparisons.
1697 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1699         PR middle-end/42726
1700         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1702 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1704         * doc/invoke.texi: Remove leading dash from @opindex entries
1705         throughout the file.
1707 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1709         PR driver/80828
1710         * doc/invoke.texi (Option Summary): Add -e and --entry.
1711         (Link Options): Likewise.
1713 2018-11-07  Nathan Sidwell  <nathan@acm.org>
1715         PR 87926
1716         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1717         --disable-checking bootstrap.
1719 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1721         * configure: Regenerated.
1723 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1725         PR c/87691
1726         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1727         to the mode of the widest field iff the widest field has mode class
1728         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1729         reference.
1731 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
1733         * common.opt: Add -Wattribute-warning.
1734         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1735         * expr.c (expand_expr_real_1): Add new attribute to warning_at
1736         call to allow user configure behavior of "warning" attribute.
1738 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
1740         * target.def: Put @: after every vs., e.g., and i.e. where it is
1741         followed by whitespace.
1742         * doc/extend.texi: Ditto.
1743         * doc/fragments.texi: Ditto.
1744         * doc/gimple.texi: Ditto.
1745         * doc/implement-c.texi: Ditto.
1746         * doc/install.texi: Ditto.
1747         * doc/invoke.texi: Ditto.
1748         * doc/md.texi: Ditto.
1749         * doc/plugins.texi: Ditto.
1750         * doc/rtl.texi: Ditto.
1751         * doc/sourcebuild.texi: Ditto.
1752         * doc/tm.texi.in: Ditto.
1753         * doc/ux.texi: Ditto.
1754         * doc/tm.texi: Regenerate.
1756 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1758         * config/arm/arm-cpus.in (ares): New entry.
1759         * config/arm/arm-tables.opt: Regenerate.
1760         * config/arm/arm-tune.md: Likewise.
1761         * doc/invoke.texi (ARM Options): Document ares.
1763 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1765         * config/aarch64/aarch64-cores.def (ares): Define.
1766         * config/aarch64/aarch64-tune.md: Regenerate.
1767         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
1769 2018-11-07  Jan Hubicka  <jh@suse.cz>
1771         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
1772         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
1773         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
1774         TYPE_DECL.
1776 2018-11-07  Richard Biener  <rguenther@suse.de>
1778         PR tree-optimization/87914
1779         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
1780         of nested cycles.
1781         (vectorizable_reduction): Handle shifts and rotates by dispatching
1782         to vectorizable_shift.
1783         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
1784         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
1785         def cases.
1786         (vectorizable_shift): Export and handle being called as
1787         vect_nested_cycle.
1788         (vect_analyze_stmt): Call vectorizable_shift after
1789         vectorizable_reduction.
1790         * tree-vectorizer.h (vectorizable_shift): Declare.
1792 2018-11-07  Jan Hubicka  <jh@suse.cz>
1794         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
1795         than const decls in TREE_VALUE of enum.
1796         (dump_type_inheritance_graph): Improve duplicate dumping.
1797         (free_enum_values): New.
1798         (build_type_inheritance_graph): Use it.
1799         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
1800         which are not main variants or not ODR types.
1801         (verify_type_variant): Expect variants to have no TYPE_VALUES.
1803 2018-11-07  Richard Biener  <rguenther@suse.de>
1805         * ipa-inline.c (want_inline_small_function_p): Compute
1806         big_speedup_p lazily and last.
1808 2018-11-07  Jan Hubicka  <jh@suse.cz>
1810         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
1811         building incomplete variant of complete type.
1812         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
1813         variant of complete type.
1815 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1817         * config/mips/mips.c: Fix typo in documentation of
1818         mips_loongson_ext2_prefetch_cookie.
1819         (mips_option_override): fix brain twister logical.
1820         * config/mips/mips.h: Fix typo in documentation of
1821         ISA_HAS_CTZ_CTO and define pattern.
1822         * config/mips/mips.md (prefetch): Hoist EXT2 above
1823         the 2EF/EXT block.
1824         (prefetch_indexed): Hoist EXT2 above the EXT block.
1826 2018-11-07  Jan Hubicka  <jh@suse.cz>
1828         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
1829         return and parameter types of function and method types.
1830         (free_lang_data_in_cgraph): Update.
1832 2018-11-07  Martin Liska  <mliska@suse.cz>
1834         PR rtl-optimization/87868
1835         * postreload-gcse.c (eliminate_partially_redundant_load): Set
1836         threshold to max_count if we would overflow.
1837         * profile-count.h: Make max_count a public constant.
1839 2018-11-07  Martin Liska  <mliska@suse.cz>
1841         * mem-stats.h: Fix GNU coding style.
1843 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1845         * config/mips/gs264e.md: New.
1846         * config/mips/mips-cpus.def: Define gs264e.
1847         * config/mips/mips-tables.opt: Regenerate.
1848         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1849         gs264e.
1850         (mips_issue_rate): Add support for gs264e.
1851         (mips_multipass_dfa_lookahead): Likewise.
1852         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
1853         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
1854         (MIPS_ASE_MSA_SPEC): New.
1855         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
1856         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
1857         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
1858         * config/mips/mips.md: Include gs264e.md.
1859         (processor): Add gs264e.
1860         * config/mips/mips.opt (MSA): Use Mask instead of Var.
1861         * doc/invoke.texi: Add gs264e to supported architectures.
1863 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1865         * config/mips/gs464e.md: New.
1866         * config/mips/mips-cpus.def: Define gs464e.
1867         * config/mips/mips-tables.opt: Regenerate.
1868         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1869         gs464e.
1870         (mips_issue_rate): Add support for gs464e.
1871         (mips_multipass_dfa_lookahead): Likewise.
1872         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
1873         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
1874         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
1875         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
1876         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
1877         * config/mips/mips.md: Include gs464e.md.
1878         (processor): Add gs464e.
1879         * doc/invoke.texi: Add gs464e to supported architectures.
1881 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1883         * config/mips/loongson3a.md: Rename to ...
1884         * config/mips/gs464.md: ... here.
1885         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
1886         as an alias of gs464 processor.
1887         * config/mips/mips-tables.opt: Regenerate.
1888         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
1889         instead of PROCESSOR_LOONGSON_3A.
1890         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
1891         TUNE_LOONGSON_3A.
1892         (mips_option_override): Enable MMI and EXT for gs464.
1893         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
1894         Rename TUNE_LOONGSON_3A to TUNE_GS464.
1895         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
1896         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
1897         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
1898         TARGET_LOONGSON_3A.
1899         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
1900         (processor): Add gs464;
1901         * doc/invoke.texi: Add gs464 to supported architectures.
1903 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1905         * config/mips/mips-protos.h
1906         (mips_loongson_ext2_prefetch_cookie): New prototype.
1907         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
1908         (mips_option_override): Enable TARGET_LOONGSON_EXT when
1909         TARGET_LOONGSON_EXT2 is true.
1910         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
1911         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
1912         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
1913         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
1914         TARGET_LOONGSON_EXT2.
1915         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
1916         (define_insn "ctz<mode>2"): New insn pattern.
1917         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
1918         (define_insn "prefetch_indexed_<mode>"): Include
1919         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
1920         * config/mips/mips.opt (-mloongson-ext2): Add option.
1921         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
1923 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1925         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
1926         __mips_loongson_ext.
1927         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
1928         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
1929         -mloongson-ext.
1930         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
1931         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
1932         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
1933         instead of TARGET_LOONGSON_3A.
1934         * config/mips/mips.opt (-mloongson-ext): Add option.
1935         * gcc/doc/invoke.texi (-mloongson-ext): Document.
1937 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1939         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
1940         * config/mips/loongson.md: Move to ...
1941         * config/mips/loongson-mmi.md: here; Adjustment.
1942         * config/mips/loongson.h: Move to ...
1943         State as deprecated. Include loongson-mmiintrin.h for back
1944         compatibility and warning.
1945         * config/mips/loongson-mmiintrin.h: ... here.
1946         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
1947         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
1948         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1949         (mips_option_override): Make sure MMI use hard float;
1950         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
1951         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
1952         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
1953         TARGET_LOONGSON_VECTORS.
1954         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
1955         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
1956         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
1957         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
1958         -mloongson-mmi.
1959         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
1960         TARGET_LOONGSON_VECTORS.
1961         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
1962         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1963         (Loongson MMI patterns): Include loongson-mmi.md instead of
1964         loongson.md.
1965         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
1966         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
1968 2018-11-07  Richard Biener  <rguenther@suse.de>
1970         PR lto/87906
1971         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
1972         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
1974 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
1976         PR rtl-optimization/87874
1977         * lra.c (lra_substitute_pseudo): Do not create a subreg for
1978         const wide ints.
1980 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
1982         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
1983         if not in indexed or indirect form.
1984         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
1985         (bswap<mode>2_store): Ditto.
1987 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
1989         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
1990         the UNSPEC.
1992 2018-11-06  Richard Biener  <rguenther@suse.de>
1994         PR tree-optimization/86850
1995         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
1996         instead of src.m_vec.
1998 2018-11-06  Jan Hubicka  <jh@suse.cz>
2000         * tree.c (fld_simplified_type_name): Break out form ...
2001         (free_lang_data_in_type): ... here.
2002         (fld_type_variant_equal_p): Use it.
2004 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2006         * config/default-d.c: Include memmodel.h.
2008         * config/sol2-d.c: New file.
2009         * config/t-sol2 (sol2-d.o): New rule.
2010         * config.gcc <*-*-solaris2*>: Set d_target_objs,
2011         target_has_targetdm.
2013 2018-11-06  Jan Hubicka  <jh@suse.cz>
2015         * tree.c (fld_type_variant): Also copy alignment; be sure that
2016         new variant is equal.
2018 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2020         PR target/87762
2021         * config/s390/s390.md: Add relative_long attribute.
2023 2018-11-06  Jan Hubicka  <jh@suse.cz>
2025         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
2026         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
2027         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
2028         stream TYPE_NEEDS_CONSTRUCTING.
2029         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
2030         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
2032 2018-11-06  Richard Biener  <rguenther@suse.de>
2034         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
2035         dump-scope ...
2036         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
2038 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2040         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
2041         REG_CLASS_CONTENTS[GEN_REGS].
2042         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
2044 2018-11-06  Jan Hubicka  <jh@suse.cz>
2046          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
2048 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2050         PR sanitizer/80953
2051         * config/sol2.h (ASAN_CC1_SPEC): Define.
2052         (LD_WHOLE_ARCHIVE_OPTION): Define.
2053         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
2054         (ASAN_REJECT_SPEC): Provide default.
2055         (LIBASAN_EARLY_SPEC): Define.
2056         (LIBTSAN_EARLY_SPEC): Define.
2057         (LIBLSAN_EARLY_SPEC): Define.
2058         * config/i386/sol2.h (CC1_SPEC): Redefine.
2059         (ASAN_REJECT_SPEC): Define.
2061         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
2062         (TARGET_ASAN_SHADOW_OFFSET): Define.
2063         (sparc_asan_shadow_offset): New function.
2064         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
2065         (ASAN_REJECT_SPEC): Define.
2067 2018-11-06  Jan Hubicka  <jh@suse.cz>
2069         * tree.c (fld_type_variant): Copy canonical type.
2070         (fld_incomplete_type_of): Check that canonical types looks sane;
2071         copy canonical type.
2072         (verify_type): Accept when incomplete type has complete canonical type.
2074 2018-11-06  Jan Hubicka  <jh@suse.cz>
2076         * tree.c (free_lang_data): Reset overwite_assembler_name,
2077         print_xnode, print_decl, print_type and print_identifier of
2078         langhooks.
2080 2018-11-06  Richard Biener  <rguenther@suse.de>
2082         PR tree-optimization/87889
2083         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2084         Do nothing if old and new arg are the same
2086 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
2088         PR target/87723
2089         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
2090         attributes for operands 3 and 4.
2092 2018-11-06  Richard Biener  <rguenther@suse.de>
2094         PR middle-end/18041
2095         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
2096         matching bitfield insertion.
2098 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
2100         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
2101         (reg_next_debug_use): New.
2102         (attempt_change): Propagate adjusted expression into affected
2103         debug insns.
2104         (merge_in_block): Track uses in debug insns.
2105         (pass_inc_dec::execute): Allocate and release
2106         reg_next_debug_use.
2108 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
2110         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
2111         (_mm512_fixupimm_round_pd): Update parameters and builtin.
2112         (_mm512_maskz_fixupimm_round_pd): Ditto.
2113         (_mm512_fixupimm_round_ps): Ditto.
2114         (_mm512_maskz_fixupimm_round_ps): Ditto.
2115         (_mm_fixupimm_round_sd): Ditto.
2116         (_mm_maskz_fixupimm_round_sd): Ditto.
2117         (_mm_fixupimm_round_ss): Ditto.
2118         (_mm_maskz_fixupimm_round_ss): Ditto.
2119         (_mm512_fixupimm_pd): Ditto.
2120         (_mm512_maskz_fixupimm_pd): Ditto.
2121         (_mm512_fixupimm_ps): Ditto.
2122         (_mm512_maskz_fixupimm_ps): Ditto.
2123         (_mm_fixupimm_sd): Ditto.
2124         (_mm_maskz_fixupimm_sd): Ditto.
2125         (_mm_fixupimm_ss): Ditto.
2126         (_mm_maskz_fixupimm_ss): Ditto.
2127         (_mm512_mask_fixupimm_round_pd): Update builtin.
2128         (_mm512_mask_fixupimm_round_ps): Ditto.
2129         (_mm_mask_fixupimm_round_sd): Ditto.
2130         (_mm_mask_fixupimm_round_ss): Ditto.
2131         (_mm512_mask_fixupimm_pd): Ditto.
2132         (_mm512_mask_fixupimm_ps): Ditto.
2133         (_mm_mask_fixupimm_sd): Ditto.
2134         (_mm_mask_fixupimm_ss): Ditto.
2135         * config/i386/avx512vlintrin.h:
2136         (_mm256_fixupimm_pd): Update parameters and builtin.
2137         (_mm256_maskz_fixupimm_pd): Ditto.
2138         (_mm256_fixupimm_ps): Ditto.
2139         (_mm256_maskz_fixupimm_ps): Ditto.
2140         (_mm_fixupimm_pd): Ditto.
2141         (_mm_maskz_fixupimm_pd): Ditto.
2142         (_mm_fixupimm_ps): Ditto.
2143         (_mm_maskz_fixupimm_ps): Ditto.
2144         (_mm256_mask_fixupimm_pd): Update builtin.
2145         (_mm256_mask_fixupimm_ps): Ditto.
2146         (_mm_mask_fixupimm_pd): Ditto.
2147         (_mm_mask_fixupimm_ps): Ditto.
2148         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
2149         * config/i386/i386-builtin.def: Update builtin definitions.
2150         * config/i386/i386.c: Handle new builtin types and remove useless ones.
2151         * config/i386/sse.md: Update VFIXUPIMM* patterns.
2152         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2153         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2154         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
2155         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2156         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2157         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
2158         * config/i386/subst.md:
2159         (round_saeonly_sd_mask_operand4): Add new subst_attr.
2160         (round_saeonly_sd_mask_op4): Ditto.
2161         (round_saeonly_expand_operand5): Ditto.
2162         (round_saeonly_expand): Update.
2164 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
2166         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2168 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
2170         PR rtl-optimization/87871
2171         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
2173 2018-11-05  Paul Koning  <ni1d@arrl.net>
2175         * doc/sourcebuild.texi (target attributes): Document new "inf"
2176         effective target keyword.
2178 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
2180         * config/s390/s390.c (s390_register_move_cost): Increase costs for
2181         moves involving the CC reg.
2183 2018-11-05  Richard Biener  <rguenther@suse.de>
2185         PR tree-optimization/87873
2186         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
2187         argument.
2188         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
2189         * tree-vect-loop.c (vect_transform_loop): When splitting the
2190         loop exit also create forwarder PHIs for constants.
2191         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2192         Handle constant to_arg, add extra checking we match up the correct
2193         PHIs.
2195 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
2197         * config/s390/s390.md: QImode and HImode for load on condition.
2199 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
2201         * config/s390/predicates.md: Fix typo.
2202         * config/s390/s390.md: Allow immediates for load on condition.
2204 2018-11-05  Martin Liska  <mliska@suse.cz>
2206         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
2207         * bitmap.h (struct bitmap_usage): Likewise.
2208         * ggc-common.c (SCALE): Remove.
2209         (LABEL): Likewise.
2210         (struct ggc_usage): Use SIZE_AMOUNT. And update
2211         compare method.
2212         * ggc-page.c (SCALE): Remove.
2213         (STAT_LABEL): Remove.
2214         (ggc_print_statistics): Use SIZE_AMOUNT.
2215         * gimple.h (SCALE): Remove.
2216         (LABEL): Likewise.
2217         * input.c (ONE_K): Remove.
2218         (ONE_M): Likewise.
2219         (SCALE): Likewise.
2220         (STAT_LABEL): Likewise.
2221         (FORMAT_AMOUNT): Likewise.
2222         (dump_line_table_statistics): Use SIZE_AMOUNT.
2223         * mem-stats.h (struct mem_usage): Likewise.
2224         * rtl.c (dump_rtx_statistics): Likewise.
2225         (rtx_alloc_counts): Change type to size_t.
2226         (rtx_alloc_sizes): Likewise.
2227         (rtx_count_cmp): New.
2228         (dump_rtx_statistics): Sort first based on counts.
2229         * tree.c (tree_nodes_cmp): New.
2230         (tree_codes_cmp): New.
2231         (dump_tree_statistics): Sort first based on counts.
2232         * system.h (ONE_K): New.
2233         (ONE_M): Likewise.
2234         (SIZE_SCALE): Likewise.
2235         (SIZE_LABEL): Likewise.
2236         (SIZE_AMOUNT): Likewise.
2237         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2238         * tree-dfa.c (dump_dfa_stats): Likewise.
2239         * tree-phinodes.c (phinodes_print_statistics): Likewise.
2240         * tree-ssanames.c (ssanames_print_statistics): Likewise.
2241         * tree.c (dump_tree_statistics): Likewise.
2242         * vec.c (struct vec_usage): Likewise.
2243         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2244         trigger a -Werror=format-overflow with
2245         --enable-gather-detailed-stats.
2247 2018-11-05  Martin Liska  <mliska@suse.cz>
2249         * mem-stats.h (mem_alloc_description::release_instance_overhead):
2250         Return T *.
2251         * vec.c (struct vec_usage): Register m_element_size.
2252         (vec_prefix::register_overhead): New arguments: elements and
2253         element_size.
2254         (vec_prefix::release_overhead): Subtract elements.
2255         * vec.h (struct vec_prefix): Change signature.
2256         (va_heap::reserve): Pass proper arguments.
2257         (va_heap::release): Likewise.
2259 2018-11-05  Martin Liska  <mliska@suse.cz>
2261         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2262         style.
2263         * vec.c: Likewise.
2265 2018-11-05  Richard Biener  <rguenther@suse.de>
2267         * tree-scalar-evolution.h (final_value_replacement_loop): Update
2268         prototype.
2269         * tree-scalar-evolution.c (final_value_replacement_loop): Return
2270         whether anything was done.
2271         (scev_const_prop): Remove constant propagation part, fold
2272         remains into ...
2273         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2274         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2275         conditionally.
2277 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
2279         PR tree-optimization/87859
2280         * gimple-ssa-store-merging.c (struct merged_store_group): Add
2281         only_constants and first_nonmergeable_order members.
2282         (merged_store_group::merged_store_group): Initialize them.
2283         (merged_store_group::do_merge): Clear only_constants member if
2284         adding something other than INTEGER_CST store.
2285         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2286         stores with order >= first_nonmergeable_order.  Use
2287         merged_store->only_constants instead of always recomputing it.
2288         Set merged_store->first_nonmergeable_order if we've skipped any
2289         stores.  Attempt to merge overlapping INTEGER_CST stores that
2290         we would otherwise skip.
2292         PR sanitizer/87837
2293         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2295 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
2297         PR target/87853
2298         * config/i386/emmintrin.h (__v16qs): New to cope with option
2299         -funsigned-char.
2300         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2301         (_mm_cmplt_epi8): Likewise.
2302         (_mm_cmpgt_epi8): Likewise.
2304 2018-11-05  Richard Biener  <rguenther@suse.de>
2306         PR rtl-optimization/87852
2307         * fwprop.c (use_killed_between): Only consider single-defs of the
2308         use whose definition statement dominates the use.
2310 2018-11-05  Martin Liska  <mliska@suse.cz>
2312         PR web/87829
2313         * doc/invoke.texi: Remove options that are
2314         not disabled with -Os.
2316 2018-11-05  Martin Liska  <mliska@suse.cz>
2318         PR c/87811
2319         * doc/extend.texi: Update constrain about the last argument
2320         of __builtin_expect_with_probability.
2322 2018-11-05  Martin Liska  <mliska@suse.cz>
2324         PR c/87811
2325         * predict.c (expr_expected_value_1): Verify
2326         that last argument is a real constants and emit
2327         error.
2329 2018-11-05  Martin Liska  <mliska@suse.cz>
2331         PR gcov-profile/77698
2332         * ipa-profile.c (ipa_profile): Adjust hotness threshold
2333         only in LTO mode.
2335 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2337         PR tree-optimization/86572
2338         * builtins.c (c_strlen): Handle negative offsets in a safe way.
2340 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2342         PR tree-optimization/87672
2343         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2344         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2346 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
2348         PR middle-end/58372
2349         * cfgexpand.c (pass_expand::execute): Move the call to
2350         finish_eh_generation in front of the call to expand_stack_alignment.
2352 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2354         * common/config/i386/i386-common.c (processor_alias_table): Add
2355         znver2 entry.
2356         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2357         (case ${target}): Add znver2.
2358         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2359         -march=native recognize znver2 processors.
2360         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2361         * config/i386/i386.c (m_znver2): New definition.
2362         (m_ZNVER): New definition.
2363         (m_AMD_MULTIPLE): Includes m_znver2.
2364         (processor_cost_table): Add znver2 entry.
2365         (processor_target_table): Add znver2 entry.
2366         (get_builtin_code_for_version): Set priority for
2367         PROCESSOR_ZNVER2.
2368         (processor_model): Add M_AMDFAM17H_ZNVER2.
2369         (arch_names_table): Ditto.
2370         (ix86_reassociation_width): Include znver2.
2371         * config/i386/i386.h (TARGET_znver2): New definition.
2372         (struct ix86_size_cost): Add TARGET_ZNVER2.
2373         (enum processor_type): Add PROCESSOR_ZNVER2.
2374         * config/i386/i386.md (define_attr "cpu"): Add znver2.
2375         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2376         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2377         (ix86_adjust_cost): Add znver2.
2378         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
2379         * gcc/doc/extend.texi: Add details about znver2.
2380         * gcc/doc/invoke.texi: Add details about znver2.
2382 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
2384         PR target/87079
2386         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2387         pattern.
2389 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2391         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2392         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2394 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
2396         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2397         shrink-wrapping when -mtrack-speculation.
2399 2018-11-02  Richard Biener  <rguenther@suse.de>
2401         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2402         (pop_cost_one_pair): Do not free pair.
2403         (pop_best_coalesce): Likewise.
2404         (create_coalesce_list): Initialize obstack.
2405         (delete_coalesce_list): Free obstack.
2406         (find_coalesce_pair): Obstack-allocate coalesce pairs.
2407         (add_cost_one_coalesce): Likewise.
2408         (struct live_track): Remove bitmap pointer indirections.
2409         (new_live_track): Adjust.
2410         (delete_live_track): Likewise.
2411         (live_track_remove_partition): Likewise.
2412         (live_track_add_partition): Likewise.
2413         (live_track_live_p): Likewise.
2414         (live_track_process_def): Likewise.
2415         (live_track_clear_base_vars): Likewise.
2417 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2419         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2420         * configure: Regenerate.
2421         * config.in: Regenerate.
2422         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2423         HAVE_AS_REGISTER_PSEUDO_OP guard.
2424         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2425         !HAVE_AS_REGISTER_PSEUDO_OP support.
2426         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2427         guard.
2429 2018-11-02  Richard Biener  <rguenther@suse.de>
2431         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2432         with is_type_die.
2434 2018-11-02  Richard Biener  <rguenther@suse.de>
2436         PR tree-optimization/87776
2437         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2438         executable when iterating but running into rpo-vn-max-loop-depth
2439         and not eliding the iteration.
2441 2018-11-30  Jan Hubicka  <jh@suse.cz>
2443         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2444         TYPE_DECL.
2446 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
2448         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2449         prototype.
2450         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2451         Combine with rs6000_address_for_fpconvert.
2452         (rs6000_address_for_fpconvert): Combine with
2453         rs6000_force_indexed_or_indirect_mem.
2454         (rs6000_expand_vector_init): Change function call from
2455         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2456         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2457         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2458         (floatsi<mode>2_lfiwax_mem): Ditto.
2459         (floatunssi<mode>2_lfiwzx): Ditto.
2460         (floatunssi<mode>2_lfiwzx_mem): Ditto.
2461         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2462         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2463         (fix_trunc<mode>si2_stfiwx): Ditto.
2464         (fixuns_trunc<mode>si2_stfiwx): Ditto.
2465         (float_<mode>si2_hw): Ditto.
2466         (floatuns_<mode>si2_hw): Ditto.
2467         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2468         (vsx_splat_<mode>): Ditto.
2470 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
2472         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2473         at end of assembler input text.
2474         * configure: Regenerate.
2476 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
2478         PR tree-optimization/87826
2479         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2480         negative or larger or equal to type's precision.
2482 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
2484         * opts.c (default_options_table): Do not enable
2485         OPT_fdelayed_branch at -Og.
2486         * doc/invoke.texi (-fdelayed-branch): Document it.
2488 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
2490         * optabs-libfuncs.c (build_libfunc_function_visibility):
2491         New, split out from...
2492         (build_libfunc_function): ... here.
2493         (init_one_libfunc_visibility): New, split out from ...
2494         (init_one_libfunc): ... here.
2496         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2497         scratch register need not be early-clobber.  Document the reason
2498         why we cannot use ST<OP>.
2500 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
2502         PR bootstrap/82856
2503         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
2504         line for second argument of AC_DEFINE_UNQUOTED.
2505         * doc/install.texi (Tools/packages necessary for modifying GCC):
2506         Update to autoconf 2.69 and automake 1.15.1.
2507         * aclocal.m4, config.in, configure: Regenerate.
2509 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
2511         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2512         initialization.
2514 2018-10-31  Martin Liska  <mliska@suse.cz>
2516         PR driver/83193
2517         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2518         Add new argument invalid_extension.
2519         (aarch64_get_all_extension_candidates): New function.
2520         (aarch64_rewrite_selected_cpu): Add NULL to function call.
2521         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2522         new argument.
2523         (aarch64_get_all_extension_candidates): New function.
2524         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2525         argument invalid_extension.
2526         (aarch64_parse_cpu): Likewise.
2527         (aarch64_print_hint_for_extensions): New function.
2528         (aarch64_validate_mcpu): Provide hint about invalid extension.
2529         (aarch64_validate_march): Likewise.
2530         (aarch64_handle_attr_arch): Pass new argument.
2531         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2532         (aarch64_handle_attr_isa_flags): Likewise.
2534 2018-10-31  Richard Biener  <rguenther@suse.de>
2536         PR middle-end/70359
2537         PR middle-end/86270
2538         * tree-outof-ssa.c (insert_backedge_copies): Restrict
2539         copy generation to useful cases.  Place the copy before
2540         the definition of the backedge value when possible.
2542 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2544         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2545         * config/arc/arc.c (arc_active_insn): New function.
2546         (check_store_cacheline_hazard): Likewise.
2547         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2548         (arc_override_options): Disable delay slot scheduler for older
2549         A7.
2550         (arc_store_addr_hazard_p): New implementation, old one renamed to
2551         ...
2552         (arc_store_addr_hazard_internal_p): Renamed.
2553         (arc_reorg): Don't combine into brcc instructions which are part
2554         of hardware hazard solution.
2555         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2556         (tune_arc700): Likewise.
2557         * config/arc/arc.opt (arc7xx): New tune value.
2558         * config/arc/arc700.md: Improve A7 scheduler.
2560 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2562         * config/arc/arc.c (arc_override_options): Remove
2563         TARGET_COMPACT_CASESI.
2564         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2565         (CASE_VECTOR_MODE): Likewise.
2566         (CASE_VECTOR_PC_RELATIVE): Likewise.
2567         (CASE_VECTOR_SHORTEN_MODE): Likewise.
2568         (CASE_VECTOR_SHORTEN_MODE1): Delete.
2569         (ADDR_VEC_ALIGN): Update.
2570         (ASM_OUTPUT_CASE_LABEL): Undefine.
2571         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2572         (TARGET_BI_BIH): Define.
2573         (DEFAULT_BRANCH_INDEX): Likewise.
2574         * config/arc/arc.md (casesi): Rework to accept BI/BIH
2575         instructions, remove compact_casesi use case.
2576         (casesi_compact_jump): Remove.
2577         (casesi_dispatch): New pattern.
2578         * config/arc/arc.opt: Add mbranch-index option. Deprecate
2579         compact_casesi option.
2580         * doc/invoke.texi: Document mbranch-index option.
2582 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2584         * config/arc/arc.c (arc_get_tp): Remove function.
2585         (arc_emit_call_tls_get_addr): Likewise.
2586         (arc_call_tls_get_addr): New function.
2587         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2588         * config/arc/arc.md (tls_load_tp_soft): Remove.
2589         (tls_gd_get_addr): Likewise.
2591 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2593         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2594         (mulsi3_600_lib): Remove pattern.
2595         (umulsi3_highpart_600_lib_le): Likewise.
2596         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2597         (umulsidi3): Remove call to umulsidi3_600_lib.
2598         (umulsidi3_600_lib): Remove pattern.
2599         (peephole2): Remove peephole using the above deprecated patterns.
2601 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2603         PR target/87374
2604         * config/arm/arm.c (arm_option_check_internal): Disable the combined
2605         use of -mslow-flash-data and -mword-relocations.
2606         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2607         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2608         flag_pic.
2609         * doc/invoke.texi (-mword-relocations): Mention conflict with
2610         -mslow-flash-data.
2611         (-mslow-flash-data): Reciprocally.
2613 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
2615         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2616         16-byte modes held in GP registers to use an even regno.
2618         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2619         (aarch64_atomic_ldop_supported_p): Remove.
2620         (aarch64_gen_atomic_ldop): Remove.
2621         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2622         Fully expand LSE operations here.
2623         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2624         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2625         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2626         and use ATOMIC_LDOP instead; use register_operand for the input;
2627         drop the split and emit insns directly.
2628         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2629         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2630         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2632         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2633         (aarch64_gen_atomic_ldop): Don't call it.
2634         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2635         Use aarch64_reg_or_zero.
2636         (aarch64_atomic_exchange<ALLI>): Likewise.
2637         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2638         operand 0; use aarch64_reg_or_zero for input; merge ...
2639         (@aarch64_atomic_swp<ALLI>): ... this and remove.
2641         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2642         (aarch64_split_compare_and_swap): Use it.
2643         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
2644         test oldval against the proper predicate.
2645         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2646         Use nonmemory_operand for expected.
2647         (cas_short_expected_pred): New.
2648         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2649         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2650         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2651         (aarch64_plushi_operand): New.
2653         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2654         Force oldval into the rval register for TARGET_LSE; emit the compare
2655         during initial expansion so that it may be deleted if unused.
2656         (aarch64_gen_atomic_cas): Remove.
2657         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2658         Change =&r to +r for operand 0; use match_dup for operand 2;
2659         remove is_weak and mod_f operands as unused.  Drop the split
2660         and merge with...
2661         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2662         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2663         (@aarch64_atomic_cas<GPI>): Similarly.
2665 2018-10-31  Richard Biener  <rguenther@suse.de>
2667         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2668         using ABSU_EXPR.
2670 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2672         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2673         * config/aarch64/aarch64.md: Include saphira.md
2674         * config/aarch64/saphira.md: New file for pipeline description.
2676 2018-10-30  Martin Sebor  <msebor@redhat.com>
2678         PR middle-end/87041
2679         * gimple-ssa-sprintf.c (format_directive): Use %G to include
2680         inlining context.
2681         (sprintf_dom_walker::compute_format_length):
2682         Avoid setting POSUNDER4K here.
2683         (get_destination_size): Handle null argument values.
2684         (get_user_idx_format): New function.
2685         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2686         functions, including user-defined with attribute format printf.
2687         Use %G to include inlining context.
2688         Set POSUNDER4K here.
2690 2018-10-30  Jan Hubicka  <jh@suse.cz>
2692         * params.def (lto-partitions): Bump from 32 to 128.
2694 2018-10-30  Jan Hubicka  <jh@suse.cz>
2696         * tree.c
2697         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2698         head in file.
2699         (free_lang_data_in_type): Forward declare.
2700         (fld_type_variant_equal_p): New function.
2701         (fld_type_variant): New function
2702         (fld_incomplete_types): New hash.
2703         (fld_incomplete_type_of): New function
2704         (fld_simplfied-type): New function.
2705         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2706         (free_lang_data): Allocate and free fld_incomplete_type; update call
2707         of free_lang_data_in_decl.
2709 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
2711         * gcov.c (output_lines): Remove duplicate line.
2713 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
2715         * config/rs6000/rs6000.md (bswapdi2): Force address into register
2716         if not in indexed or indirect form.
2717         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2718         (bswapdi2_store): Ditto.
2719         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2720         helper function.
2721         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2722         Prototype for helper function.
2724 2018-10-30  Martin Sebor  <msebor@redhat.com>
2726         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2727         (target, pragma GCC optimize, pragma GCC target): Ditto.
2729 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
2731         * doc/extend.texi: Fix prototype and description of
2732         __builtin_expect_with_probability.
2734 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
2736         * cgraph.h (clone_function_name_1): Replaced by new
2737           clone_function_name_numbered that takes name as string; for
2738           privatize_symbol_name_1 use only.
2739           (clone_function_name): Renamed to
2740           clone_function_name_numbered to be explicit about numbering.
2741           (clone_function_name): New two-argument function that does
2742           not number its output.
2743           (clone_function_name): New three-argument function that
2744           takes a number to append to its output.
2745         * cgraphclones.c (duplicate_thunk_for_node):
2746           (clone_function_name_1): Renamed.
2747           (clone_function_name_numbered): Two new functions.
2748           (clone_function_name): Improved documentation.
2749           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2750         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2751         * final.c (final_scan_insn_1): Use the new clone_function_name
2752           without numbering.
2753         * multiple_target.c (create_dispatcher_calls): Ditto.
2754           (create_target_clone): Ditto.
2755         * omp-expand.c (grid_expand_target_grid_body): Ditto.
2756         * omp-low.c (create_omp_child_function_name): Ditto.
2757         * omp-simd-clone.c (simd_clone_create): Ditto.
2758         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
2759           new clone_function_name without numbering.
2761 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
2763         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
2764         Assert that the allocation size is not zero.
2766 2018-10-30  Richard Biener  <rguenther@suse.de>
2768         PR tree-optimization/87800
2769         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
2770         non-induction or reduction PHIs.
2772 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
2774         * config/aarch64/falkor-tag-collision-avoidance.c
2775         (execute_tag_collision_avoidance): Call df_note_add_problem.
2777 2018-10-30  Martin Liska  <mliska@suse.cz>
2779         * doc/extend.texi: Fix typo in documentation
2780         of __builtin_expect_with_probability.
2782 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
2784         PR c++/87721
2785         * input.c (get_substring_ranges_for_loc): Detect if
2786         linemap_resolve_location gives us a NULL map, and reject
2787         this case.
2789 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
2791         * config.gcc (xstormy16-*-elf): Set tm_d_file.
2793 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
2794             Martin Sebor  <msebor@redhat.com>
2795             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2797         * doc/ux.texi (Quoting): New subsection, adapted from material at
2798         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
2799         MartinSebor and ManuelLopezIbanez.
2800         (Fix-it hints): Note that fix-it hints shouldn't be marked for
2801         translation.
2803 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
2805         PR middle-end/87469
2806         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
2807         max value.
2809 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
2811         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
2813 2018-10-29  Paul Koning  <ni1d@arrl.net>
2815         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
2817 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
2819         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
2820         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
2821         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
2822         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
2823         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
2824         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
2825         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
2826         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
2827         Change 'vector' to '__vector'.
2828         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
2829         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
2830         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
2831         _mm_avg_pu16): Likewise.  And, whitespace corrections.
2833 2018-10-29  Richard Biener  <rguenther@suse.de>
2835         PR tree-optimization/87785
2836         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
2837         internal defs.
2839 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2841         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2843 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2845         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
2846         ports configuration macro, defaults to "gnu".
2847         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
2848         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
2850 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2852         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
2854 2018-10-29  Richard Biener  <rguenther@suse.de>
2856         PR tree-optimization/87790
2857         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
2858         (vect_make_slp_decision): Adjust.
2859         (vect_slp_analyze_bb_1): Likewise.
2860         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
2861         edges.
2863 2018-10-29  Richard Biener  <rguenther@suse.de>
2865         PR tree-optimization/87785
2866         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
2867         and processing.
2868         (vect_build_slp_tree): Likewise.
2869         (vect_gather_slp_loads): New function.
2870         (vect_analyze_slp_instance): Gather loads separately from the
2871         SLP tree build.
2873 2018-10-29  Martin Liska  <mliska@suse.cz>
2875         * Makefile.in: Make dependency to json.o.
2876         * doc/gcov.texi: Document new JSON format, remove
2877         old intermediate format documentation.
2878         * gcov.c (struct function_info): Come up with m_name and
2879         m_demangled_name.
2880         (function_info::function_info): Initialize it.
2881         (function_info::~function_info): Release it.
2882         (main): Rename flag_intermediate_format to flag_json_format.
2883         (print_usage): Describe --json-format.
2884         (process_args): Set flag_json_format.
2885         (output_intermediate_line): Remove.
2886         (output_intermediate_json_line): Likewise.
2887         (get_gcov_intermediate_filename): Return new extension
2888         ".gcov.json.gz".
2889         (output_intermediate_file): Implement JSON emission.
2890         (output_json_intermediate_file): Implement JSON emission.
2891         (generate_results): Use ::get_name for function name.
2892         Handle JSON output file.
2893         (read_graph_file): Use ::get_name instead of cplus_demangle.
2894         (read_count_file): Likewise.
2895         (solve_flow_graph): Likewise.
2896         (add_line_counts): Likewise.
2897         (accumulate_line_counts): Use new flag_json_format.
2898         (output_function_details): Use ::get_name instead of cplus_demangle.
2899         (output_lines): Likewise.
2900         * json.cc (test_writing_literals): Add new tests.
2901         * json.h (class literal): Add new boolean constructor.
2903 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
2905         PR rtl-optimization/87701
2906         PR rtl-optimization/87780
2907         * combine.c (make_more_copies): Rewrite.
2909 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
2911         * doc/generic.texi (ABSU_EXPR): Document.
2912         * match.pd (absu(x)*absu(x) -> x*x): Handle.
2913         (absu(absu(X)) -> absu(X)): Likewise.
2914         (absu(-X) -> absu(X)): Likewise.
2915         (absu(X)  where X is nonnegative -> X): Likewise.
2917 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
2919         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
2920         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
2921         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
2922         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
2923         (s-tm-texi): Also check timestamp on d-target.def.
2924         (generated_files): Add TM_D_H and d-target-hooks-def.h.
2925         (build/genhooks.o): Also depend on D_TARGET_DEF.
2926         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
2927         variables.
2928         * config/aarch64/aarch64-d.c: New file.
2929         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
2930         Define.
2931         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
2932         prototype.
2933         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
2934         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
2935         * config/arm/arm-d.c: New file.
2936         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
2937         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
2938         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2939         * config/arm/t-arm (arm-d.o): New rule.
2940         * config/default-d.c: New file.
2941         * config/glibc-d.c: New file.
2942         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2943         * config/i386/i386-d.c: New file.
2944         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
2945         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
2946         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2947         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
2948         * config/i386/t-i386 (i386-d.o): New rule.
2949         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2950         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2951         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
2952         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2953         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2954         * config/mips/mips-d.c: New file.
2955         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
2956         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
2957         * config/mips/t-mips (mips-d.o): New rule.
2958         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2959         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2960         * config/powerpcspe/powerpcspe-d.c: New file.
2961         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
2962         New prototype.
2963         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2964         Support GNU D by using 0 as the language type.
2965         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
2966         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
2967         * config/riscv/riscv-d.c: New file.
2968         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
2969         prototype.
2970         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
2971         * config/riscv/t-riscv (riscv-d.o): New rule.
2972         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2973         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2974         * config/rs6000/rs6000-d.c: New file.
2975         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
2976         prototype.
2977         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2978         Support GNU D by using 0 as the language type.
2979         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
2980         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
2981         * config/s390/s390-d.c: New file.
2982         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
2983         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
2984         * config/s390/t-s390 (s390-d.o): New rule.
2985         * config/sparc/sparc-d.c: New file.
2986         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
2987         prototype.
2988         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
2989         * config/sparc/t-sparc (sparc-d.o): New rule.
2990         * config/t-glibc (glibc-d.o): New rule.
2991         * configure: Regenerated.
2992         * configure.ac (tm_d_file): New variable.
2993         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
2994         * doc/contrib.texi (Contributors): Add self for the D frontend.
2995         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
2996         * doc/install.texi (Configuration): Mention libphobos as an option for
2997         --enable-shared.  Mention d as an option for --enable-languages.
2998         (Testing): Mention check-d as a target.
2999         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
3000         name suffixes.  Mention d as a -x option.
3001         * doc/sourcebuild.texi (Top Level): Mention libphobos.
3002         * doc/standards.texi (Standards): Add section on D language.
3003         * doc/tm.texi: Regenerated.
3004         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
3005         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
3006         * dwarf2out.c (is_dlang): New function.
3007         (gen_compile_unit_die): Use DW_LANG_D for D.
3008         (declare_in_namespace): Return module die for D, instead of adding
3009         extra declarations into the namespace.
3010         (gen_namespace_die): Generate DW_TAG_module for D.
3011         (gen_decl_die): Handle CONST_DECLSs for D.
3012         (dwarf2out_decl): Likewise.
3013         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
3014         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
3015         kinds of aggregates.
3016         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
3017         * genhooks.c: Include d/d-target.def.
3019 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
3021         PR target/85669
3022         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
3023         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
3024         (STACK_DYNAMIC_OFFSET): Likewise.
3026 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
3028         PR target/80024
3029         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
3030         error message.
3032 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
3034         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
3035         return type and other typos.
3037 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
3039         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
3040         a shorter sequence with fewer branches.
3041         (emit_final_str_compare_gpr): Ditto.
3043 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
3045         * config/rs6000/tmmintrin.h: New file.
3046         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
3048 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
3050         * config/rs6000/mmintrin.h: Enable 32bit compilation.
3051         * config/rs6000/xmmintrin.h: Likewise.
3053 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
3055         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
3057 2018-10-26  Richard Biener  <rguenther@suse.de>
3059         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
3060         and wrapper.
3061         (vect_mark_slp_stmts_relevant): Likewise.
3062         (vect_detect_hybrid_slp_stmts): Likewise.
3063         (vect_bb_slp_scalar_cost): Likewise.
3064         (vect_remove_slp_scalar_calls): Likewise.
3066 2018-10-26  Jan Hubicka  <jh@suse.cz>
3068         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
3069         (warn_types_mismatch): Fix walk of DECL_NAME.
3070         (odr_types_equivalent_p): Fix overactive assert.
3072 2018-10-26  Richard Biener  <rguenther@suse.de>
3074         PR tree-optimization/87105
3075         * tree-vectorizer.h (_slp_tree::refcnt): New member.
3076         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
3077         refcnt.
3078         (vect_create_new_slp_node): Initialize refcnt to one.
3079         (bst_traits): Move.
3080         (scalar_stmts_set_t, bst_fail): Remove.
3081         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
3082         (vect_build_slp_tree): Add bst_map argument and lookup
3083         already created SLP nodes.
3084         (vect_print_slp_tree): Handle a SLP graph, print SLP node
3085         addresses.
3086         (vect_slp_rearrange_stmts): Handle a SLP graph.
3087         (vect_analyze_slp_instance): Adjust and free SLP nodes from
3088         the CSE map.  Fix indenting.
3089         (vect_schedule_slp_instance): Add short-cut.
3091 2018-10-26  Martin Liska  <mliska@suse.cz>
3093         PR testsuite/86158
3094         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
3095         addr_expr and not with pointers.
3097 2018-10-26  Jan Hubicka  <jh@suse.cz>
3099         * tree.c (free_lang_data_in_type): Only check main variants.
3100         * ipa-devirt.c (warn_odr): Make static.
3101         (types_same_for_odr): Drop strict variant.
3102         (types_odr_comparable): Likewise.
3103         (odr_or_derived_type_p): Look for main variants.
3104         (odr_name_hasher::equal): Cleanup comment.
3105         (odr_subtypes_equivalent): Add warn and warned arguments; check main
3106         variants.
3107         (type_variants_equivalent_p): break out from ...
3108         (odr_types_equivalent): ... here; go for main variants where needed.
3109         (warn_odr): ... here; turn static.
3110         (warn_types_mismatch): Compare mangled names of main variants.
3111         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
3112         (type_with_linkage_p): Sanity check that we look at main variant.
3113         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
3114         * tree.h (types_same_for_odr): Drop strict argument.
3116 2018-10-26  Richard Biener  <rguenther@suse.de>
3118         PR tree-optimization/87746
3119         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
3120         Simplify and fix WRT strided store groups with size not
3121         equal to step in element count.
3122         (vect_analyze_group_access_1): Dump the whole group.
3124 2018-10-25  Carl Love  <cel@us.ibm.com>
3126         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
3127         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
3128         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
3129         precicion entry for each overloaded builtin.
3130         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
3131         VSCEDPUO): Rename overloaded name.
3132         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
3133         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
3134         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
3135         define_expand for xscmpexqp instruction.
3136         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
3138 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3139             Jinsong Ji <jji@us.ibm.com>
3141         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
3142         function with vec_sl.
3143         (_mm_slli_epi32): Likewise.
3144         (_mm_slli_epi64): Likewise.
3145         (_mm_srai_epi16): Replace deprecated function with vec_sra.
3146         (_mm_srai_epi32): Likewise.
3147         (_mm_srli_epi16): Replace deprecated function with vec_sr.
3148         (_mm_srli_epi32): Likewise.
3149         (_mm_srli_epi64): Likewise.
3150         (_mm_sll_epi16): Replace deprecated function with vec_sl.
3151         (_mm_sll_epi32): Likewise.
3152         (_mm_sll_epi64): Likewise.
3153         (_mm_sra_epi16): Replace deprecated function with vec_sra.
3154         (_mm_sra_epi32): Likewise.
3155         (_mm_srl_epi16): Replace deprecated function with vec_sr.
3156         (_mm_srl_epi32): Likewise.
3157         (_mm_srl_epi64): Likewise.
3159 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3160             Jinsong Ji <jji@us.ibm.com>
3162         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
3163         comparison operators with vec_cmp* for compatibility due to
3164         unfortunate history; clean up formatting and use types more
3165         appropriately.
3166         (_mm_sll_epi32): Likewise.
3167         (_mm_sll_epi64): Likewise.
3168         (_mm_srl_epi16): Likewise.
3169         (_mm_srl_epi32): Likewise.
3170         (_mm_srl_epi64): Likewise.
3172 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3173             Jinsong Ji <jji@us.ibm.com>
3175         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
3176         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
3177         __vector __bool int.  Use vec_cmpgt in preference to deprecated
3178         function vec_vcmpgtfp.
3179         (_mm_max_ps): Likewise.
3181 2018-10-25  Jeff Law  <law@redhat.com>
3183         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
3184         if returning false.
3186 2018-10-25  Martin Sebor  <msebor@redhat.com>
3188         * doc/extend.texi (aligned): Expand attribute description.
3189         (Alignment): Rename section.  Discuss function arguments.
3191 2018-10-25  Jan Hubicka  <jh@suse.cz>
3193         * ipa-devirt.c (main_odr_variant): Remove.
3194         (hash_odr_name, types_same_for_odr, types_odr_comparable,
3195         odr_name_hasher::equal, odr_subtypes_equivalent_p):
3196         Drop use of main_odr_variant.
3197         (add_type_duplicate): Silence confused warnings on integer types.
3198         (get_odr_type): Always look for main variant.
3199         (register_odr_type): Simplify.
3201 2018-10-25  Richard Biener  <rguenther@suse.de>
3203         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
3204         Initialize ng to silence error with release checking bootstrap.
3206 2018-10-25  Richard Biener  <rguenther@suse.de>
3208         * tree-if-conv.c: Include tree-ssa-sccvn.h.
3209         (tree_if_conversion): Run CSE on the if-converted loop body.
3211 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
3213         * config/s390/constraints.md (ZL): New constraint.
3214         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
3215         operands.
3216         * config/s390/s390.md (movdi_larl): Remove.
3217         (movdi_64): Add the LARL alternative.
3219 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
3221         PR bootstrap/87747
3222         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3223         (RTX_CODE_HWINT_P): New macro.
3224         (rtx_code_size): Use RTX_CODE_HWINT_P ().
3226 2018-10-25  Jan Hubicka  <jh@suse.cz>
3228         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3229         is anonymous.
3231 2018-10-25  Richard Biener  <rguenther@suse.de>
3233         PR tree-optimization/87665
3234         PR tree-optimization/87745
3235         * tree-vectorizer.h (get_earlier_stmt): Remove.
3236         (get_later_stmt): Pick up UID from the original non-pattern stmt.
3238 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
3240         * options.texi (Deprecated): Move list to Var section.
3242 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
3243             Jinsong Ji <jji@us.ibm.com>
3245         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3246         __vector long to __vector long long.
3247         (_mm_cvtpd_ps): Likewise.
3248         (_mm_cvttpd_epi32): Likewise.
3249         (_mm_cvtpi32_pd): Likewise.
3250         (_mm_unpackhi_epi64): Likewise.
3251         (_mm_unpacklo_epi64): Likewise.
3253 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
3255         PR rtl-optimization/87720
3256         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3258 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
3260         * gimple-ssa-isolate-paths.c
3261         (find_implicit_erroneous_behavior): Do not change code if the
3262         pass is running for warnings only.
3263         (find_explicit_erroneous_behavior): Likewise.
3265 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
3267         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3268         Define as rs6000_mangle_decl_assembler_name.
3269         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3270         long double to IEEE long double, switch the names of the long
3271         double built-in functions to be <func>f128 instead of <func>l.
3273 2018-10-24  Martin Sebor  <msebor@redhat.com>
3275         * doc/extend.texi (nonnull): List no-argument form.  Reference
3276         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3278 2018-10-24  Richard Biener  <rguenther@suse.de>
3280         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3282 2018-10-24  Martin Liska  <mliska@suse.cz>
3284         PR tree-optimization/84436
3285         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3286         Remove.
3287         (switch_conversion::contains_linear_function_p): New.
3288         (switch_conversion::build_one_array): Support linear
3289         transformation on input.
3290         * tree-switch-conversion.h (struct switch_conversion): Add
3291         contains_linear_function_p declaration.
3293 2018-10-24  Richard Biener  <rguenther@suse.de>
3295         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3296         if its argument is CONSTANT_CLASS_P.
3298 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
3300         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3301         it is wrong for forward declarations.
3303 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3305         * config/s390/s390.c (s390_check_qrst_address): Add the missing
3306         SYMBOL_REF_P () check.
3308 2018-10-24  Richard Biener  <rguenther@suse.de>
3310         PR tree-optimization/87105
3311         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3312         dump classification.
3313         (vect_analyze_data_ref_accesses): Handle duplicate loads and
3314         stores by splitting the affected group after the fact.
3315         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3316         fail the SLP build because of size constraints.
3318 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3320         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3321         * configure: Regenerate.
3322         * config.in: Regenerate.
3323         * varasm.c (mergeable_string_section): Use readonly_data_section
3324         if linker doesn't support SHF_MERGE with alignment > 8.
3325         (mergeable_constant_section): Likewise.
3327 2018-10-24  Richard Biener  <rguenther@suse.de>
3329         PR tree-optimization/84013
3330         * tree-ssa-structalias.c (struct msdi_data): New struct for
3331         marshalling data to walk_stmt_load_store_ops.
3332         (maybe_set_dependence_info): Refactor as callback for
3333         walk_stmt_load_store_ops.
3334         (compute_dependence_clique): Set restrict info on all stmt kinds.
3336 2018-10-24  Martin Liska  <mliska@suse.cz>
3338         * cgraph.c (cgraph_node::dump):
3339         Remove reduntant dumps and make tp_first_run dump more compact.
3341 2018-10-24  Richard Biener  <rguenther@suse.de>
3343         PR tree-optimization/87665
3344         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3345         to reflect reality.
3347 2018-10-12  Jeff Law  <law@redhat.com>
3349         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3350         for H8/S.
3352 2018-10-23  Richard Biener  <rguenther@suse.de>
3354         * tree-vrp.c (add_assert_info): Guard dump_printf with
3355         dump_enabled_p.
3356         * gimple-ssa-evrp-analyze.c
3357         (evrp_range_analyzer::record_ranges_from_incoming_edge):
3358         Use value_range::ignore_equivs_equal_p.
3360 2018-10-23  Richard Biener  <rguenther@suse.de>
3362         PR tree-optimization/87105
3363         PR tree-optimization/87608
3364         * passes.def (pass_all_early_optimizations): Add early phi-opt
3365         after dce.
3366         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3367         addition to debug stmts.
3368         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3369         and abs replacement early.
3370         * tree-cfg.c (gimple_empty_block_p): Likewise.
3372 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
3374         PR target/86383
3375         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3376         specified to configure.
3377         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3379 2018-10-23  Richard Biener  <rguenther@suse.de>
3381         PR tree-optimization/87700
3382         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3384 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
3386         PR target/87674
3387         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3388         second argument from __mmask16 to __mmask8.
3389         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3390         _mm_mask_packs_epi32): Likewise.
3391         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3392         Likewise.
3393         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
3395 2018-10-23  Richard Biener  <rguenther@suse.de>
3397         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3399 2018-10-23  Richard Biener  <rguenther@suse.de>
3401         PR tree-optimization/86144
3402         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3403         over simd attribute.
3405 2018-10-23  Richard Biener  <rguenther@suse.de>
3407         PR tree-optimization/87693
3408         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3409         the case we do not find the taken edge.
3411 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
3412             Jinsong Ji  <jji@us.ibm.com>
3414         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3415         (_mm_store_pd): Use unaligned vector type for pointer cast.
3416         (_mm_maskmoveu_si128): Likewise.
3417         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3418         (_mm_store_ps): Use unaligned vector type for pointer cast.
3420 2018-10-22  Paul Koning  <ni1d@arrl.net>
3422         * symtab.c (symtab_node::increase_alignment): Correct max
3423         alignment check.
3425 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
3427         PR tree-optimization/87633
3428         * match.pd: Do not generate unordered integer comparisons.
3430 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
3432         PR rtl-optimization/87600
3433         * combine.c: Add include of expr.h.
3434         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3435         register to a pseudo.
3436         (make_more_copies): New function, add a copy to a new pseudo after
3437         the moves from hard registers into pseudos.
3438         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3439         later.  Call make_more_copies.
3441 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
3443         * lra-constraints.c (process_alt_operands): New local array,
3444         matching_early_clobber.  Check matching_early_clobber before
3445         decrementing reject, and set matching_early_clobber after.
3447 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
3449         PR target/87598
3450         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3451         call output_addr_const and hope for the best.
3453 2018-10-22  Richard Biener  <rguenther@suse.de>
3455         * gimple-ssa-evrp-analyze.c
3456         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3457         smarter about what ranges to use.
3458         * tree-vrp.c (add_assert_info): Dump here.
3459         (register_edge_assert_for_2): Instead of here at multiple but
3460         not all places.
3462         * gcc.dg/tree-ssa/evrp12.c: New testcase.
3463         * gcc.dg/predict-6.c: Adjust.
3464         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3465         * gcc.dg/tree-ssa/vrp02.c: Likewise.
3466         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3468 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
3469         Richard Biener  <rguenther@suse.de>
3471         * bitmap.h: Update data structure documentation, including a
3472         description of bitmap views as either linked-lists or splay trees.
3473         (struct bitmap_element_def): Update comments for splay tree bitmaps.
3474         (struct bitmap_head_def): Likewise.
3475         (bitmap_list_view, bitmap_tree_view): New prototypes.
3476         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3477         tree_form fields.
3478         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3479         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3480         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3481         released bitmap element here.
3482         (bitmap_element_free): Remove.
3483         (bitmap_elt_clear_from): Work on splay tree bitmaps.
3484         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
3485         this function similar ones such that linked-list bitmap implementation
3486         functions are grouped.
3487         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3488         and moved for grouping.
3489         (bitmap_list_insert_element_after): Renamed from
3490         bitmap_elt_insert_after, and moved for grouping.
3491         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3492         (bitmap_tree_link_left, bitmap_tree_link_right,
3493         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3494         bitmap_tree_link_element, bitmap_tree_unlink_element,
3495         bitmap_tree_find_element): New functions for splay-tree bitmap
3496         implementation.
3497         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3498         Renamed and moved, see above entries.
3499         (bitmap_tree_listify_from): New function to convert part of a splay
3500         tree bitmap to a linked-list bitmap.
3501         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3502         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3503         (bitmap_find_bit): Remove.
3504         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3505         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3506         Handle splay tree bitmaps.
3507         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3508         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3509         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3510         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3511         bitmap_intersect_compl_p, bitmap_ior_and_compl,
3512         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3513         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
3514         corresponding changes to use linked-list specific bitmap_element
3515         manipulation functions as applicable for efficiency.
3516         (bitmap_tree_to_vec): New function.
3517         (debug_bitmap_elt_file): New function split out from ...
3518         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
3519         (bitmap_print): Likewise.
3521         PR tree-optimization/63155
3522         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3523         SSA edge worklists.
3524         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3525         in tree-view.
3527 2018-10-22  Martin Liska  <mliska@suse.cz>
3529         PR tree-optimization/87686
3530         Revert
3531         2018-08-29  Martin Liska  <mliska@suse.cz>
3533         * tree-switch-conversion.c (switch_conversion::expand):
3534         Strenghten assumption about gswitch statements.
3536 2018-10-22  Martin Liska  <mliska@suse.cz>
3538         * ipa-icf.c (sem_item::compare_attributes): Remove.
3539         (sem_item::compare_referenced_symbol_properties): Use
3540         attribute_list_equal instead.
3541         (sem_function::equals_wpa): Likewise.
3542         * ipa-icf.h: Remove compare_attributes.
3544 2018-10-22  Richard Biener  <rguenther@suse.de>
3546         PR middle-end/87682
3547         * mem-stats.h (mem_usage::operator==): Fix pasto.
3549 2018-10-22  Richard Biener  <rguenther@suse.de>
3551         PR tree-optimization/87640
3552         * tree-vrp.c (set_value_range_with_overflow): Decompose
3553         incomplete result.
3554         (extract_range_from_binary_expr_1): Adjust.
3556 2018-10-22  Martin Jambor  <mjambor@suse.cz>
3558         * tree-eh.h (stmt_could_throw_p): Add function parameter.
3559         (stmt_can_throw_external): Likewise.
3560         (stmt_can_throw_internal): Likewise.
3561         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3562         (lower_eh_constructs_2): Likewise.
3563         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3564         (stmt_can_throw_external): Likewise.
3565         (stmt_can_throw_internal): Likewise.
3566         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3567         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3568         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3569         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3570         (pass_lower_eh_dispatch::execute): Pass cfun to
3571         stmt_can_throw_external.
3572         (cleanup_empty_eh): Likewise.
3573         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3574         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3575         stmt_can_throw_external instead of pushing it to cfun.
3576         (symbol_table::create_edge): Likewise.
3577         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3578         stmt_can_throw_internal.
3579         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3580         to stmt_could_throw_p.
3581         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3582         stmt_can_throw_internal.
3583         (pass_store_merging::execute): Likewise.
3584         * gimple-ssa-strength-reduction.c
3585         (find_candidates_dom_walker::before_dom_children): Pass cfun to
3586         stmt_could_throw_p.
3587         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3588         stmt_can_throw_internal.
3589         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3590         to stmt_can_throw_external.
3591         (check_stmt): Pass cfun to stmt_could_throw_p.
3592         (check_stmt): Pass cfun to stmt_can_throw_external.
3593         (pass_nothrow::execute): Likewise.
3594         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3595         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3596         stmt_can_throw_internal.
3597         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3598         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3599         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3600         * tree-complex.c (expand_complex_libcall): Pass cfun to
3601         stmt_could_throw_p and to stmt_can_throw_internal.
3602         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3603         * tree-inline.c (copy_edges_for_bb): Likewise.
3604         (maybe_move_debug_stmts_to_successors): Likewise.
3605         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3606         stmt_could_throw_p.
3607         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3608         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3609         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3610         stmt_can_throw_internal.
3611         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3612         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3613         stmt_could_throw_p.
3614         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3615         stmt_can_throw_internal.
3616         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3617         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3618         stmt_could_throw_p.
3619         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3620         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3621         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3622         (convert_mult_to_fma_1): Likewise.
3623         (convert_to_divmod): Likewise.
3624         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3625         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3626         * tree-ssa-propagate.c
3627         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3628         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3629         (maybe_optimize_range_tests): Likewise.
3630         (linearize_expr_tree): Likewise.
3631         (reassociate_bb): Likewise.
3632         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3633         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3634         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3635         (handle_char_store): Likewise.
3636         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3637         stmt_can_throw_internal.
3638         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3639         stmt_could_throw_p.
3640         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3641         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3642         (vectorizable_simd_clone_call): Likewise.
3643         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3644         (gimple_stringop_fixed_value): Likewise.
3646 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
3648         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3649         literal pool references.
3650         (s390_check_qrst_address): Adapt to the new behavior of
3651         s390_loadrelative_operand_p ().
3653 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3655         PR target/72782
3656         * config/i386/sse.md (*andnot<mode>3_bcst): New.
3658 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3660         PR target/72782
3661         * config/i386/sse.md (*<code><mode>3_bcst): New.
3663 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3665         PR target/72782
3666         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3667         V4DI, V16SI and V8DI.
3668         (*sub<mode>3<mask_name>_bcst): New.
3669         (*add<mode>3<mask_name>_bcst): Likewise.
3671 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
3672             Jinsong Ji  <jji@us.ibm.com>
3674         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3675         __m64 with __vector unsigned long long for compatibility.
3676         (_mm_movemask_epi8): Likewise.
3677         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3678         (_mm_cvttps_pi32): Likewise.
3679         (_mm_cvtpi32_ps): Likewise.
3680         (_mm_cvtps_pi16): Likewise.
3681         (_mm_loadh_pi): Likewise.
3682         (_mm_storeh_pi): Likewise.
3683         (_mm_movehl_ps): Likewise.
3684         (_mm_movelh_ps): Likewise.
3685         (_mm_loadl_pi): Likewise.
3686         (_mm_storel_pi): Likewise.
3687         (_mm_movemask_ps): Likewise.
3688         (_mm_shuffle_pi16): Likewise.
3690 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3692         PR target/72782
3693         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3694         __builtin_ia32_vfnmsubpd512_mask.
3695         (_mm512_mask_fnmsub_round_pd): Likewise.
3696         (_mm512_fnmsub_pd): Likewise.
3697         (_mm512_mask_fnmsub_pd): Likewise.
3698         (_mm512_maskz_fnmsub_round_pd): Use
3699         __builtin_ia32_vfnmsubpd512_maskz.
3700         (_mm512_maskz_fnmsub_pd): Likewise.
3701         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3702         (_mm512_mask_fnmsub_round_ps): Likewise.
3703         (_mm512_fnmsub_ps): Likewise.
3704         (_mm512_mask_fnmsub_ps): Likewise.
3705         (_mm512_maskz_fnmsub_round_ps): Use
3706         __builtin_ia32_vfnmsubps512_maskz.
3707         (_mm512_maskz_fnmsub_ps): Likewise.
3708         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3709         __builtin_ia32_vfnmsubpd256_mask.
3710         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3711         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3712         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3713         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3714         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3715         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3716         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3717         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3718         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3719         __builtin_ia32_vfnmsubpd.
3720         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3721         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3722         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3723         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3724         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3725         * config/i386/i386-builtin.def: Add
3726         __builtin_ia32_vfnmsubpd256_mask,
3727         __builtin_ia32_vfnmsubpd256_maskz,
3728         __builtin_ia32_vfnmsubpd128_mask,
3729         __builtin_ia32_vfnmsubpd128_maskz,
3730         __builtin_ia32_vfnmsubps256_mask,
3731         __builtin_ia32_vfnmsubps256_maskz,
3732         __builtin_ia32_vfnmsubps128_mask,
3733         __builtin_ia32_vfnmsubps128_maskz,
3734         __builtin_ia32_vfnmsubpd512_mask,
3735         __builtin_ia32_vfnmsubpd512_maskz,
3736         __builtin_ia32_vfnmsubps512_mask,
3737         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3738         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3739         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3740         __builtin_ia32_vfnmsubpd256.
3741         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3742         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3743         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3744         Likewise.
3745         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3746         Likewise.
3747         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3748         Likewise.
3749         (fmai_vmfnmsub_<mode><round_name>): Likewise.
3751 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3753         PR target/72782
3754         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3755         __builtin_ia32_vfnmaddpd512_mask.
3756         (_mm512_mask_fnmadd_round_pd): Likewise.
3757         (_mm512_fnmadd_pd): Likewise.
3758         (_mm512_mask_fnmadd_pd): Likewise.
3759         (_mm512_maskz_fnmadd_round_pd): Use
3760         __builtin_ia32_vfnmaddpd512_maskz.
3761         (_mm512_maskz_fnmadd_pd): Likewise.
3762         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
3763         (_mm512_mask_fnmadd_round_ps): Likewise.
3764         (_mm512_fnmadd_ps): Likewise.
3765         (_mm512_mask_fnmadd_ps): Likewise.
3766         (_mm512_maskz_fnmadd_round_ps): Use
3767         __builtin_ia32_vfnmaddps512_maskz.
3768         (_mm512_maskz_fnmadd_ps): Likewise.
3769         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
3770         __builtin_ia32_vfnmaddpd256_mask.
3771         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
3772         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
3773         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
3774         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3775         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3776         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
3777         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
3778         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
3779         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
3780         __builtin_ia32_vfnmaddpd.
3781         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
3782         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
3783         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
3784         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
3785         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
3786         * config/i386/i386-builtin.def: Add
3787         __builtin_ia32_vfnmaddpd256_mask,
3788         __builtin_ia32_vfnmaddpd256_maskz,
3789         __builtin_ia32_vfnmaddpd128_mask,
3790         __builtin_ia32_vfnmaddpd128_maskz,
3791         __builtin_ia32_vfnmaddps256_mask,
3792         __builtin_ia32_vfnmaddps256_maskz,
3793         __builtin_ia32_vfnmaddps128_mask,
3794         __builtin_ia32_vfnmaddps128_maskz,
3795         __builtin_ia32_vfnmaddpd512_mask,
3796         __builtin_ia32_vfnmaddpd512_maskz,
3797         __builtin_ia32_vfnmaddps512_mask,
3798         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
3799         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
3800         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
3801         __builtin_ia32_vfnmaddpd256.
3802         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
3803         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
3804         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
3805         Likewise.
3806         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
3807         Likewise.
3808         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
3809         Likewise.
3810         (fmai_vmfnmadd_<mode><round_name>): Likewise.
3812 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3814         PR target/72782
3815         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
3816         __builtin_ia32_vfmsubpd512_mask.
3817         (_mm512_mask_fmsub_round_pd): Likewise.
3818         (_mm512_fmsub_pd): Likewise.
3819         (_mm512_mask_fmsub_pd): Likewise.
3820         (_mm512_maskz_fmsub_round_pd): Use
3821         __builtin_ia32_vfmsubpd512_maskz.
3822         (_mm512_maskz_fmsub_pd): Likewise.
3823         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
3824         (_mm512_mask_fmsub_round_ps): Likewise.
3825         (_mm512_fmsub_ps): Likewise.
3826         (_mm512_mask_fmsub_ps): Likewise.
3827         (_mm512_maskz_fmsub_round_ps): Use
3828         __builtin_ia32_vfmsubps512_maskz.
3829         (_mm512_maskz_fmsub_ps): Likewise.
3830         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
3831         __builtin_ia32_vfmsubpd256_mask.
3832         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
3833         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3834         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
3835         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3836         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3837         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
3838         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
3839         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
3840         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
3841         __builtin_ia32_vfmsubpd.
3842         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
3843         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
3844         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
3845         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
3846         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
3847         * config/i386/i386-builtin.def: Add
3848         __builtin_ia32_vfmsubpd256_mask,
3849         __builtin_ia32_vfmsubpd256_maskz,
3850         __builtin_ia32_vfmsubpd128_mask,
3851         __builtin_ia32_vfmsubpd128_maskz,
3852         __builtin_ia32_vfmsubps256_mask,
3853         __builtin_ia32_vfmsubps256_maskz,
3854         __builtin_ia32_vfmsubps128_mask,
3855         __builtin_ia32_vfmsubps128_maskz,
3856         __builtin_ia32_vfmsubpd512_mask,
3857         __builtin_ia32_vfmsubpd512_maskz,
3858         __builtin_ia32_vfmsubps512_mask,
3859         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
3860         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
3861         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
3862         __builtin_ia32_vfmsubpd256.
3863         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
3864         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
3865         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
3866         Likewise.
3867         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
3868         Likewise.
3869         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
3870         Likewise.
3871         (fmai_vmfmsub_<mode><round_name>): Likewise.
3873 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3875         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
3876         Remove plus.  Renamed to ...
3877         (*sub<mode>3<mask_name>_bcst): This.
3878         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
3879         (*add<mode>3<mask_name>_bcst): This.
3881 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3883         PR target/72782
3884         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
3886 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3888         PR target/87662
3889         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
3890         (_mm_or_epi32): Likewise.
3891         (_mm256_xor_epi32): Likewise.
3892         (_mm_xor_epi32): Likewise.
3893         (_mm256_or_epi64): Likewise.
3894         (_mm_or_epi64): Likewise.
3895         (_mm256_xor_epi64): Likewise.
3896         (_mm_xor_epi64): Likewise.
3898 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
3900         PR target/72782
3901         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
3903 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
3905         PR middle-end/87647
3906         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
3908 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
3910         * doc/ux.texi: Move @section directly after @node.
3912 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
3914         PR middle-end/85488
3915         PR middle-end/87649
3916         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
3917         depend closely nested inside of loop with ordered clause with
3918         a parameter.
3920 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
3922         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
3923         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
3924         * doc/ux.texi: New file.
3926 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
3928         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
3929         be the first CR field allocated.
3931 2018-10-19  Richard Biener  <rguenther@suse.de>
3933         PR target/87657
3934         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
3935         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
3937 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
3939         PR target/72782
3940         * config/i386/sse.md
3941         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
3942         (*add<mode>3<mask_name>_bcst_2): Likewise.
3944 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
3946         * config/i386/sse.md
3947         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3948         Replace nonimmediate_operand with register_operand.
3949         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3950         Likewise.
3951         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3952         Likewise.
3954 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
3956         PR rtl-optimization/87596
3957         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
3958         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
3959         for instructions in FROM..TO range.
3961 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
3963         * cfgexpand.c (expand_one_var): Use specific wording in error message
3964         for non-local frame variables.
3965         * stor-layout.c (layout_decl): Do not issue a warning for them.
3967 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
3969         * haifa-sched.c (priority): Add force_recompute parameter.
3970         (apply_replacement): Call priority () with force_recompute = true.
3971         (restore_pattern): Likewise.
3973 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3975         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
3976         HOST_BITS_PER_WIDE_INT.
3977         (test_vector_ops_duplicate): Likewise.
3979 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3981         PR target/72782
3982         * config/i386/sse.md (VF_AVX512): New.
3983         (avx512bcst): Likewise.
3984         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3985         Likewise.
3986         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3987         Likewise.
3988         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3989         Likewise.
3991 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
3993         * doc/invoke.texi (-dumpversion): Improve grammar.
3994         (-dumpfullversion): Make more consistent with -dumpversion.
3996 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
3998         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
3999         Set JUMP_LABEL to the jump insn.
4000         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
4001         Predict emitted jump and add label to jump insn.
4003 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
4005         PR tree-optimization/87562
4006         * input.c (get_substring_ranges_for_loc): Use
4007         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
4008         getting the linemap for the endpoint.  Verify that it's either
4009         in the same linemap as the start point's spelling location, or
4010         at least in the same file.
4012 2018-10-18  Richard Biener  <rguenther@suse.de>
4014         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
4015         feed width-specific load/store costs through ix86_vec_cost.
4016         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
4017         (k8_cost): Likewise.
4018         (bdver_cost): Likewise.
4019         (znver1_cost): Likewise.
4020         (btver1_cost): Likewise.
4021         (btver2_cost): Likewise.
4023 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
4025         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
4026         to simplify subreg of vec_merge.
4028 2018-10-18  Richard Biener  <rguenther@suse.de>
4030         * config/i386/i386.c: Fix costing of vector FMA.
4032 2018-10-18  Richard Biener  <rguenther@suse.de>
4034         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
4035         and argument.
4036         (ix86_builtin_vectorization_cost): For vec_construct properly
4037         cost insertion into SSE regs.
4038         (...): Adjust calls to ix86_vec_cost.
4040 2018-10-18  Richard Biener  <rguenther@suse.de>
4042         PR middle-end/87087
4043         Revert
4044         2018-02-07  Richard Biener  <rguenther@suse.de>
4046         PR tree-optimization/84204
4047         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
4048         this place.
4050 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
4052         PR target/87537
4053         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
4054         of vec_duplicate.
4055         (test_vector_ops_duplicate): Add test for a scalar subreg of a
4056         VEC_MERGE of a VEC_DUPLICATE.
4058 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
4060         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
4061         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
4062         * doc/standards.texi (C Language): Document C2X.
4063         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
4064         (rl78_option_override): Handle "GNU C2X" language name.
4066 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
4068         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
4069         Document C17 as published in 2018.
4071 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
4073         PR middle-end/87623
4074         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
4075         bail out if both sides do not have the same storage order.
4077 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
4079         * bitmap.c (bitmap_head::dump): New.
4080         * bitmap.h (bitmap_head): Add dump().
4081         * gimple-ssa-evrp-analyze.c
4082         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
4083         (evrp_range_analyzer::set_ssa_range_info): Same.
4084         (evrp_range_analyzer::record_ranges_from_phis): Same.
4085         (evrp_range_analyzer::record_ranges_from_stmt): Same.
4086         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
4087         * gimple-ssa-sprintf.c (get_int_range): Same.
4088         (format_integer): Same.
4089         (sprintf_dom_walker::handle_gimple_call): Same.
4090         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
4091         (ipcp_vr_lattice::top_p): Same.
4092         (ipcp_vr_lattice::bottom_p): Same.
4093         (ipcp_vr_lattice::set_to_bottom): Same.
4094         (ipa_vr_operation_and_type_effects): Same.
4095         (propagate_vr_across_jump_function): Same.
4096         (ipcp_store_vr_results): Same.
4097         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
4098         (ipa_print_node_jump_functions_for_edge): Same.
4099         (ipa_get_value_range): Same.
4100         (ipa_compute_jump_functions_for_edge): Same.
4101         (ipa_write_jump_function): Same.
4102         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
4103         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4104         Same.
4105         * vr-values.c (set_value_range_to_nonnegative): Same.
4106         (set_value_range_to_truthvalue): Same.
4107         (vr_values::get_value_range): Same.
4108         (vr_values::set_defs_to_varying): Same.
4109         (vr_values::update_value_range): Same.
4110         (symbolic_range_based_on_p): Same.
4111         (vr_values::op_with_boolean_value_range_p): Same.
4112         (vr_values::extract_range_for_var_from_comparison_expr): Same.
4113         (vr_values::extract_range_from_ssa_name): Same.
4114         (vr_values::extract_range_from_binary_expr): Same.
4115         (vr_values::extract_range_from_unary_expr): Same.
4116         (vr_values::extract_range_from_cond_expr): Same.
4117         (vr_values::extract_range_from_comparison): Same.
4118         (vr_values::check_for_binary_op_overflow): Same.
4119         (vr_values::extract_range_basic): Same.
4120         (vr_values::extract_range_from_assignment): Same.
4121         (compare_ranges): Same.
4122         (compare_range_with_value): Same.
4123         (vr_values::adjust_range_with_scev): Same.
4124         (vrp_valueize): Same.
4125         (vrp_valueize_1): Same.
4126         (vr_values::get_vr_for_comparison): Same.
4127         (vr_values::compare_name_with_value): Same.
4128         (vr_values::compare_names): Same.
4129         (vr_values::vrp_evaluate_conditional): Same.
4130         (find_case_label_ranges): Same.
4131         (vr_values::vrp_visit_switch_stmt): Same.
4132         (vr_values::extract_range_from_phi_node): Same.
4133         (vr_values::simplify_div_or_mod_using_ranges): Same.
4134         (vr_values::simplify_bit_ops_using_ranges): Same.
4135         (test_for_singularity): Same.
4136         (range_fits_type_p): Same.
4137         (vr_values::simplify_cond_using_ranges_1): Same.
4138         (vr_values::simplify_switch_using_ranges): Same.
4139         (vr_values::simplify_float_conversion_using_ranges): Same.
4140         (vr_values::two_valued_val_range_p): Same.
4141         (vr_values::add_equivalence): Move to value_range::equiv_add.
4142         * vr-values.h (vr_values::add_equivalence): Remove.
4143         (VR_INITIALIZER): Remove.
4144         * tree-vrp.c (value_range::set): New.
4145         (value_range::equiv_add): New.
4146         (value_range::value_range): New.
4147         (value_range::deep_copy): New.
4148         (value_range::check): New.
4149         (value_range::equal_p): New.
4150         (value_range::ignore_equivs_equal_p): New.
4151         (value_range::operator==): New.
4152         (value_range::operator!=): New.
4153         (value_range::symbolic_p): New.
4154         (value_range::numeric_p): New.
4155         (value_range::set_undefined): New.
4156         (value_range::set_varying): New.
4157         (value_range::may_contain_p): New.
4158         (value_range::equiv_clear): New.
4159         (value_range::singleton_p): New.
4160         (value_range::intersect): New.
4161         (value_range::dump): New.
4162         (value_range::set_and_canonicalize): New.
4163         (set_value_range): Adjust for value_range API.
4164         (set_value_range_to_undefined): Same.
4165         (set_value_range_to_varying): Same.
4166         (set_and_canonicalize_value_range): Same.
4167         (set_value_range_to_nonnull): Same.
4168         (set_value_range_to_null): Same.
4169         (range_is_null): Same.
4170         (range_is_nonnull): Same.
4171         (range_int_cst_p): Same.
4172         (range_int_cst_singleton_p): Same.
4173         (symbolic_range_p): Same.
4174         (range_includes_zero_p): Same.
4175         (value_range_constant_singleton): Same.
4176         (vrp_set_zero_nonzero_bits): Same.
4177         (ranges_from_anti_range): Same.
4178         (extract_range_into_wide_ints): Same.
4179         (extract_range_from_multiplicative_op): Same.
4180         (set_value_range_with_overflow): Same.
4181         (extract_range_from_binary_expr_1): Same.
4182         (extract_range_from_unary_expr): Same.
4183         (dump_value_range): Same.
4184         (debug_value_range): Same.
4185         (vrp_prop::check_array_ref): Same.
4186         (vrp_prop::check_mem_ref): Same.
4187         (vrp_prop::vrp_initialize): Same.
4188         (vrp_prop::visit_stmt): Same.
4189         (intersect_ranges): Same.
4190         (vrp_prop::visit_phi): Same.
4191         (vrp_prop::vrp_finalize): Same.
4192         (determine_value_range_1): Same.
4193         (determine_value_range): Same.
4194         (vrp_intersect_ranges_1): Rename to...
4195         (vrp_intersect_1): this.
4196         (vrp_intersect_ranges): Rename to...
4197         (value_range::intersect_helper): ...this.
4198         (vrp_meet_1): Rename to...
4199         (value_range::union_helper): ...this.
4200         (vrp_meet): Rename to...
4201         (value_range::union_): ...this.
4202         (copy_value_range): Remove.
4203         * tree-vrp.h (struct value_range): Rewrite into a proper class.
4204         (value_range::vrtype): New.
4205         (value_range::type): New.
4206         (value_range::equiv): New.
4207         (value_range::min): New.
4208         (value_range::max): New.
4209         (value_range::varying_p): New.
4210         (value_range::undefined_p): New.
4211         (value_range::null_p): New.
4212         (value_range::equiv_add): New.
4213         (copy_value_range): Remove.
4215 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
4217         * Makefile.in (SELFTEST_TARGETS): New.
4218         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
4219         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4220         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4221         c/Make-lang.in.
4222         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4223         (selftest-c++-gdb, selftest-c++-valgrind): Move to
4224         cp/Make-lang.in.
4225         * configure: Regenerate.
4226         * configure.ac (selftest_languages): New.
4228 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
4230         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4231         overflow wraps argument.
4232         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4233         wide_int_range_multiplicative_op.
4234         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4235         overflow wraps argument.
4236         (wide_int_range_multiplicative_op): Same.
4237         (wide_int_range_lshift): Same.
4238         (wide_int_range_div): Same.
4239         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4240         (wide_int_range_lshift): Same.
4241         (wide_int_range_div): Same.
4243 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
4245         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4246         use sign as argument.
4247         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4248         wide_int_range_shift_undefined_p.
4250 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4252         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4253         Rename to...
4254         (@despeculate_copy<ALLI_TI:mode>): ... This.
4255         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4256         switch statement.
4258 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4260         * config.gcc: Obsolete *-*-solaris2.10*.
4261         * doc/install.texi (Specific, *-*-solaris2*): Document it.
4263 2018-10-12  Jeff Law  <law@redhat.com>
4265         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4266         reg + sym +- const_int addressing modes.
4268 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
4270         * common.opt (fdiagnostics-minimum-margin-width=): New option.
4271         * diagnostic-show-locus.c (layout::layout): Apply the minimum
4272         margin width.
4273         (layout::start_annotation_line): Only print up to 3 of the
4274         margin character, to avoid touching the left-hand side.
4275         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4276         minimum margin width, as set by test_diagnostic_context's ctor.
4277         (selftest::test_fixit_insert_containing_newline): Likewise.
4278         (selftest::test_fixit_insert_containing_newline_2): Likewise.
4279         (selftest::test_line_numbers_multiline_range): Clear
4280         dc.min_margin_width.
4281         * diagnostic.c (diagnostic_initialize): Initialize
4282         min_margin_width.
4283         * diagnostic.h (struct diagnostic_context): Add field
4284         "min_margin_width".
4285         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4286         * opts.c (common_handle_option): Handle
4287         OPT_fdiagnostics_minimum_margin_width_.
4288         * selftest-diagnostic.c
4289         (selftest::test_diagnostic_context::test_diagnostic_context):
4290         Initialize min_margin_width to 6.
4291         * toplev.c (general_init): Initialize global_dc->min_margin_width.
4293 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
4295         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4296         Fix usage of "error_at_rich_loc" in the comment.
4298 2018-10-15  Renlin Li  <renlin.li@arm.com>
4300         PR target/87563
4301         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4302         if-conversioned loop when it contains ifn with types not
4303         supported by backend.
4304         * internal-fn.c (expand_direct_optab_fn): Add an assert.
4305         (direct_internal_fn_supported_p): New helper function.
4306         * internal-fn.h (direct_internal_fn_supported_p): Declare.
4308 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
4310         PR target/87572
4311         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4312         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4313         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4315 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
4317         PR tree-optimization/87022
4318         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4319         bits in dist vector rather than the first one.
4321 2018-10-15  Richard Biener  <rguenther@suse.de>
4323         PR middle-end/87610
4324         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4325         (visit_loadstore): When a used restrict tag escaped verify that
4326         the points-to solution of "other" pointers do not include
4327         escaped.
4328         (compute_dependence_clique): If a used restrict tag escaped
4329         communicated that down to visit_loadstore.
4331 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
4333         * config/s390/s390.c (s390_expand_vec_init): Force vector element
4334         into reg if it isn't a general operand.
4336 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
4338         PR target/87599
4339         * config/i386/sse.md (*vec_dupv2di): Add register source to
4340         movddup.
4342 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
4344         PR target/87572
4345         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4346         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4347         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4348         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4350 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
4352         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4353         (notice_args_size): Set it in the current trace if no insn that can
4354         throw internally has been seen yet.
4355         (connect_traces): When connecting args_size between traces, allow the
4356         incoming values not to match if there is an insn setting it before the
4357         first insn that can throw internally; in that case, force the creation
4358         of a CFI note on this latter insn.
4360 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
4362         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4363         the base class, because using the injected-class-name was not clearly
4364         specified until DR 176.
4366 2018-10-12  Paul Koning  <ni1d@arrl.net>
4368         * config/pdp11/pdp11.md (doloop_end): New expander.
4369         (doloop_end_insn): renamed from "doloop_end".
4370         (addqi3): New pattern.
4371         (subqi3): New pattern.
4372         * config/pdp11/predicates.md (incdec_operand): New predicate.
4374 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
4376         PR middle-end/81376
4377         * real.c (format_helper::can_represent_integral_type_p): New function
4378         * real.h (format_helper::can_represent_integral_type_p): Ditto.
4379         * match.pd: New pattern.
4381 2018-10-12  Alexandre Oliva <oliva@adacore.com>
4383         * configure.ac: Introduce --enable-large-address-aware
4384         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4385         * doc/install.texi: Document it.
4386         * configure, config.in: Rebuilt.
4387         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4388         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4389         (LINK_SPEC): Insert it.
4390         * config/i386/mingw-w64.h: Likewise.
4392         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4394 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
4396         PR rtl-optimization/87600
4397         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4399 2018-10-12  Paul Koning  <ni1d@arrl.net>
4401         * doc/md.texi (doloop_end): Document that the pattern code may
4402         need to check operand mode.
4404 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
4406         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4407         to zero-extend between int and floating-point registers.
4408         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4409         ldp into floating-point registers.  Add type and arch attributes.
4410         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4411         Use f_loads for type attribute.
4413 2018-10-11  Martin Sebor  <msebor@redhat.com>
4415         * doc/extend.texi (attribute packed): Correct typos.
4417 2018-10-11  Martin Sebor  <msebor@redhat.com>
4419         * doc/extend.texi (attribute flatten): Mention interaction with
4420         noinline.
4422 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
4424         PR target/87156
4425         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4426         Set new_decl virtual flag to zero.
4428 2018-10-11  Martin Sebor  <msebor@redhat.com>
4430         PR middle-end/87593
4431         * doc/extend.texi (attribute format_arg): Discuss using multiple
4432         attributes on a single function.
4434 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
4436         PR tree-optimization/86829
4437         * match.pd (sin (atan (x))): New simplification rules.
4438         (cos (atan (x))): Likewise.
4439         * real.c (build_sinatan_real): New function.
4440         * real.h (build_sinatan_real): Prototype.
4442 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
4444         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4445         function.
4446         (fold_mergeeo_helper): New helper function.
4447         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4448         intrinsics.  Correct some whitespace indentation issues.
4450 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
4452         PR target/87511
4453         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4454         Use HOST_WIDE_INT_1U for shift.
4456 2018-10-11  Doug Rupp  <rupp@adacore.com>
4457             Olivier Hainque  <hainque@adacore.com>
4459         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4460         Pass --relax to the linker for RTPs.
4461         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4463 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
4464             Jan Hubicka  <jh@suse.cz>
4465             Martin Jambor  <mjambor@suse.cz>
4467         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4468         the same elements are repeated rather than printing all of them.
4469         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4470         "repeated" elements.
4471         * read-rtl-function.c (test_loading_repeat): New function.
4472         (read_rtl_function_c_tests): Call test_loading_repeat.
4473         * rtl-tests.c (test_dumping_repeat): New function.
4474         (rtl_tests_c_tests): Call test_dumping_repeat.
4476 2018-10-11  Richard Biener  <rguenther@suse.de>
4478         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4479         bdver?_cost): Unify to ...
4480         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4481         * config/i386/i386.c (processor_cost_table): Adjust.
4483 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
4485         PR middle-end/87574
4486         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4487         the thunk when expanding to GIMPLE.
4489 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4491         * varasm.c (mergeable_string_section): Don't try to move zero-length
4492         strings to the merge section.
4494 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
4496         PR target/87573
4497         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4499 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
4501         PR target/87550
4502         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4503         to special_args set.
4505 2018-10-10  Richard Biener  <rguenther@suse.de>
4507         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4508         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4509         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4510         and recursing and pattern terminating the recursion on SSE
4511         vector width using ix86_expand_reduc.
4512         (reduc_sminmax_scal_<mode>): Split into part reducing to half
4513         width and recursing and SSE2 vector variant doing the final
4514         reduction with ix86_expand_reduc.
4515         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4516         with terminating the recursion at AVX level, splitting that
4517         to SSE there.
4519 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
4521         * genmatch.c (error_cb): Rename to...
4522         (diagnostic_cb): ...this, converting int params to enums.
4523         (fatal_at): Update for renaming.
4524         (warning_at): Likewise.
4525         (main): Likewise.
4526         * input.c (selftest::ebcdic_execution_charset::apply):
4527         Update for renaming of...
4528         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4529         to...
4530         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4531         converting level and reason to enums.
4532         (class selftest::lexer_error_sink): Rename to...
4533         (class selftest::lexer_test_options): ...this, renaming field
4534         "m_errors" to "m_diagnostics".
4535         (selftest::lexer_test_options::apply): Update for renaming of...
4536         (selftest::lexer_test_options::on_error): ...this, renaming to...
4537         (selftest::lexer_test_options::on_diagnostic): ...this
4538         converting level and reason to enums.
4539         (selftest::test_lexer_string_locations_raw_string_unterminated):
4540         Update for renamings.
4541         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4542         "reason".
4544 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
4546         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4547         * config/rs6000/pmmintrin.h: New file.
4549 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
4551         PR tree-optimization/86659
4552         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4554 2018-10-09  Richard Biener  <rguenther@suse.de>
4556         PR tree-optimization/63155
4557         * tree-ssa-structalias.c: Include tree-ssa.h.
4558         (get_constraint_for_ssa_var): For undefs return nothing_id.
4559         (find_func_aliases): Cleanup PHI handling.
4561 2018-10-09  Richard Biener  <rguenther@suse.de>
4563         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4564         replacements.
4566 2018-10-09  Martin Liska  <mliska@suse.cz>
4568         * asan.c (asan_emit_stack_protection): If a stack variable
4569         is located in a same file as current function, then emit
4570         line info into variable definition string.
4572 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4574         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4575         information.
4577 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4579         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4580         on the thunk.
4582 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4584         PR tree-optimization/86659
4585         * gimple-match.h (struct gimple_match_op): Add reverse field.
4586         (gimple_match_op::set_op): New overloaded method.
4587         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4588         the REF_REVERSE_STORAGE_ORDER flag on the value.
4589         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4590         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4591         
4592 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
4594         PR middle-end/63155
4595         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4596         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4598 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
4600         PR target/87517
4601         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4602         Defined with __builtin_ia32_vfmaddsubpd512_mask.
4604 2018-10-08  Richard Biener  <rguenther@suse.de>
4606         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4607         cost the same as AVX128 ones.
4609 2018-10-08  Paul Koning  <ni1d@arrl.net>
4611         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4612         (expand_block_move): New function.
4613         * config/pdp11/pdp11.c (output_block_move): Remove.
4614         (expand_block_move): New function.
4615         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4616         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4617         (*movmemhi1): Remove.
4619 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
4621         * config/s390/2827.md: Increase latencies for some FP instructions.
4623 2018-10-08  Richard Biener  <rguenther@suse.de>
4625         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4626         Open a dump scope.
4627         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4628         * tree-vectorizer.h (dump_stmt_cost): Adjust.
4629         (add_stmt_cost): Dump return value of the hook.
4631 2018-10-08  Richard Biener  <rguenther@suse.de>
4633         PR tree-optimization/63155
4634         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4635         (ssa_propagation_engine::ssa_propagate): Remove redundant
4636         bitmap bit clearing.
4638 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
4640         PR rtl-optimization/86939
4641         PR rtl-optimization/87479
4642         * ira.h (non_conflicting_reg_copy_p): New prototype.
4643         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4644         (make_hard_regno_dead): Don't add conflicts for register
4645         ignore_reg_for_conflicts.
4646         (make_object_dead): Likewise.
4647         (non_conflicting_reg_copy_p): New function.
4648         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4649         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4650         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4651         (make_hard_regno_dead): Don't add conflicts for register
4652         ignore_reg_for_conflicts.  Remove special conflict handling of
4653         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
4654         check_pic_pseudo_p and update callers.
4655         (mark_pseudo_dead): Don't add conflicts for register
4656         ignore_reg_for_conflicts.
4657         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4659 2018-10-05  Andrew Waterman  <andrew@sifive.com>
4660             Jim Wilson  <jimw@sifive.com>
4662         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4663         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
4664         new pattern using HONOR_SNANS that emits one extra instruction.
4666 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
4668         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4669         patterns): Merge SI and DI patterns to a GPR pattern.
4670         (unnamed define_insn and define_split for record form of that): Merge
4671         to a single define_insn_and_split pattern.
4673 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
4675         PR c++/56856
4676         * input.c (expand_location_to_spelling_point): Add param "aspect"
4677         and use rather than hardcoding LOCATION_ASPECT_CARET.
4678         (get_substring_ranges_for_loc): Handle the case of a single token
4679         within a macro expansion.
4680         * input.h (expand_location_to_spelling_point): Add "aspect" param,
4681         defaulting to LOCATION_ASPECT_CARET.
4683 2018-10-05  Paul Koning  <ni1d@arrl.net>
4685         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4686         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4687         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4688         (pdp11_guard_type): New function.
4690 2018-10-05  Paul Koning  <ni1d@arrl.net>
4692         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4693         * config/pdp11/pdp11.opt (mfloat32): Remove.
4694         (mfloat64): Remove.
4695         * doc/invoke.texi (pdp11 -mfloat32): Remove:
4696         (pdp11 -mfloat64): Remove.
4698 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4700         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4701         (*cmp<mode>_cc_i387): Ditto.
4702         (*cmpu<mode>_cc_i387): Ditto.
4703         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4704         * config/i386/i386.c (ix86_expand_fp_compare): Remove
4705         "scratch" argument.
4706         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4707         Emit x86_sahf_1 pattern.
4708         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4709         (ix86_expand_carry_flag_compare): Ditto.
4711 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4713         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4714         to reg_or_0_operand.  Add "C" constraint.
4715         (*cmpxf_cc_i387): Ditto.
4716         (*cmp<mode>_i387): Change operand 2 predicate
4717         to nonimm_or_0_operand.  Add "C" constraint.
4718         (*cmp<mode>_cc_i387): Ditto.
4719         (*cmp<mode>_0_i387): Remove insn pattern.
4720         (*cmp<mode>_0_cc_i387): Ditto.
4722 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4724         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4725         * config/i386/predicates.md (nonimm_or_0_operand): Rename
4726         from vector_move_operand.  Update all uses.
4728 2018-10-05  Martin Sebor  <msebor@redhat.com>
4730         PR tree-optimization/87490
4731         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4732         consistently.
4734 2018-10-05  Richard Biener  <rguenther@suse.de>
4736         PR tree-optimization/63155
4737         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4738         vertical space in dumpfiles.
4739         * tree-ssa-propagate.h
4740         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4741         * tree-ssa-propagate.c (cfg_blocks_back): New global.
4742         (ssa_edge_worklist_back): Likewise.
4743         (curr_order): Likewise.
4744         (cfg_blocks_get): Remove abstraction.
4745         (cfg_blocks_add): Likewise.
4746         (cfg_blocks_empty_p): Likewise.
4747         (add_ssa_edge): Add to current or next worklist based on
4748         RPO index.
4749         (add_control_edge): Likewise.
4750         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4751         into ...
4752         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
4753         iteration from CFG and SSA edge worklist so we process
4754         everything in RPO order, prioritizing forward progress
4755         over iteration.
4756         (ssa_prop_init): Allocate new worklists, do not dump
4757         immediate uses.
4758         (ssa_prop_fini): Free new worklists.
4760 2018-10-05  Richard Biener  <rguenther@suse.de>
4762         * tree-core.h (tree_block::abstract_flag): Remove.
4763         (tree_block::block_num): Make full 32bits.
4764         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
4765         * tree.h (BLOCK_ABSTRACT): Remove.
4766         * dwarf2out.c (gen_lexical_block_die): Remove dead code
4767         resulting from BLOCK_ABSTRACT being always false.
4768         (gen_inlined_subroutine_die): Likewise.
4769         (gen_block_die): Likewise.
4770         * tree.c (block_ultimate_origin): Likewise.
4771         * tree-pretty-print.c (dump_block_node): Remove code dealing
4772         with BLOCK_ABSTRACT.
4773         * tree-ssa-live.c (dump_scope_block): Likewise.
4774         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
4775         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
4777 2018-10-05   Richard Biener  <rguenther@suse.de>
4779         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
4780         is asked for initialize mode to the component mode of the
4781         vector type.
4783 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
4785         PR target/87522
4786         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
4787         assembler for -mavx.
4788         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
4790 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
4792         PR target/87509
4793         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
4794         RS6000_BTM_DFP.
4795         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
4796         to be DImode.  When using mffscrn, force the operand to a register.
4798 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
4800         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
4801         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
4802         X87MODEF mode iterator.
4803         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
4804         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
4805         X87MODEF mode iterator.
4807 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
4809         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
4810         -Wno-prio-ctor-dtor.
4812 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
4814         * Makefile.in (OBJS): Add opt-problem.o.
4815         * dump-context.h: Include "selftest.h.
4816         (selftest::temp_dump_context): New forward decl.
4817         (class dump_context): Make friend of class
4818         selftest::temp_dump_context.
4819         (dump_context::dump_loc_immediate): New decl.
4820         (class dump_pretty_printer): Move here from dumpfile.c.
4821         (class temp_dump_context): Move to namespace selftest.
4822         (temp_dump_context::temp_dump_context): Add param
4823         "forcibly_enable_dumping".
4824         (selftest::verify_dumped_text):
4825         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
4826         (selftest::verify_item):
4827         (ASSERT_IS_TEXT): Move here from dumpfile.c.
4828         (ASSERT_IS_TREE): Likewise.
4829         (ASSERT_IS_GIMPLE): Likewise.
4830         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
4831         to...
4832         (dump_context::dump_loc_immediate): ...this new function.
4833         (class dump_pretty_printer): Move to dump-context.h.
4834         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
4835         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
4836         (temp_dump_context::temp_dump_context): Move to "selftest"
4837         namespace.  Add param "forcibly_enable_dumping", and use it to
4838         conditionalize the use of m_pp;
4839         (selftest::verify_dumped_text): Make non-static.
4840         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
4841         (selftest::verify_item): Make non-static.
4842         (ASSERT_IS_TEXT): Move to dump-context.h.
4843         (ASSERT_IS_TREE): Likewise.
4844         (ASSERT_IS_GIMPLE): Likewise.
4845         (selftest::test_capture_of_dump_calls): Pass "true" for new
4846         param of temp_dump_context.
4847         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
4848         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
4849         TDF_COMPARE_DEBUG.
4850         * opt-problem.cc: New file.
4851         * opt-problem.h: New file.
4852         * optinfo-emit-json.cc
4853         (selftest::test_building_json_from_dump_calls): Pass "true" for
4854         new param of temp_dump_context.
4855         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
4856         (optinfo::emit_for_opt_problem): New function.
4857         (optinfo::emit): Clarity which emit_item is used.
4858         * optinfo.h (optinfo::get_dump_location): New accessor.
4859         (optinfo::emit_for_opt_problem): New decl.
4860         (optinfo::emit): Make const.
4861         * selftest-run-tests.c (selftest::run_tests): Call
4862         selftest::opt_problem_cc_tests.
4863         * selftest.h (selftest::opt_problem_cc_tests): New decl.
4864         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
4865         bool to opt_result, converting fprintf messages to
4866         opt_result::failure_at calls.  Add "stmt" param for use by the
4867         failure_at calls.
4868         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
4869         (runtime_alias_check_p): Convert return type from bool to
4870         opt_result, converting dump_printf calls to
4871         opt_result::failure_at, using the statement DDR_A for their
4872         location.
4873         (find_data_references_in_stmt): Convert return type from bool to
4874         opt_result, converting "return false" to opt_result::failure_at
4875         with a new message.
4876         * tree-data-ref.h: Include "opt-problem.h".
4877         (dr_analyze_innermost): Convert return type from bool to opt_result,
4878         and add a const gimple * param.
4879         (find_data_references_in_stmt): Convert return type from bool to
4880         opt_result.
4881         (runtime_alias_check_p): Likewise.
4882         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
4883         dr_analyze_innermost.
4884         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
4885         Convert return type from bool to opt_result, adding a message for
4886         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
4887         (vect_analyze_data_ref_dependence): Convert return type from bool
4888         to opt_result.  Change sense of return type from "false"
4889         effectively meaning "no problems" to "false" meaning a problem,
4890         so that "return false" becomes "return opt_result::success".
4891         Convert "return true" calls to opt_result::failure_at, using
4892         the location of statement A rather than vect_location.
4893         (vect_analyze_data_ref_dependences): Convert return type from bool
4894         to opt_result.
4895         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
4896         calls to opt_result::failure_at, using the stmt location rather
4897         than vect_location.
4898         (vect_verify_datarefs_alignment): Convert return type from bool
4899         to opt_result.
4900         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
4901         into multiple more-tightly-scoped copies.
4902         (vect_analyze_data_refs_alignment): Convert return type from bool
4903         to opt_result.
4904         (vect_analyze_data_ref_accesses): Likewise, converting a
4905         "return false" to a "return opt_result::failure_at", adding a
4906         new message.
4907         (vect_prune_runtime_alias_test_list): Convert return type from
4908         bool to opt_result, converting dump_printf_loc to
4909         opt_result::failure_at.  Add a %G to show the pertinent statement,
4910         and use the stmt's location rather than vect_location.
4911         (vect_find_stmt_data_reference): Convert return type from
4912         bool to opt_result, converting dump_printf_loc to
4913         opt_result::failure_at, using stmt's location.
4914         (vect_analyze_data_refs):  Convert return type from bool to
4915         opt_result.  Convert "return false" to "return
4916         opt_result::failure_at", adding messages as needed.
4917         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
4918         type from bool to opt_result.
4919         (vect_determine_vf_for_stmt): Likewise.
4920         (vect_determine_vectorization_factor): Likewise, converting
4921         dump_printf_loc to opt_result::failure_at, using location of phi
4922         rather than vect_location.
4923         (vect_analyze_loop_form_1): Convert return type from bool to
4924         opt_result, converting dump_printf_loc calls, retaining the use of
4925         vect_location.
4926         (vect_analyze_loop_form): Convert return type from loop_vec_info
4927         to opt_loop_vec_info.
4928         (vect_analyze_loop_operations): Convert return type from bool to
4929         opt_result, converting dump_printf_loc calls, using the location
4930         of phi/stmt rather than vect_location where available.  Convert
4931         various "return false" to "return opt_result::failure_at" with
4932         "unsupported phi" messages.
4933         (vect_get_datarefs_in_loop): Convert return type from bool to
4934         opt_result.  Add a message for the
4935         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
4936         (vect_analyze_loop_2): Convert return type from bool to
4937         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
4938         each "goto again;", adding new messages where needed.
4939         Add "unsupported grouped {store|load}" messages.
4940         (vect_analyze_loop): Convert return type from loop_vec_info to
4941         opt_loop_vec_info.
4942         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
4943         bool to opt_result.
4944         * tree-vect-stmts.c (process_use): Likewise, converting
4945         dump_printf_loc call and using stmt location, rather than
4946         vect_location.
4947         (vect_mark_stmts_to_be_vectorized): Likeise.
4948         (vect_analyze_stmt): Likewise, adding a %G.
4949         (vect_get_vector_types_for_stmt): Convert return type from bool to
4950         opt_result, converting dump_printf_loc calls and using stmt
4951         location, rather than vect_location.
4952         (vect_get_mask_type_for_stmt): Convert return type from tree to
4953         opt_tree, converting dump_printf_loc calls and using stmt location.
4954         * tree-vectorizer.c: Include "opt-problem.h.
4955         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
4956         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
4957         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
4958         enabled, use it to report at the top level "couldn't vectorize
4959         loop" followed by the problem.
4960         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
4961         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
4962         to opt_result.
4963         (vect_analyze_stmt): Likewise.
4964         (vect_get_vector_types_for_stmt): Likewise.
4965         (tree vect_get_mask_type_for_stmt): Likewise.
4966         (vect_analyze_data_ref_dependences): Likewise.
4967         (vect_enhance_data_refs_alignment): Likewise.
4968         (vect_analyze_data_refs_alignment): Likewise.
4969         (vect_verify_datarefs_alignment): Likewise.
4970         (vect_analyze_data_ref_accesses): Likewise.
4971         (vect_prune_runtime_alias_test_list): Likewise.
4972         (vect_find_stmt_data_reference): Likewise.
4973         (vect_analyze_data_refs): Likewise.
4974         (vect_analyze_loop): Convert return type from loop_vec_info to
4975         opt_loop_vec_info.
4976         (vect_analyze_loop_form): Likewise.
4977         (vect_analyze_slp): Convert return type from bool to opt_result.
4979 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
4981         * doc/invoke.texi (-fopt-info): Document new "internals"
4982         sub-option.
4983         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
4984         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
4985         MSG_ALL_KINDS.
4986         (optinfo_verbosity_options): Add "internals".
4987         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
4988         (dump_context::apply_dump_filter_p): New member function.
4989         (dump_context::dump_loc): Use apply_dump_filter_p rather than
4990         explicitly masking the dump_kind.
4991         (dump_context::begin_scope): Increment the scope depth first.  Use
4992         apply_dump_filter_p rather than explicitly masking the dump_kind.
4993         (dump_context::emit_item): Use apply_dump_filter_p rather than
4994         explicitly masking the dump_kind.
4995         (dump_dec): Likewise.
4996         (dump_hex): Likewise.
4997         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
4998         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
4999         (opt_info_switch_p): Update handling of default
5000         MSG_OPTIMIZED_LOCATIONS to cope with default of
5001         MSG_PRIORITY_USER_FACING.
5002         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
5003         masking the dump_kind.
5004         (selftest::test_capture_of_dump_calls): Update test_dump_context
5005         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
5006         than MSG_ALL.  Generalize scope test to be run at all four
5007         combinations of with/without MSG_PRIORITY_USER_FACING and
5008         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
5009         for each of the two values.
5010         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
5011         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
5012         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
5013         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
5014         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
5015         with MSG_PRIORITY_*.
5016         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
5017         dump messages as MSG_PRIORITY_USER_FACING.
5018         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
5019         about the interaction with MSG_PRIORITY_*.
5021 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5023         * varasm.c (output_constant): Add new parameter merge_strings.
5024         Make strings properly zero terminated in merge string sections.
5025         (mergeable_string_section): Don't fail if the last char is non-zero.
5026         (assemble_variable_contents): Handle merge string sections.
5027         (assemble_variable): Likewise.
5028         (assemble_constant_contents): Likewise.
5029         (output_constant_def_contents): Likewise.
5030         (output_constructor_array_range,
5031         output_constructor_regular_field): Adjust call to output_constant.
5032         (output_object_block): Adjust call to assemble_constant_contents
5033         and assemble_variable_contents.
5035 2018-10-04  Martin Liska  <mliska@suse.cz>
5037         PR c/87483
5038         * cgraphunit.c (process_function_and_variable_attributes):
5039         Warn about a function with alias attribute and a body.
5041 2018-10-04  Martin Liska  <mliska@suse.cz>
5043         PR ipa/82625
5044         * multiple_target.c (redirect_to_specific_clone): New function.
5045         (ipa_target_clone): Use it.
5046         * tree-inline.c: Fix comment.
5048 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
5050         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
5051         fields.
5052         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
5053         (gcc::dump_manager::register_pass): New member function, adapted
5054         from loop body in gcc::pass_manager::register_pass, adding a
5055         call to update_dfi_for_opt_info.
5056         (gcc::dump_manager::opt_info_enable_passes): Store the
5057         -fopt-info options into the new fields.  Move the loop
5058         bodies into...
5059         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
5060         function.
5061         * dumpfile.h (struct opt_pass): New forward decl.
5062         (gcc::dump_manager::register_pass): New decl.
5063         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
5064         (class gcc::dump_manager): Add fields "m_optgroup_flags",
5065         "m_optinfo_flags", and "m_optinfo_filename".
5066         * passes.c (gcc::pass_manager::register_pass): Move all of the
5067         dump-handling code to gcc::dump_manager::register_pass.
5069 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
5071         PR rtl-optimization/87466
5072         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
5073         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
5074         * doc/tm.texi: Regenerate.
5075         * ira-lives.c (process_bb_node_lives): Use the new target hook.
5076         * lra-lives.c (process_bb_lives): Likewise.
5077         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
5078         Define.
5080 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
5082         * params.c (add_params): Fix initialization.
5084 2018-10-04  Martin Liska  <mliska@suse.cz>
5086         PR gcov-profile/84107
5087         * tree-profile.c (init_ic_make_global_vars):
5088         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
5089         Come up with new ic_tuple* variables.  Emit
5090         __gcov_indirect_call{,_topn} variables.
5091         (gimple_gen_ic_profiler): Access the variable
5092         and emit gimple.
5093         (gimple_gen_ic_func_profiler): Access
5094         __gcov_indirect_call.callee field.
5095         (gimple_init_gcov_profiler): Use ptr_type_node.
5096         * value-prof.c (gimple_ic): Use ptr_type_node.
5098 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5100         PR tree-optimization/85787
5101         * ipa-pure-const.c (malloc_candidate_p_1): Move most of
5102         malloc_candidate_p into this function and add support for
5103         detecting multiple phis.
5104         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
5106 2018-10-04  Martin Liska  <mliska@suse.cz>
5108         PR ipa/87491
5109         * ipa-inline.c (inline_to_all_callers_1):
5110         Call ultimate_alias_target for node being inlined.
5112 2018-10-03  Jeff Law  <law@redhat.com>
5114         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
5115         target's wchar_t.
5116         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
5117         * tree.h (get_typenode_from_name): Prototype.
5119 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
5121         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
5122         Change operand 2 predicate to nonimmediate_operand.
5123         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5125 2018-10-03  Martin Sebor  <msebor@redhat.com>
5126             Jeff Law  <law@redhat.com>
5128         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
5129         initialize it.
5130         (get_string_length): Detect unterminated arrays.
5131         (format_string): Same.
5132         (format_directive): Warn about unterminated arrays.
5133         (handle_gimple_call): Mark statements with no_warning as needed.
5135 2018-10-03  Jim Wilson  <jimw@sifive.com>
5137         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
5138         also define __riscv_abi_rve.  Delete trailing white space.
5140 2018-10-03  Paul Koning  <ni1d@arrl.net>
5142         Enable LRA register allocator for PDP11.
5143         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
5144         (R): Likewise.
5145         (D): Likewise.
5146         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
5147         * config/pdp11/pdp11.opt (-mlra): New option.
5148         * doc/invoke.texi (PDP-11 Options): Document -mlra.
5150 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
5152         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
5153         (*<absneg:code>extend<mode>xf2): Ditto.
5155 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
5157         PR tree-optimization/87415
5158         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
5159         precision fields.
5161 2018-10-02  Jeff Law  <law@redhat.com>
5163         * gimple-fold.c (get_range_strlen): Only set *nonstr when
5164         an unterminated string is discovered.  Bubble up range
5165         even for unterminated strings.
5166         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
5167         indicates the string was not terminated via NONSTR.
5169 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
5171         * tree-vrp.c (extract_range_from_unary_expr): Special case all
5172         pointer conversions.
5173         Do not do anything special for anti-ranges.
5175 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
5177         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
5178         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
5180 2018-10-03  Martin Liska  <mliska@suse.cz>
5182         PR gcov-profile/86109
5183         * coverage.c (coverage_begin_function): Do not
5184         mark lambdas as artificial.
5185         * tree-core.h (struct GTY): Remove tm_clone_flag
5186         and introduce new lambda_function.
5187         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
5189 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
5191         PR target/87474
5192         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
5193         P8_VECTOR and VSX are enabled.
5195 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
5197         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
5198         0x3907 as CPU model number.
5200 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
5202         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
5203         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
5204         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
5205         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
5206         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
5207         * config/s390/s390.md: Likewise. Rename also the cpu attribute
5208         value from arch12 to z14.
5210 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
5212         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
5213         (isinfxf2): Ditto.
5214         (isinf<mode>2): Ditto.
5216 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
5218         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
5219         before emitting fxam.  Perform calculations in XFmode.
5221 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
5223         * match.pd (((X /[ex] A) +- B) * A): New transformation.
5225 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
5227         PR middle-end/87319
5228         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5229         * tree.c (signed_or_unsigned_type_for): Handle complex.
5231 2018-10-02  Jeff Law  <law@redhat.com>
5233         * gimple-fold.c (get_range_strlen): Remove dead code.
5235 2018-10-02  Martin Sebor  <msebor@redhat.com>
5236             Jeff Law  <law@redhat.com>
5238         * builtins.c (unterminated_array): Add new arguments.
5239         If argument is not terminated, bubble up size and exact
5240         state to callers.
5241         (expand_builtin_strnlen): Detect, avoid expanding
5242         and diagnose unterminated arrays.
5243         (c_strlen): Fill in offset of start of unterminated strings.
5244         * builtins.h (unterminated_array): Update prototype.
5246 2018-10-02  Richard Biener  <rguenther@suse.de>
5248         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5249         of haddv4df, first reduce to SSE width and exploit the fact
5250         that we only need element zero with the reduction result.
5251         (reduc_plus_scal_v2df): Likewise.
5253 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
5255         * dojump.h (do_jump): Delete.
5256         (do_jump_1): Likewise.
5257         (split_comparison): Move around.
5258         * dojump.c (do_jump): Make static.
5259         (do_jump_1): Likewise.
5260         (jumpifnot): Move around.
5261         (jumpifnot_1): Likewise.
5262         (jumpif): Likewise.
5263         (jumpif_1): Likewise.
5264         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5266 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
5268         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5269         insns in the delay slot and add_insn_after for the jump insn.
5271 2018-10-02  Richard Biener  <rguenther@suse.de>
5273         * tree-inline.c (expand_call_inline): Use the location of
5274         the callee declaration for the inline-entry marker.
5275         * final.c (notice_source_line): Remove special-casing of
5276         NOTE_INSN_INLINE_ENTRY.
5278 2018-10-01  Carl Love  <cel@us.ibm.com>
5280         PR 69431
5281         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5282         (__builtin_mtfsb0): New.
5283         (__builtin_mtfsb1): New.
5284         ( __builtin_set_fpscr_rn): New.
5285         (__builtin_set_fpscr_drn): New.
5286         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5287         (rs6000_expand_set_fpscr_rn_builtin): Add.
5288         (rs6000_expand_set_fpscr_drn_builtin): Add.
5289         (rs6000_expand_builtin): Add case statement entries for
5290         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5291         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5292         RS6000_BUILTIN_MFFSL.
5293         (rs6000_init_builtins): Add ftype initialization and def_builtin
5294         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5295         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5296         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5297         rs6000_mffscdrn): Add define_insn.
5298         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5299         * doc/extend.texi: Add documentation for the builtins.
5301 2018-10-01  Richard Biener  <rguenther@suse.de>
5303         PR tree-optimization/87465
5304         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5305         causing branch miscounts.
5307 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5309         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5310         aarch64_option_default_param):  New.
5311         (params.h): Include.
5312         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5313         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5314         stack-clash protection validation code.
5316 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5318         * params.c (validate_param): New.
5319         (add_params): Use it.
5320         (set_param_value): Refactor param validation into validate_param.
5321         (diagnostic.h): Include.
5322         * diagnostic.h (diagnostic_ready_p): New.
5324 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5326         * params.c (set_param_value):
5327         Add index of parameter being validated.
5328         * common/common-target.def (option_validate_param): New.
5329         * common/common-targhooks.h (default_option_validate_param): New.
5330         * common/common-targhooks.c (default_option_validate_param): New.
5331         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5332         * doc/tm.texi: Regenerate.
5334 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5336         PR target/86486
5337         * config/aarch64/aarch64.c (aarch64_override_options_internal):
5338         Add validation for stack-clash parameters and set defaults.
5340 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5342         PR target/86486
5343         * configure.ac: Add stack-clash-protection-guard-size.
5344         * doc/install.texi: Document it.
5345         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5346         * params.def: Update comment for guard-size.
5347         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5348         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5349         * configure: Regenerate.
5351 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5353         PR target/86486
5354         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5355         STACK_DYNAMIC_OFFSET): New.
5356         * config/aarch64/aarch64.c (aarch64_layout_frame):
5357         Update outgoing args size.
5358         (aarch64_stack_clash_protection_alloca_probe_range,
5359         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5361 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5363         PR target/86486
5364         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5365         probe ranges.
5366         * target.def (stack_clash_protection_alloca_probe_range): New.
5367         (stack_clash_protection_final_dynamic_probe): Remove.
5368         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5369         (default_stack_clash_protection_final_dynamic_probe): Remove.
5370         * targhooks.c: Likewise.
5371         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5372         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5373         * doc/tm.texi: Regenerate.
5375 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5377         PR target/86486
5378         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5379         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5380         aarch64_clamp_to_uimm12_shift): New.
5381         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5382         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5384 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5386         PR target/86486
5387         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5389 2018-10-01  Jeff Law  <law@redhat.com>
5390             Richard Sandiford <richard.sandiford@linaro.org>
5391             Tamar Christina  <tamar.christina@arm.com>
5393         PR target/86486
5394         * config/aarch64/aarch64.md
5395         (probe_stack_range): Add k (SP) constraint.
5396         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5397         STACK_CLASH_MAX_UNROLL_PAGES): New.
5398         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5399         stack probes for stack clash.
5400         (aarch64_allocate_and_probe_stack_space): New.
5401         (aarch64_expand_prologue): Use it.
5402         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5403         (aarch64_sub_sp): Add emit_move_imm optional param.
5405 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
5407         PR tree-optimization/87261
5408         * match.pd: Remove trailing whitespace.
5409         Add (x & y) | ~(x | y) -> ~(x ^ y),
5410         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5412 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
5414         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5415         constraints.
5416         (ashlsi3_insn): Update instruction constraints.
5417         (ashrsi3_insn): Likewise.
5418         (rotrsi3): Likewise.
5419         (add_shift): Likewise.
5420         * config/arc/constraints.md (Csz): New 32 bit constraint. It
5421         avoids placing in the limm field small constants which, otherwise,
5422         could end into a small instruction.
5424 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
5426         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5427         destination register is not odd-even.
5428         (umaddsidi4_split): Likewise.
5430 2018-10-01  Richard Biener  <rguenther@suse.de>
5432         * tree-inline.c (expand_call_inline): Store origin of fn
5433         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5434         * tree.c (block_ultimate_origin): Simplify and do some
5435         checking.
5437 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
5439         * config/i386/mmx.md (EMMS): New int iterator.
5440         (emms): New int attribute.
5441         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5442         EMMS int iterator.  Explicitly declare clobbers.
5443         (mmx_emms): Remove expander.
5444         (mmx_femms): Ditto.
5445         * config/i386/predicates.md (emms_operation): Remove predicate.
5446         (vzeroall_pattern): New predicate.
5447         (vzeroupper_pattern): Rename from vzeroupper_operation.
5448         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5449         vzeroupper_pattern and vzeroall_pattern predicates.
5451 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
5453         PR rtl-optimization/86939
5454         * ira-lives.c (make_hard_regno_born): Rename from this...
5455         (make_hard_regno_live): ... to this.  Remove update to conflict
5456         information.  Update function comment.
5457         (make_hard_regno_dead): Add conflict information update.  Update
5458         function comment.
5459         (make_object_born): Rename from this...
5460         (make_object_live): ... to this.  Remove update to conflict information.
5461         Update function comment.
5462         (make_object_dead):  Add conflict information update.  Update function
5463         comment.
5464         (mark_pseudo_regno_live): Call make_object_live.
5465         (mark_pseudo_regno_subword_live): Likewise.
5466         (mark_hard_reg_dead): Update function comment.
5467         (mark_hard_reg_live): Call make_hard_regno_live.
5468         (process_bb_node_lives): Likewise.
5469         * lra-lives.c (make_hard_regno_born): Rename from this...
5470         (make_hard_regno_live): ... to this.  Remove update to conflict
5471         information.  Remove now uneeded check_pic_pseudo_p argument.
5472         Update function comment.
5473         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5474         to conflict information.  Update function comment.
5475         (mark_pseudo_live): Remove update to conflict information.  Update
5476         function comment.
5477         (mark_pseudo_dead): Add conflict information update.
5478         (mark_regno_live): Call make_hard_regno_live.
5479         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5480         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5482 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
5484         PR target/87370
5485         * config/i386/i386.c (construct_container): Use TImode for
5486         BLKmode values in 2 integer registers.
5488 2018-09-29  Jeff Law  <law@redhat.com>
5490         * builtins.c (unterminated_array): Pass in c_strlen_data * to
5491         c_strlen rather than just a tree *.
5492         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5493         Update recursive calls appropriately.  If caller did not provide a
5494         suitable data pointer, create a local one.  When a non-terminated
5495         string is discovered, bubble up information about the string via the
5496         c_strlen_data object.
5497         * builtins.h (c_strlen): Update prototype.
5498         (c_strlen_data): New structure.
5499         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5500         For a type 2 call, if c_strlen indicates a non-terminated string
5501         use the length of the non-terminated string.
5502         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5504 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
5506         PR target/87467
5507         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5508         __m512d type for __A argument rather than __m512.
5510 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
5512         * match.pd (simple_comparison): Don't optimize if either operand is
5513         a function pointer when target needs function pointer canonicalization.
5515 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5517         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5518         power5 .. power9 to remove indirection.
5519         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5520         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5521         ASM_CPU_476_SPEC): Delete.
5522         (ASM_CPU_SPEC): Adjust.
5523         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5524         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5526 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5528         * config.in: Delete HAVE_AS_DCI.
5529         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5530         * config/rs6000/rs6000.h: Ditto.
5531         * configure.ac: Delete HAVE_AS_DCI.
5532         * configure: Regenerate.
5534 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5536         * config.in (HAVE_AS_LWSYNC): Delete.
5537         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5538         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5539         do it as a .long .
5540         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5541         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5542         as a .long .
5543         * configure.ac: Delete HAVE_AS_LWSYNC.
5544         * configure: Regenerate.
5546 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
5547             Pierre-Marie de Rodat  <derodat@adacore.com>
5549         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5550         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5551         (cgraph_node::create_thunk): Add indirect_offset parameter.
5552         (thunk_adjust): Likewise.
5553         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5554         and initialize the corresponding field with it.
5555         (cgraph_node::dump): Dump indirect_offset field.
5556         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5557         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5558         (thunk_adjust): Add indirect_offset parameter and deal with it.
5559         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5560         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
5561         or if the thunk is external or local.  Fix formatting.  Do not chain
5562         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
5563         if any, in the GIMPLE representation.
5564         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5565         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5566         (input_node): Read indirect_offset field.
5567         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5568         call to thunk_adjust.
5569         * tree-nested.c (struct nesting_info): Add thunk_p field.
5570         (create_nesting_tree): Set it.
5571         (convert_all_function_calls): Copy static chain from targets to thunks.
5572         (finalize_nesting_tree_1): Return early for thunks.
5573         (unnest_nesting_tree_1): Do not finalize thunks.
5574         (gimplify_all_functions): Do not gimplify thunks.
5576 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
5578         * opt-suggestions.c (option_proposer::build_option_suggestions):
5579         Release "option_values".
5581 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
5583         * coverage.c (get_coverage_counts): Convert problem-reporting dump
5584         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5585         * dumpfile.c (kind_as_string): New function.
5586         (dump_loc): Rather than a hardcoded prefix of "note: ", use
5587         kind_as_string to vary the prefix based on dump_kind.
5588         (selftest::test_capture_of_dump_calls): Update for above.
5590 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
5592         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5593         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
5595 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
5597         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5598         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5599         INVALID_REGNUM instead of FPSR_REG.
5600         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5601         * config/i386/i386.md: Update comment of FP compares.
5602         (fldenv): Do not clobber FPSR_REG.
5604 2018-09-28  Richard Biener  <rguenther@suse.de>
5606         * tree.h (BLOCK_ORIGIN): New.
5607         * omp-expand.c (grid_expand_target_grid_body): Assign
5608         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5609         * tree-inline.c (remap_block): Likewise.
5610         * auto-profile.c (get_function_decl_from_block): Simplify
5611         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5612         * langhooks.c (lhd_print_error_function): Likewise.
5613         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5614         Likewise.
5615         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5616         * tree.c (block_nonartificial_location): Likewise.
5617         (block_ultimate_origin): Likewise.
5618         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
5619         no longer needed LTO case.
5621 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
5622             Jan Hubicka  <jh@suse.cz>
5623             Martin Jambor  <mjambor@suse.cz>
5625         * simplify-rtx.c (simplify_merge_mask): New function.
5626         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5627         same masks are used in op1 or op2.
5628         (test_vec_merge): New function.
5629         (test_vector_ops): Call test_vec_merge.
5631 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
5633         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5634         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5635         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5636         (cypress_costs): Set it.
5637         (supersparc_costs): Likewise.
5638         (hypersparc_costs): Likewise.
5639         (leon_cost): Likewise.
5640         (leon3_costs): Likewise.
5641         (sparclet_costs): Likewise.
5642         (ultrasparc_costs): Likewise.
5643         (ultrasparc_costs): Likewise.
5644         (niagara_costs): Likewise.
5645         (niagara2_costs): Likewise.
5646         (niagara3_costs): Likewise.
5647         (niagara4_costs): Likewise.
5648         (niagara7_costs): Likewise.
5649         (m8_costs): Likewise.
5650         (TARGET_CAN_FOLLOW_JUMP): Define.
5651         (pass_work_around_errata::gate): Minor tweak.
5652         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5653         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5654         Automaitcally clear MASK_FSMULD mask for V7 processors.
5655         (sparc_can_follow_jump): New static function.
5656         (output_ubranch): Deal with CROSSING_JUMP_P.
5657         (sparc_use_sched_lookahead): Rewrite using switch statement.
5658         (sparc_issue_rate): Reorder.
5659         (sparc_branch_cost): New function.
5661 2018-09-27  Martin Sebor  <msebor@redhat.com>
5663         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5664         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5665         (int_fits_type_p): Same.
5667 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
5669         * config/i386/i386.md (FPCR_REG): Remove.
5670         (UNSPEC_FLDCW): Remove.
5671         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5672         (x86_fldcw_1): Remove insn pattern.
5673         (fnstenv): Do not clobber FPCR_REG.
5674         (fldenv): Ditto.
5675         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5676         (CALL_USED_REGISTERS): Ditto.
5677         (REG_ALLOC_ORDER): Ditto.
5678         (REG_CLASS_CONTENTS): Ditto.
5679         (HI_REGISTER_NAMES): Ditto.
5680         (ADDITIONAL_REGISTER_NAMES): Use defines instead
5681         of numerical constants.
5682         * config/i386/i386.c (regclass_map): Remove fpsr register.
5683         (dbx_register_map): Ditto.
5684         (dbx64_register_map): Ditto.
5685         (svr4_dbx_register_map): Ditto.
5686         (print_reg): Do not handle FPCR_REG.
5688 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
5690         PR target/87149
5691         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5692         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5693         Delete, always treat as true.
5694         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5695         Ditto.  Simplify remaining code.
5696         * config/powerpcspe/powerpcspe.h: Ditto.
5697         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5698         Simplify remaining code.
5699         (rs6000_expand_builtin): Ditto.
5700         * config/rs6000/rs6000.h: Ditto.
5701         * configure.ac: Ditto.
5702         * configure: Regenerate.
5704 2018-09-27  Martin Liska  <mliska@suse.cz>
5706         * coverage.c (get_coverage_counts): Revert the formatting
5707         of missing profile opt info.
5709 2018-09-27  Richard Biener  <rguenther@suse.de>
5711         PR debug/37801
5712         PR debug/87440
5713         * dwarf2out.c (set_block_origin_self): Do not mark outermost
5714         block as we do not output that.
5715         (gen_inlined_subroutine_die): Elide the originally outermost
5716         block, matching what we do for concrete instances.
5717         (decls_for_scope): Add parameter specifying whether to recurse
5718         to subblocks.
5720 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
5721             Tom de Vries  <tom@codesourcery.com>
5723         PR 82089
5725         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5726         STORE_FLAG_VALUE == 1.
5728 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
5730         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5731         constant definitions.
5732         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5733         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5734         ("speculation_barrier"): New expander definition.
5736 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
5738         PR gcov-profile/86957
5739         * common.opt: New warning option -Wmissing-profile.
5740         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5741         * doc/invoke.texi: Document -Wmissing-profile.
5743 2018-09-26  Jim Wilson  <jimw@sifive.com>
5745         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5746         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5748 2018-09-26  Martin Sebor  <msebor@redhat.com>
5750         * tree.c (zerop): Change return type to bool.
5751         (integer_zerop, integer_onep, integer_each_onep): Same.
5752         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5753         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5754         (real_onep, real_minus_onep, chain_index): Same.
5755         (print_type_hash_statistics, type_list_equal): Same.
5756         * tree.h (zerop): Same.
5757         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
5758         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5759         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5760         (real_onep, real_minus_onep, chain_index): Same.
5761         (print_type_hash_statistics, type_list_equal): Same.
5763 2018-09-26  Jim Wilson  <jimw@sifive.com>
5765         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
5767 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
5769         PR target/87414
5770         * config/i386/i386.c: Include debug.h and dwarf2out.h.
5771         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
5772         call.
5774 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
5776         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
5778 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
5780         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
5781         and FP_SECOND_SSE_REGS.
5782         (REG_CLASS_NAMES): Ditto.
5783         (REG_CLASS_CONTENTS): Ditto.
5784         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
5785         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
5786         (ix86_preferred_output_reload_class): Ditto.
5787         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
5788         clobber constraint to "=&f".
5789         (fix_truncdi_i387): Ditto.
5790         (lrintxfdi2): Ditto.
5791         (fistdi2_<rounding>): Ditto.
5792         (fpremxf4_i387): Change "=u" constraint to "=f".
5793         (fprem1xf4_i387): Ditto.
5794         (sincosxf3): Ditto.
5795         (fptanxf4_i387): Ditto.
5796         (fxtractxf3_i387): Ditto.
5797         (fscalexf4_i387): Ditto.
5798         (atan2xf3): Change "u" constraint to "f".
5799         (fyl2xxf3_i387): Ditto.
5800         (fyl2xp1xf3_i387): Ditto.
5802 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
5804         PR target/87439
5805         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
5806         for removed I387_MASK_PM entity.
5809 2018-09-26  Jeff Law  <law@redhat.com>
5810         Revert
5811         2018-09-26  Alexey Neyman  <stilor@att.net>
5813         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5814         headers are no longer pulled in by <isl/val.h>.
5816 2018-09-26  Richard Biener  <rguenther@suse.de>
5818         PR debug/87443
5819         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
5820         or concrete instance DIE to the tree.  Create abstract origin
5821         attributes also for concrete instances.
5823 2018-09-26  Alexey Neyman  <stilor@att.net>
5825         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5826         headers are no longer pulled in by <isl/val.h>.
5828 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
5830         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
5831         Use new helper functions.
5832         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
5833         Use new helper functions.
5834         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
5835         aarch_mm_needs_release): New declarations.
5836         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
5837         aarch_mm_needs_release): New.
5839 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
5841         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
5842         (arm32_output_mi_thunk): Deal with long calls.
5844 2018-09-26  Richard Biener  <rguenther@suse.de>
5846         PR debug/87428
5847         PR debug/87362
5848         * tree-inline.c (expand_call_inline): When the location
5849         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
5850         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
5851         the inserted BLOCK to make inlined_function_outer_scope_p
5852         recognize it.
5853         * dwarf2out.c (add_call_src_coords_attributes): Do not add
5854         coords for reserved locations.
5856 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5858         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
5859         (*call_indirect_nonlocal_sysv<mode>): Ditto.
5860         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
5861         (*sibcall_nonlocal_sysv<mode>): Ditto.
5862         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
5863         (<bd>_<mode>): Ditto.
5864         (<bd>tf_<mode>): Ditto.
5866 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5868         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
5869         control string as a list of templates instead of as C code.
5870         (*altivec_movti): Ditto.
5871         * config/rs6000/darwin.md (movdf_low_di): Ditto.
5873 2018-09-25  Jim Wilson  <jimw@sifive.com>
5875         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
5876         when target symbol is weak.
5878 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5880         PR c/87387
5881         * builtins.c (unterminated_array): Simplify.
5882         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
5883         where pointer arithmetic is safe.
5885 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5887         PR target/86987
5888         * config/rs6000/altivec.md (altivec_vspltb): Use
5889         const_0_to_15_operand instead of u5bit_cint_operand.
5890         (*altivec_vspltb_internal): Ditto.
5891         (altivec_vspltb_direct): Ditto.
5892         (altivec_vsplth): Use const_0_to_7_operand instead of
5893         u5bit_cint_operand.
5894         (*altivec_vsplth_internal): Ditto.
5895         (altivec_vsplth_direct): Ditto.
5896         (altivec_vspltw): Use const_0_to_3_operand instead of
5897         u5bit_cint_operand.
5898         (*altivec_vspltw_internal): Ditto.
5899         (altivec_vspltw_direct): Ditto.
5900         (altivec_vspltsf): Ditto.
5901         (*altivec_vspltsf_internal): Ditto.
5902         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
5903         various splats with the proper size immediate.  Reorder the various
5904         cases by ascending size of immediate, and put all such together.
5906 2018-09-25  Richard Biener  <rguenther@suse.de>
5908         PR debug/83941
5909         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
5910         GC-ification.
5911         (maybe_create_die_with_external_ref): Do not create
5912         DW_TAG_imported_unit here.
5913         (add_abstract_origin_attribute): Handle external BLOCK refs.
5914         (dwarf2out_abstract_function): Simplify LTO case.
5915         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
5916         rather than using maybe_create_die_with_external_ref.
5918 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
5920         PR target/71278
5921         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
5922         (frndintxf2_mask_pm_i387): Ditto.
5923         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
5924         Enable for !flag_trapping_math.
5925         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
5926         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
5927         Change operand 1 predicate to nonimmediate_operand.
5928         (attr "i387_cw"): Remove mask_pm.
5929         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
5930         (enum ix86_entity): Remove I387_MASK_PM.
5931         * config/i386/i386.c (ix86_i387_mode_needed): Do not
5932         handle I387_MASK_PM.
5933         (ix86_mode_needed): Ditto.
5934         (ix86_mode_after): Ditto.
5935         (ix86_mode_entry): Ditto.
5936         (ix86_mode_exit): Ditto.
5937         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
5939 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
5941         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
5942         to_update_switch_stmts to vNULL instead of calling create on them
5943         immediately.
5945 2018-09-25  Richard Biener  <rguenther@suse.de>
5947         PR tree-optimization/87402
5948         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
5949         (visit_phi): Re-instantiate handling of supposed to be VARYING
5950         but non-VARYING backedge value.
5952 2018-09-25  Richard Biener  <rguenther@suse.de>
5954         PR debug/83941
5955         * dwarf2out.c (struct sym_off_pair): New.
5956         (external_die_map): New global.
5957         (lookup_decl_die): When in LTO create DIEs lazily from the
5958         external_die_map.
5959         (lookup_block_die): New function, create DIEs lazily in LTO.
5960         (equate_block_to_die): New function.
5961         (dwarf2out_die_ref_for_decl): During WPA get the association
5962         from the external DIE map.
5963         (dwarf2out_register_external_die): Record mapping into the
5964         external DIE map.
5965         (maybe_create_die_with_external_ref): New function split out from
5966         DIE generation part of old dwarf2out_register_external_die.
5967         (add_abstract_origin_attribute): Do not return the DIE.  When
5968         in LTO reference externals directly.
5969         (dwarf2out_abstract_function): When in LTO ignore calls for
5970         decls with external DIEs (already present abstract instances).
5971         (gen_call_site_die): Adjust.
5972         (add_high_low_attributes): Likewise.
5973         (gen_lexical_block_die): Likewise.
5974         (gen_inlined_subroutine_die): Likewie.
5975         (gen_block_die): Likewise.
5976         (dwarf2out_inline_entry): Likewise.
5977         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
5978         DIEs.
5980 2018-09-25  Martin Liska  <mliska@suse.cz>
5982         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
5983         integers and not by a float value.
5985 2018-09-25  Martin Liska  <mliska@suse.cz>
5987         PR fortran/87394
5988         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
5989         instead of NULL.
5990         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
5991         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
5992         * godump.c (go_format_type): Remove extra parenthesis.
5994 2018-09-25  Martin Liska  <mliska@suse.cz>
5996         * alias.c (set_dest_equal_p): Remove unused function.
5997         * config/i386/i386.c (def_builtin_pure2): Likewise.
5998         * diagnostic-show-locus.c (class layout): Remove
5999         unused field.
6000         (layout::layout): Likewise here.
6001         * dump-context.h (class temp_dump_context): Likewise.
6002         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
6003         (add_AT_loclistsptr): Likewise.
6004         (add_AT_offset): Likewise.
6005         (get_AT_hi_pc): Likewise.
6006         (is_comdat_die): Likewise.
6007         (type_is_enum): Likewise.
6008         (ceiling): Likewise.
6009         (add_AT_vms_delta): Likewise.
6010         (is_class_die): Likewise.
6011         * edit-context.c (class line_event): Remove unused field.
6012         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
6013         unused function.
6014         * ipa-cp.c (ipa_get_vr_lat): Likewise.
6015         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
6016         (ok_for_base_p_nonstrict): Likewise.
6017         * tree-chrec.c (is_not_constant_evolution): Likewise.
6018         (chrec_fold_poly_cst): Likewise.
6019         * tree-if-conv.c (has_pred_critical_p): Likewise.
6020         * tree-ssa-coalesce.c (print_exprs): Likewise.
6021         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
6022         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
6023         * tree-vrp.c (value_ranges_intersect_p): Likewise.
6024         (value_range_nonnegative_p): Likewise.
6026 2018-09-25  Martin Liska  <mliska@suse.cz>
6028         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6029         Do not handle "GNU Pascal".
6030         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6031         Likewise.
6032         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
6033         from documentation. Likewise.
6034         * dbxout.c (dbxout_range_type): Likewise.
6035         * doc/cpp.texi: Likewise.
6036         * doc/extend.texi: Likewise.
6037         * doc/frontends.texi: Likewise.
6038         * doc/invoke.texi: Remove Pascal entry.
6039         * tree.def (CLEANUP_POINT_EXPR): Likewise.
6040         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
6042 2018-09-25  Martin Liska  <mliska@suse.cz>
6044         PR middle-end/86078
6045         * doc/invoke.texi: Document all parameters and remove default
6046         of the parameters.
6048 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
6050         PR bootstrap/87417
6051         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
6052         contains HOST_WIDE_INTs when computing its size.
6054 2018-09-24  Jim Wilson  <jimw@sifive.com>
6056         PR target/87391
6057         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
6058         not TARGET_RVE.
6059         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
6061 2018-09-24  Andrew Pinski  <apinski@marvell.com>
6063         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
6064         access prev before checking it for NULLness in the
6065         AARCH64_FUSE_CMP_BRANCH case.
6067 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
6069         PR target/82699
6070         * config/i386/i386.c (rest_of_insert_endbranch): Set
6071         endbr_queued_at_entrance to true and don't insert ENDBR if
6072         x86_function_profiler will be called.
6073         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
6074         is true.
6075         * config/i386/i386.h (machine_function): Add
6076         endbr_queued_at_entrance.
6078 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
6080         * genattrtab.c (mk_attr_alt): Use alternative_mask.
6081         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6082         types.
6083         (check_attr_test): Use alternative_mask.
6084         (get_attr_value): Likewise.
6085         (compute_alternative_mask): Use alternative_mask and XWINT.
6086         (make_alternative_compare): Use alternative_mask.
6087         (attr_alt_subset_p): Use XWINT.
6088         (attr_alt_subset_of_compl_p): Likewise.
6089         (attr_alt_intersection): Use alternative_mask and XWINT.
6090         (attr_alt_union): Likewise.
6091         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
6092         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
6093         (simplify_test_exp): Use alternative_mask and XWINT.
6094         (write_test_expr): Use alternative_mask and XWINT, adjust bit
6095         number calculation to support 64 bits.  Generate code that
6096         checks 64-bit masks.
6097         (main): Use alternative_mask.
6098         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
6100 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
6102         PR target/80080
6103         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
6104         RETURN+USE when returning via %r14.
6106 2018-09-24  Martin Liska  <mliska@suse.cz>
6108         * gcov.c (output_lines): Print colorization legend
6109         for both flag_use_colors and flag_use_hotness_colors.
6110         Reword the help.
6112 2018-09-24  Martin Liska  <mliska@suse.cz>
6114         * coverage.c (get_coverage_counts): Use warning_at
6115         with current_function_decl location. Use %qD in warning
6116         message.
6118 2018-09-24  Martin Liska  <mliska@suse.cz>
6120         * memory-block.h (memory_block_pool::release): Annotate with
6121         valgrind that the memory is not accessible.
6123 2018-09-24  Martin Liska  <mliska@suse.cz>
6125         PR sanitizer/85774
6126         * asan.c: Make asan_handled_variables extern.
6127         * asan.h: Likewise.
6128         * cfgexpand.c (expand_stack_vars): Make sure
6129         a representative is unpoison if another
6130         variable in the partition is handled by
6131         use-after-scope sanitization.
6133 2018-09-24  Richard Biener  <rguenther@suse.de>
6135         PR tree-optimization/63155
6136         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
6137         the worklist when the edge of the respective argument isn't
6138         executable.
6140 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
6142         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
6143         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
6144         (MASK_CLASS_P): Update for rename.
6145         (MAYBE_MASK_CLASS_P): Ditto.
6146         (REG_CLASS_NAMES): Update.
6147         (REG_CLASS_CONTENT): Update.
6148         * config/i386/i386.c (regclass_map): Update for MASK_REG
6149         and ALL_MASK_REGS rename.
6150         * config/i386/constraints.md (Yk): Update for rename.
6151         (k): Ditto.
6153 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
6155         * config/i386/i386.h (enum reg_class): Remove
6156         EVEX_SSE_REGS and MOD4_SSE_REGS.
6157         (REG_CLASS_NAMES): Update.
6158         (REG_CLASS_CONTENT): Update.
6159         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
6160         registers as ALL_SSE_REGS.
6161         (ix86_additional_allocno_class_p): Remove.
6162         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
6163         (ix86_register_priority): Lower priority of EVEX SSE registers.
6164         Use IN_RANGE macro where appropriate.
6165         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
6166         AVX-5124VNNIW checks.
6167         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
6168         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
6169         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
6170         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
6171         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
6172         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
6173         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
6174         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
6175         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
6176         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
6177         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
6178         * config/i386/constraints.md (Yh): Remove.
6180 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
6182         * config/i386/i386.c (regclass_map): Declare integer REX registers
6183         as GENERAL_REGS.
6185 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
6187         * doc/service.texi (Service): Switch the fsf.org link to https.
6189 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6191         PR target/86798
6192         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6193         Define to speculation_safe_value_not_needed.
6195 2018-09-21  Florian Weimer  <fweimer@redhat.com>
6197         PR middle-end/81035
6198         * doc/extend.texi (Common Function Attributes): Mention that
6199         noreturn suppresses tail call optimization.
6201 2018-09-21  Jeff Law  <law@redhat.com>
6203         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
6204         vr_values::cleanup_edges_and_switches.
6205         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
6206         vr_values class.
6207         (identify_jump_threads): Remove EDGE_IGNORE handling.
6208         (execute_vrp): Move handling of to_remove_edges and
6209         to_update_switch_stmts into vr_values class member functions.
6210         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
6211         (to_update_switch_stmts): Likewise.
6212         * vr-values.c: Include cfghooks.h.
6213         (vr_values::vr_values): Initialize to_remove_edges and
6214         to_update_switch_stmts.
6215         (vr_values::~vr_values): Verify to_remove_edges and
6216         to_update_switch_stmts are empty.
6217         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
6218         (vr_values::cleanup_edges_and_switches): New member function.
6219         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
6220         function.  Add new data members.
6222 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
6224         PR tree-optimization/87309
6225         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6226         calls with pflags and alt_flags.
6227         (selftest::test_capture_of_dump_calls): Add test of interaction of
6228         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6230 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6232         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6234 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6236         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6238 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6240         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6241         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6242         (VXWORKS_LIBS_RTP): Minor reordering.
6244 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6246         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6247         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6249 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6251         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6252         (PTRDIFF_TYPE): Likewise.
6254 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6256         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6257         triplet, similar to support for VxWorks7.
6258         * config/vxworks-dummy.h: Provide a default definition
6259         of TARGET_VXWORKS64 to 0.
6261 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6263         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6264         * config/vxworks-dummy.h: here.
6266 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6268         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6270 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
6271             Bo Zhou  <zbo.zhou@hisilicon.com>
6273         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6274         * config/aarch64/aarch64-tune.md: Regenerated.
6275         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6276         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6277         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6279 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
6280             Julian Brown  <julian@codesourcery.com>
6282         * builtins.c (get_builtin_sync_mem): Handle address spaces.
6284 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
6286         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6287         if the call takes a static chain.
6289 2018-09-21  Martin Liska  <mliska@suse.cz>
6291         * auto-profile.c (autofdo_source_profile::read): Do not
6292         set sum_all.
6293         (read_profile): Do not add working sets.
6294         (read_autofdo_file): Remove sum_all.
6295         (afdo_callsite_hot_enough_for_early_inline): Remove const
6296         qualifier.
6297         * coverage.c (struct counts_entry): Remove gcov_summary.
6298         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6299         do not support GCOV_TAG_PROGRAM_SUMMARY.
6300         (get_coverage_counts): Remove summary and expected
6301         arguments.
6302         * coverage.h (get_coverage_counts): Likewise.
6303         * doc/gcov-dump.texi: Remove -w option.
6304         * gcov-dump.c (dump_working_sets): Remove.
6305         (main): Do not support '-w' option.
6306         (print_usage): Likewise.
6307         (tag_summary): Likewise.
6308         * gcov-io.c (gcov_write_summary): Do not dump
6309         histogram.
6310         (gcov_read_summary): Likewise.
6311         (gcov_histo_index): Remove.
6312         (gcov_histogram_merge): Likewise.
6313         (compute_working_sets): Likewise.
6314         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6315         it not obsolete.
6316         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6317         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6318         (GCOV_HISTOGRAM_SIZE): Remove.
6319         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6320         (struct gcov_summary): Simplify rapidly just
6321         to runs and sum_max fields.
6322         (gcov_histo_index): Remove.
6323         (NUM_GCOV_WORKING_SETS): Likewise.
6324         (compute_working_sets): Likewise.
6325         * gcov-tool.c (print_overlap_usage_message): Remove
6326         trailing empty line.
6327         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6328         (output_lines): Remove program related line.
6329         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6330         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6331         histogram.
6332         (input_profile_summary): Do not read it.
6333         (merge_profile_summaries): And do not merge it.
6334         (input_symtab): Do not call removed function.
6335         * modulo-sched.c (sms_schedule): Do not print sum_max.
6336         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6337         removed when histogram method was invented.
6338         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6339         mode.
6340         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6341         GCOV coding style.
6342         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6343         and dump selected value.
6344         * profile.c (add_working_set): Remove.
6345         (get_working_sets): Likewise.
6346         (find_working_set): Likewise.
6347         (get_exec_counts): Do not work with working sets.
6348         (read_profile_edge_counts): Do not inform as sum_max is removed.
6349         (compute_branch_probabilities): Likewise.
6350         (compute_value_histograms): Remove argument for call of
6351         get_coverage_counts.
6352         * profile.h: Do not make gcov_summary const.
6354 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
6356         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6358 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
6360         PR tree-optimization/86990
6361         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6362         Check that the entire merged store group is made of constants only for
6363         overlapping stores.
6365 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
6367         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6368         (VTABLE_VERIFICATION_SPEC): Likewise.
6369         (SANITIZER_EARLY_SPEC): Likewise.
6370         (SANITIZER_SPEC): Likewise.
6371         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6372         * doc/invoke.texi (Link Options): Document -r.
6374 2018-09-20  Richard Biener <rguenther@suse.de>
6376         PR middle-end/87054
6377         * gimplify.c (gimplify_expr): Retain alignment of
6378         addressable lvalue in dereference.
6380 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
6382         PR bootstrap/87013
6383         * configure.ac: Check for .loc is_stmt support.
6384         * configure, config.in: Rebuilt.
6385         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6386         if not supported.
6388 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
6390         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6391         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6392         -misel=no.
6394 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
6396         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6397         VECTOR_OTHER.
6398         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6399         case VECTOR_OTHER.
6401 2018-09-20  Marek Polacek  <polacek@redhat.com>
6403         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6405 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
6407         PR tree-optimization/87288
6408         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6409         into account when determining PEELING_FOR_NITERS.
6411 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
6413         PR tree-optimization/86877
6414         * tree-vect-loop.c (vect_analyze_loop_2): Call
6415         vect_verify_datarefs_alignment.
6417 2018-09-19  Marek Polacek  <polacek@redhat.com>
6419         * doc/invoke.texi: Document -Wclass-conversion.
6421 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
6423         * config/pa/pa.c (pa_adjust_priority): Delete.
6424         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6426         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6427         (atomic_storehi): Likewise.
6428         (atomic_storesi): Likewise.
6429         (atomic_loaddi): Restore compare and swap exchange loop code.
6431 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
6433         PR rtl-optimization/86902
6434         * combine.c (try_combine): When changing the CC mode used, don't change
6435         an unrelated mode in other_insn to that new CC mode.
6437 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
6439         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6440         with %T in place of calls to dump_generic_expr.
6441         (prune_runtime_alias_test_list): Likewise.
6442         (create_runtime_alias_checks): Likewise.
6443         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6444         (vect_analyze_data_ref_dependence): Likewise.
6445         (vect_slp_analyze_data_ref_dependence): Likewise.
6446         (vect_record_base_alignment): Likewise.  Use %G in place of call
6447         to dump_gimple_stmt.
6448         (vect_compute_data_ref_alignment): Likewise.
6449         (verify_data_ref_alignment): Likewise.
6450         (vect_find_same_alignment_drs): Likewise.
6451         (vect_analyze_group_access_1): Likewise.
6452         (vect_analyze_data_ref_accesses): Likewise.
6453         (dependence_distance_ge_vf): Likewise.
6454         (dump_lower_bound): Likewise.
6455         (vect_prune_runtime_alias_test_list): Likewise.
6456         (vect_find_stmt_data_reference): Likewise.
6457         (vect_analyze_data_refs): Likewise.
6458         (vect_create_addr_base_for_vector_ref): Likewise.
6459         (vect_create_data_ref_ptr): Likewise.
6460         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6461         (vect_can_advance_ivs_p): Likewise.
6462         (vect_update_ivs_after_vectorizer): Likewise.
6463         (vect_gen_prolog_loop_niters): Likewise.
6464         (vect_prepare_for_masked_peels): Likewise.
6465         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6466         (vect_determine_vectorization_factor): Likewise.
6467         (vect_is_simple_iv_evolution): Likewise.
6468         (vect_analyze_scalar_cycles_1): Likewise.
6469         (vect_analyze_loop_operations): Likewise.
6470         (report_vect_op): Likewise.
6471         (vect_is_slp_reduction): Likewise.
6472         (check_reduction_path): Likewise.
6473         (vect_is_simple_reduction): Likewise.
6474         (vect_create_epilog_for_reduction): Likewise.
6475         (vect_finalize_reduction:): Likewise.
6476         (vectorizable_induction): Likewise.
6477         (vect_transform_loop_stmt): Likewise.
6478         (vect_transform_loop): Likewise.
6479         (optimize_mask_stores): Likewise.
6480         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6481         (vect_split_statement): Likewise.
6482         (vect_recog_over_widening_pattern): Likewise.
6483         (vect_recog_average_pattern): Likewise.
6484         (vect_determine_min_output_precision_1): Likewise.
6485         (vect_determine_precisions_from_range): Likewise.
6486         (vect_determine_precisions_from_users): Likewise.
6487         (vect_mark_pattern_stmts): Likewise.
6488         (vect_pattern_recog_1): Likewise.
6489         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6490         (vect_record_max_nunits): Likewise.
6491         (vect_build_slp_tree_1): Likewise.
6492         (vect_build_slp_tree_2): Likewise.
6493         (vect_print_slp_tree): Likewise.
6494         (vect_analyze_slp_instance): Likewise.
6495         (vect_detect_hybrid_slp_stmts): Likewise.
6496         (vect_detect_hybrid_slp_1): Likewise.
6497         (vect_slp_analyze_operations): Likewise.
6498         (vect_slp_analyze_bb_1): Likewise.
6499         (vect_transform_slp_perm_load): Likewise.
6500         (vect_schedule_slp_instance): Likewise.
6501         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6502         (vect_mark_stmts_to_be_vectorized): Likewise.
6503         (vect_init_vector_1): Likewise.
6504         (vect_get_vec_def_for_operand): Likewise.
6505         (vect_finish_stmt_generation_1): Likewise.
6506         (vect_check_load_store_mask): Likewise.
6507         (vectorizable_call): Likewise.
6508         (vectorizable_conversion): Likewise.
6509         (vectorizable_operation): Likewise.
6510         (vectorizable_load): Likewise.
6511         (vect_analyze_stmt): Likewise.
6512         (vect_is_simple_use): Likewise.
6513         (vect_get_vector_types_for_stmt): Likewise.
6514         (vect_get_mask_type_for_stmt): Likewise.
6515         * tree-vectorizer.c (increase_alignment): Likewise.
6517 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
6519         * doc/rtl.texi: Adjust vec_select description.
6520         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6521         non-constant selectors.
6523 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
6525         * config/aarch64/aarch64-protos.h
6526         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6527         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6528         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6529         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6530         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6531         (AARCH64_FL_PROFILE): Move index so flags are ordered.
6532         (AARCH64_ISA_RCPC8_4): New flag.
6533         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6534         to aarch64_offset_9bit_signed_unscaled_p.
6535         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6536         and use stlur.
6537         * config/aarch64/constraints.md (Ust): New constraint.
6538         * config/aarch64/predicates.md.
6539         (aarch64_9bit_offset_memory_operand): New predicate.
6540         (aarch64_rcpc_memory_operand): New predicate.
6542 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
6544         PR rtl-optimization/87361
6545         * rtlanal.c (nonzero_bits1): Revert accidental change.
6547 2018-09-19  Richard Biener  <rguenther@suse.de>
6549         PR tree-optimization/87349
6550         PR tree-optimization/87342
6551         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6553 2018-09-18  Marek Polacek  <polacek@redhat.com>
6555         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6556         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6558 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
6560         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6562 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
6564         PR rtl-optimization/86882
6565         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6567 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
6569         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6570         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6572 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
6574         PR other/87353
6575         * doc/invoke.texi (Link Options): Fix formatting and grammar.
6577 2018-09-18  Richard Biener  <rguenther@suse.de>
6579         PR middle-end/63155
6580         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6581         (compute_samebase_partition_bases): Likewise.
6582         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6583         (gimple_can_coalesce_p): Simplify.
6585 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
6587         Handle a library implementation of ffs calling __builtin_ffs.
6588         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6589         (mmix_init_libfuncs): New function: make __builtin_ffs expand
6590         to __ffsdi2.
6592 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
6594         * diagnostic-show-locus.c (class layout_range): Add field
6595         "m_original_idx".
6596         (layout_range::layout_range): Add "original_idx" param and use it
6597         to initialize new field.
6598         (make_range): Use 0 for original_idx.
6599         (layout::layout): Pass in index to calls to
6600         maybe_add_location_range.
6601         (layout::maybe_add_location_range): Add param "original_idx" and
6602         pass it on to layout_range.
6603         (layout::print_any_labels): Pass on range->m_original_idx to
6604         get_text call.
6605         (gcc_rich_location::add_location_if_nearby): Use 0 for
6606         original_idx.
6607         * gcc-rich-location.h (text_range_label::get_text): Update for new
6608         param.
6609         (range_label_for_type_mismatch::get_text): Likewise.
6611 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
6613         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6615 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
6617         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6618         format_string_diagnostic_t.
6619         (fmtwarn_n): Likewise.
6620         * substring-locations.c
6621         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6622         (format_warning_n_va): Convert to...
6623         (format_string_diagnostic_t::emit_warning_n_va): ...this.
6624         (format_warning_va): Convert to...
6625         (format_string_diagnostic_t::emit_warning_va): ...this.
6626         (format_warning_at_substring): Convert to...
6627         (format_string_diagnostic_t::emit_warning): ...this.
6628         (format_warning_at_substring_n): Convert to...
6629         (format_string_diagnostic_t::emit_warning_n): ...this.
6630         * substring-locations.h (class format_string_diagnostic_t): New
6631         class.
6632         (format_warning_va): Convert to
6633         format_string_diagnostic_t::emit_warning_va.
6634         (format_warning_n_va): Convert to
6635         format_string_diagnostic_t::emit_warning_n_va.
6636         (format_warning_at_substring): Convert to
6637         format_string_diagnostic_t::emit_warning.
6638         (format_warning_at_substring_n): Convert to
6639         format_string_diagnostic_t::emit_warning_n.
6641 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
6642             Bernd Schmidt <bernds_cb1@t-online.de>
6644         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6645         SImode args.
6647 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
6649         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6650         operand 0 predicate to nonimmediate operand.
6651         (rint<mode>2_frndint): Remove insn pattern.
6652         (rint<mode>2): Change operand 1 predicate to general_operand.
6653         Extend operand 1 to XFmode and generate rintxf2 insn.
6654         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6655         Do not use X87MODEF mode macro.
6656         (frndintxf2_<rounding>_i387): Rename from
6657         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
6658         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6659         to XFmode and generate significandxf3 insn.
6661 2018-09-17  Richard Biener  <rguenther@suse.de>
6663         PR tree-optimization/87328
6664         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6665         visiting unexecutable backedges when not iterating.
6666         (do_rpo_vn): Mark all edges not executable even when not
6667         iterating.
6669 2018-09-17  Martin Jambor  <mjambor@suse.cz>
6671         PR c/63886
6672         * doc/invoke.texi (Warning Options): Likewise.
6674 2018-09-17  Richard Biener  <rguenther@suse.de>
6676         PR tree-optimization/87301
6677         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6678         clean EH info from leftover copy assignments.
6680 2018-09-17  Martin Liska  <mliska@suse.cz>
6682         PR gcov-profile/85871
6683         * gcov.c (output_intermediate_file): Fix out of bounds
6684         access.
6686 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
6688         * config/arc/arc.c: Object attributes for core4 not reflected
6689         correctly.
6690         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6691         core3).
6693 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
6695         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6697 2018-09-17  Martin Liska  <mliska@suse.cz>
6699         * doc/gcov.texi: Document new option --use-hotness-colors.
6700         * gcov.c (struct source_info): Declare new field.
6701         (source_info::source_info): Set default for maximum_count.
6702         (print_usage): Add new -q option.
6703         (process_args): Process it.
6704         (accumulate_line_info): Save src->maximum_count.
6705         (output_line_beginning): Make color line number if
6706         flag_use_hotness_colors is set.
6707         (output_line_details): Pass default argument value.
6708         (output_lines): Pass src->maximum_count.
6710 2018-09-17  Martin Liska  <mliska@suse.cz>
6712         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6713         Use processor_names table.
6714         * config/i386/i386.c (ix86_default_align): Use
6715         processor_cost_table for alignment values.
6716         (ix86_option_override_internal): Use processor_names.
6717         (ix86_function_specific_print): Likewise.
6718         * config/i386/i386.h (struct processor_costs):
6719         Add alignment values.
6720         (struct ptt): Remove and replace with const char *.
6721         * config/i386/x86-tune-costs.h (struct processor_costs):
6722         Declare default alignments for all costs.
6724 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
6726         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6727         symbolics or VR_VARYING ranges for ABS_EXPR.
6728         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6729         when range will wrap.
6731 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
6733         PR middle-end/86864
6734         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6735         before and after a JUMP_TABLE_DATA.
6737 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
6739         PR middle-end/87188
6740         * dojump.c (do_compare_and_jump): Canonicalize function pointers
6741         when one operand is a function pointer.  Use POINTER_TYPE_P and
6742         FUNC_OR_METHOD_TYPE_P.
6743         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6744         * fold-const.c (build_range_check): Likewise.
6745         * match.pd (simple_comparison): Likewise.
6747 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
6749         PR c/82967
6750         * spellcheck.c (get_edit_distance_cutoff): New function.
6751         (selftest::test_edit_distance_unit_test_oneway): Rename to...
6752         (selftest::test_get_edit_distance_one_way): ...this.
6753         (selftest::test_get_edit_distance_unit): Rename to...
6754         (selftest::test_get_edit_distance_both_ways): ...this.
6755         (selftest::test_edit_distances): Move tests to this new function,
6756         and test some more pairs of strings.  Update for above renaming.
6757         (selftest::get_old_cutoff): New function.
6758         (selftest::test_get_edit_distance_cutoff): New function.
6759         (selftest::assert_suggested_for): New function.
6760         (ASSERT_SUGGESTED_FOR): New macro.
6761         (selftest::assert_not_suggested_for): New function.
6762         (ASSERT_NOT_SUGGESTED_FOR): New macro.
6763         (selftest::test_suggestions): New function.
6764         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
6765         tests to selftest::test_edit_distances and call it.  Add calls to
6766         selftest::test_get_edit_distance_cutoff and
6767         selftest::test_suggestions.
6768         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
6769         (best_match::consider): Replace hard-coded cutoff calculation with
6770         a call to...
6771         (best_match::get_cutoff): New declaration.
6772         (best_match::get_best_meaningful_candidate): Likewise.
6774 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6776         * builtins.c (fold_builtin_strlen): Remove TODO comment.
6778 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6780         revert:
6781         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6783         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6784         terminated string literal.
6786 2018-09-14  Martin Sebor  <msebor@redhat.com>
6788         * builtins.c (unterminated_array): Handle ARRAY_REF.
6789         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
6790         * builtins.h (unterminated_array): Declare extern.
6791         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
6792         arrays.
6793         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
6794         calls.
6796 2018-09-14  Martin Sebor  <msebor@redhat.com>
6797             Jeff Law  <law@redhat.com>
6799         * builtins.c (unterminated_array): New.
6800         (expand_builtin_strcpy): Adjust.
6801         (expand_builtin_strcpy_args): Detect unterminated arrays.
6802         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
6803         unterminated arrays.
6804         * gimple-fold.h (get_maxval_strlen): Add argument.
6805         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
6807         * gimple-fold.c (get_range_strlen): Add argument.
6808         (get_maxval_strlen): Adjust.
6809         * gimple-fold.h (get_range_strlen): Add argument.
6811 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
6813         * config/i386/movdirintrin.h: Fix copyright year.
6815 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
6817         * reg-stack.c: Include regs.h.
6818         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
6819         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6820         FIRST_STACK_REG, not DFmode.
6821         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
6822         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
6823         (change stack): Default register mode to the reg_raw_mode of
6824         FIRST_STACK_REG, not DFmode.
6825         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
6826         (*swapxf): Rename from swapxf.
6828 2018-09-14  Carl Love  <cel@us.ibm.com>
6830         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
6831         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
6833 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
6835         PR target/87224
6836         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
6837         alternatives.
6839 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
6841         PR target/85628
6842         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
6844 2018-09-14  Jason Merrill  <jason@redhat.com>
6846         Fix --enable-gather-detailed-mem-stats.
6847         * hash-table.c (hash_table_usage): Change from variable to function.
6848         * hash-table.h: Adjust.
6849         * Makefile.in: Add missing dependencies on hash-table.h.
6851 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6853         PR tree-optimization/87259
6854         PR lto/87283
6855         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
6856         execute_cse_reciprocals_1 has tried transforming.
6858 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
6860         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
6861         VR_VARYING for PLUS/MINUS_EXPR.
6863 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
6865         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
6866         formatting.
6868 2018-09-14  Richard Biener  <rguenther@suse.de>
6870         PR middle-end/63155
6871         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
6872         bits for the merged partition.
6874 2018-09-13  Martin Sebor  <msebor@redhat.com>
6875             Bernd Edlinger  <bernd.edlinger@hotmail.de>
6877         * builtins.h (c_srlen): Add argument.
6878         * builtins.c (warn_string_no_nul): New function.
6879         (c_strlen): Add argument and use it.  Update recursive calls.
6880         Pass DECL argument to string_constant to get info on non
6881         terminated strings.  Update *NONSTR as needed.
6882         (fold_builtin_strlen): Add argument to calls to c_strlen.
6883         Warn for unterminated arrays.
6884         (warn_string_no_null): Add prototype.
6885         * expr.c (string_constant): Update arguments.  Update recursive
6886         calls appropriately.  Detect missing NUL terminator and outermost
6887         declaration its missing in.
6888         Improve checks for arrays with nonzero lower bound or elements
6889         that are not a single byte.  Simplify offset computation.
6890         Simplify checks for non-NUL terminated strings.
6891         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
6892         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
6894 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6896         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
6897         correctly.
6898         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
6899         argument.  Fix range checks.
6900         * fold-const.h (c_getstr): Adjust protoype.
6901         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
6902         string is constant but contains no NUL byte.
6904         * expr.c (string_constant): Adjust function comment.
6905         Remove bogus check for zero termination.
6907         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
6909         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6910         (get_constant_size): Don't make STRING_CSTs larger than they are.
6911         (check_string_literal): New check function for STRING_CSTs.
6912         (output_constant): Use it.
6914 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
6916         PR target/86812
6917         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6919 2018-09-13  Richard Biener  <rguenther@suse.de>
6921         PR tree-optimization/87263
6922         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
6923         (struct unwind_state): Add max_rpo field.
6924         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
6925         Compute max_rpo, the max RPO number a block can be backwards reached
6926         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
6927         separating it from the iterating mode.
6929 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
6931         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
6932         (rfs_decision): New scheduling decision.
6934 2018-09-13  Richard Biener  <rguenther@suse.de>
6936         PR bootstrap/87134
6937         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
6938         (vn_nary_op_insert_pieces_predicated): Do not write useless
6939         valid_dominated_by_p entry outside of the allocated storage.
6941 2018-09-13  Omar Sandoval  <osandov@osandov.com>
6942             Tom de Vries  <tdevries@suse.de>
6944         PR debug/86985
6945         * dwarf2out.c (is_c): New function.
6946         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
6948 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
6950         PR target/85628
6951         * config/aarch64/aarch64.md (*aarch64_bfxil):
6952         Define.
6953         * config/aarch64/constraints.md (Ulc): Define.
6954         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
6955         Define.
6956         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
6957         New function.
6959 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
6961         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
6962         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
6963         aarch64_layout_frame call.
6964         (aarch64_expand_epilogue): Likewise.
6965         (aarch64_initial_elimination_offset): Likewise.
6966         (aarch64_get_separate_components): Likewise.
6967         (aarch64_use_return_insn_p): Likewise.
6968         (aarch64_layout_frame): Remove unneeded check.
6970 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6972         * configure.ac: Only append
6973         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
6974         gcc_config_arguments if it was never reconfigured or last reconfigure
6975         was with different arguments.
6976         * configure: Regenerated.
6978 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6979             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6981         PR middle-end/87290
6982         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
6983         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
6985 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6987         PR tree-optimization/87287
6988         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
6989         X % C == 0 to X % (unsigned) C == 0 optimization to ...
6990         * match.pd (X % C == 0): ... here.  New optimization.
6992 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
6994         PR middle-end/82853
6995         * expr.h (maybe_optimize_mod_cmp): Declare.
6996         * expr.c (mod_inv): New function.
6997         (maybe_optimize_mod_cmp): New function.
6998         (do_store_flag): Use it.
6999         * cfgexpand.c (expand_gimple_cond): Likewise.
7001 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
7002             Julian Brown  <julian@codesourcery.com>
7004         PR middle-end/86336
7005         * gimplify.c (gimplify_scan_omp_clauses): Set
7006         target_firstprivatize_array_bases in OpenACC parallel and kernels
7007         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
7008         OpenACC data regions.
7010 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
7012         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
7013         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
7015 2018-09-12  Richard Biener  <rguenther@suse.de>
7017         PR tree-optimization/87280
7018         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
7019         edge but unreachable target.
7020         (do_rpo_vn): For conservatively handling a PHI only mark
7021         the backedge executable but not the block reachable.
7023 2018-09-12  Richard Biener  <rguenther@suse.de>
7025         PR tree-optimization/87266
7026         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
7027         visited blocks.
7029 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
7031         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
7032         constants.
7033         ("trunc<BFP:mode><DFP_ALL:mode>2")
7034         ("trunc<DFP_ALL:mode><BFP:mode>2")
7035         ("extend<BFP:mode><DFP_ALL:mode>2")
7036         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
7037         according to the target operand type.
7039 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
7040             Andreas Krebbel  <krebbel@linux.ibm.com>
7042         PR tree-optimization/86844
7043         * gimple-ssa-store-merging.c
7044         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
7045         there are any overlapping stores in between them, make sure they are
7046         also coalesced or we give up completely.
7048 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
7050         PR middle-end/87248
7051         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
7052         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
7054 2018-09-12  Tom de Vries  <tdevries@suse.de>
7056         * common.opt (gdescribe-dies): Add option.
7057         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
7058         attribute for artifical and nameless decls.
7059         (dwarf2out_register_external_die): Add description attribute to
7060         external reference die.
7061         (add_desc_attribute): New functions.
7062         (gen_subprogram_die): Add description attribute to
7063         DW_TAG_call_site_parameter.
7064         * tree-pretty-print.c (print_generic_expr_to_str): New function.
7065         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
7066         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
7067         -gno-describe-dies.
7068         (@item -gdescribe-dies): Add.
7070 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
7072         * tree-vrp.c (vrp_shift_undefined_p): Remove.
7073         (extract_range_from_binary_expr_1: Call
7074         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
7075         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
7076         depend on sign.
7078 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
7080         * gimple-ssa-warn-alloca.c
7081         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
7082         field for ALLOCA_BOUND_*_LARGE.
7084 2018-09-11  Nathan Sidwell  <nathan@acm.org>
7086         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
7088 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
7090         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
7091         for clobbers.  Remove obsolete comment.
7093 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
7095         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
7096         mpxchk, mpxld and mpxst types.
7097         (define_attr length_immediate): Remove all processing of mpx types.
7098         (define_attr prefix_0f): Ditto.
7099         (define_attr memory): Ditto.
7101 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
7103         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
7104         (log<mode>2): Change operand 1 predicate to general_operand.
7105         Extend operand 1 to XFmode and generate logxf3 insn.
7106         (log10<mode>2): Change operand 1 predicate to general_operand.
7107         Extend operand 1 to XFmode and generate log10xf3 insn.
7108         (log2<mode>2): Change operand 1 predicate to general_operand.
7109         Extend operand 1 to XFmode and generate log2xf3 insn.
7110         (fyl2xp1_extend<mode>xf3_i387): Remove.
7111         (log1p<mode>2): Change operand 1 predicate to general_operand.
7112         Extend operand 1 to XFmode and generate log1pxf3 insn.
7113         (fxtract_extend<mode>xf3_i387): Remove.
7114         (logb<mode>2): Change operand 1 predicate to general_operand.
7115         Extend operand 1 to XFmode and generate logbxf3 insn.
7116         (ilogb<mode>2): Change operand 1 predicate to general_operand.
7117         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
7118         (significand<mode>2): Change operand 1 predicate to general_operand.
7119         Extend operand 1 to XFmode and generate significandxf3 insn.
7121 2018-09-11  Nathan Sidwell  <nathan@acm.org>
7123         * gcc.c (perror_with_name, pfatal_with_name): Delete.
7124         (load_specs): Use fatal_error.
7125         (DELETE_IF_ORDINARY, process_command): Use error.
7126         (execute, run_attempt): Use fatal_error.
7128 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
7130         * diagnostic-core.h (sorry_at): New prototype.
7131         * diagnostic.c (sorry_at): New function.
7133 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
7135         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
7136         by zero as VR_UNDEFINED.
7138 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
7140         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
7141         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
7142         (<sincos>mode2): New expander.
7143         (sincos_extend<mode>xf3_i387): Remove insn pattern.
7144         (sincos -> sin, cos splitters): Remove splitter patterns.
7145         (sincos<mode>3): Change operand 2 predicate to general_operand.
7146         Extend operand 2 to XFmode and generate sincosxf3 insn.
7147         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
7148         Change operand 3 predicate to const1_operand.
7149         (fptan_extend<mode>xf4_i387): Remove insn pattern.
7150         (tanxf2): Update operands in the call to fptanxf4_i387.
7151         (tan<mode>2): Change operand 1 predicate to general_operand.
7152         Extend operand 1 to XFmode and generate tanxf3 insn.
7153         (atan2xf3): Rename from *fpatanxf3_i387.
7154         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
7155         (atan2xf3): Remove expander.
7156         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
7157         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
7158         (atan<mode>2): Change operand 1 predicate to general_operand.
7159         Extend operand 1 to XFmode and generate atanxf3 insn.
7161 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
7163         * config/i386/i386.md (x87/SSE constant load splitter): Use
7164         memory_operand instead of nonimmediate_operand for input operand
7165         predicate.
7167 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
7169         * config/i386/i386.md (float partial SSE register stall splitter): Move
7170         splitter near its instruction pattern.
7171         (float_extend partial SSE register stall splitter): Ditto.
7172         (float_truncate partial SSE register stall splitter): Ditto.
7174 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
7176         PR target/86794
7177         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7178         to speculation_safe_value_not_needed.
7180         PR target/85666
7181         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
7182         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
7183         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
7184         leaf_function_p, instead use has_hard_reg_initial_val.
7186 2018-09-09  Nathan Sidwell  <nathan@acm.org>
7188         * gcc.h (pfatal_with_name): Don't declare here.
7189         * gcc.c (pfatal_with_name): Make static.
7191 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
7193         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
7194         earlyclobber.
7196 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
7198         PR rtl-optimization/85458
7199         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
7200         priority hook to reduce the priority of EXPR.
7202 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
7204         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
7205         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
7206         with X87_ENABLE_FLOAT.  Remove preparation code.
7207         (*float<SWI48:mode><MODEF:mode>2): Rename from
7208         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
7209         math using "enabled" attribute.
7210         (*floatdi<MODEF:mode>2_i387): Rename from
7211         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
7212         enable for 32bit targets only.
7213         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
7214         splitter.
7215         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
7216         as operand 1 predicate.  Rewrite as define_insn_and_split.
7217         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
7219 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
7221         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7222         to fallthru to FLOAT case.
7224 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
7226         PR target/86731
7227         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7228         around folding of vec_sl to handle out of range shift values.
7230 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
7232         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7233         Update callers to gen_fix_trunc<mode>_i387_fisttp
7234         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7235         nonimmediate_operand.
7236         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7237         and corresponding splitters.
7238         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7239         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7240         (fix_truncdi_i387_with_temp): Remove insn pattern
7241         and corresponding splitters.
7242         (fix_trunc<mode>_i387): Change operand 0 predicate to
7243         nonimmediate_operand.
7244         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7245         and corresponding splitters.
7246         (*fistdi2_1): Remove.
7247         (fistdi2): Ditto.
7248         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7249         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
7250         (*fist<mode>2_1): Remove.
7251         (fist<mode>2): Ditto.
7252         (fist<mode>2_with_temp): Remove insn pattern and corresponding
7253         splitters.
7254         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
7255         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7256         (fistdi2_<rounding>): Change operand 0 predicate to
7257         nonimmediate_operand.
7258         (fistdi2_<rounding>_with_temp): Remove insn pattern
7259         and corresponding splitters.
7260         (fist<mode>2_<rounding>): Change operand 0 predicate to
7261         nonimmediate_operand.
7262         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7263         and corresponding splitters.
7265         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7267 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7269         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7270         the init value.
7272 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
7274         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7275         early gimple folding of vec_splat().
7276         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7277         * gimple-fold.h: Add an extern define for tree_vec_extract().
7279 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
7281         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7282         wrappers around TREE_TYPE comparisons.
7284 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
7286         PR target/80080
7287         * config/s390/predicates.md: Add nonsym_memory_operand.
7288         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7289         contains a SYMBOL_REF, load it into an intermediate pseudo.
7290         (s390_emit_compare_and_swap): Legitimize operand.
7291         * config/s390/s390.md: Use the new nonsym_memory_operand
7292         with UNSPECV_CAS patterns.
7294 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
7296         PR target/80080
7297         * config/s390/s390-passes.def: New file.
7298         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7299         declaration.
7300         (make_pass_s390_early_mach): Add declaration.
7301         * config/s390/s390.c (make_pass_s390_early_mach):
7302         (s390_option_override): Remove dynamic registration.
7303         * config/s390/t-s390: Add s390-passes.def.
7305 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
7307         * config/s390/s390.c (s390_decompose_constant_pool_ref):
7308         Remove UNSPEC_LTREL_BASE check.
7309         (annotate_constant_pool_refs): Likewise.
7310         (find_constant_pool_ref): Likewise.
7311         (find_ltrel_base): Removed.
7312         (replace_ltrel_base): Removed.
7313         (s390_mainpool_finish): Remove replace_ltrel_base call.
7314         (s390_chunkify_start): Remove pending LTREL_BASE logic.
7315         (s390_chunkify_finish): Remove replace_ltrel_base call.
7316         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7318 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
7320         PR target/86779
7321         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7322         to speculation_safe_value_not_needed.
7324 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
7325             Bernd Schmidt  <bernds_cb1@t-online.de>
7327         * config/nvptx/nvptx-opts.h: New file.
7328         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7329         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7330         (ASM_SPEC): Define.
7331         (TARGET_SM35): New macro.
7332         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7333         correct predicate.
7334         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7335         values.
7336         (misa=): New option.
7337         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7339 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
7341         * config/i386/i386.md (truncdfsf2): Remove expander.
7342         (truncdfsf2_with_temp): Ditto.
7343         (truncxf<mode>2): Ditto.
7344         (*truncdfsf_fast_mixed): Remove insn pattern.
7345         (*truncdfsf_fast_i387): Ditto.
7346         (*truncdfsf_mixed): Ditto.
7347         (*truncdfsf_i387): Ditto.
7348         (*truncdfsf2_i387_1): Ditto.
7349         (*truncxfsf2_mixed): Ditto.
7350         (*truncxfdf2_mixed): Ditto.
7351         (*truncxf<mode>2_i387_noop): Ditto. Update callers
7352         to call gen_truncxf<mode>2 instead.
7353         (*truncxf<mode>2_i387): Remove.
7354         (reg->reg splitters): Remove splitter pattern.
7355         (reg->mem splitters): Ditto.
7357         (truncdfsf2): New insn pattern.
7358         (truncxf<mode>2): Ditto.
7360 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7362         * tree-ssa-math-opts.c (is_mult_by): New function.
7363         (is_square_of): Use the above.
7364         (optimize_recip_sqrt): New function.
7365         (pass_cse_reciprocals::execute): Use the above.
7367 2018-09-05  Richard Biener  <rguenther@suse.de>
7369         PR bootstrap/87134
7370         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7371         to zero-init the emplaced vec.
7373 2018-09-05  Martin Liska  <mliska@suse.cz>
7375         PR tree-optimization/87205
7376         * tree-switch-conversion.c (pass_lower_switch::execute):
7377         Group cases for switch statements.
7379 2018-09-05  Richard Biener  <rguenther@suse.de>
7381         PR tree-optimization/87217
7382         * tree-ssa-sccvn.c (vuse_valueize): New.
7383         (vn_reference_lookup_pieces): Use it.
7384         (vn_reference_lookup): Likewise.
7386 2018-09-05  Nathan Sidwell  <nathan@acm.org>
7388         PR c++/87137
7389         * stor-layout.c (place_field): Scan forwards to check last
7390         bitfield when ms_bitfield_placement is in effect.
7392 2018-09-05  Richard Biener  <rguenther@suse.de>
7394         PR bootstrap/87225
7395         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7396         return.
7398 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7399             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
7401         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7402         * config.gcc (extra_objs): Build it.
7403         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7404         Likewise.
7405         * config/aarch64/aarch64-passes.def
7406         (pass_tag_collision_avoidance): New pass.
7407         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7408         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7409         (aarch64_classify_address): Remove static qualifier.
7410         (aarch64_address_info, aarch64_address_type): Move to...
7411         * config/aarch64/aarch64-protos.h: ... here.
7412         (make_pass_tag_collision_avoidance): New function.
7413         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7414         New tuning flag.
7416 2018-09-05  Martin Liska  <mliska@suse.cz>
7418         * doc/gcov.texi: Update documentation of humar
7419         readable mode.
7420         * gcov.c (format_count): Print one decimal place, it provides
7421         more fine number of situations like '1G' vs. '1.4G'.
7423 2018-09-05  Martin Liska  <mliska@suse.cz>
7425         PR target/87164
7426         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7427         * optc-gen.awk: Allow 'Var' for Deprecated options in order
7428         to generate a MASK value.
7430 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
7432         PR debug/86593
7433         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7434         if frame pointer isn't used.
7435         (compute_frame_pointer_to_fb_displacement): Likewise.
7437 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
7439         PR target/87198
7440         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7441         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7442         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7443         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7444         and OPTION_MASK_ISA_XSAVEC_UNSET.
7446 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
7448         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7449         XOR operations in NAND case.
7451 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
7453         * wide-int-range.cc (wide_int_range_convert): New.
7454         * wide-int-range.h (wide_int_range_convert): New.
7455         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7456         code into wide_int_range_convert.
7457         (extract_range_into_wide_ints): Do not munge anti range constants
7458         into the entire domain.  Just return the range back.
7460 2018-09-04  Martin Liska  <mliska@suse.cz>
7462         * genmatch.c (output_line_directive): Add new argument
7463         fnargs.
7464         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7466 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
7468         * doc/invoke.texi (Option Summary): Add whitespace.
7470         * doc/invoke.texi (Option Summary): Add -Waligned-new.
7472 2018-09-04  Richard Biener  <rguenther@suse.de>
7474         PR tree-optimization/87211
7475         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7476         backedge value we're supposed to treat as VARYING also number
7477         the PHI to VARYING in case it got a different value-number already.
7479 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
7481         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7482         (extract_range_from_binary_expr_1): Do not call
7483         vrp_can_optimize_bit_op.
7484         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7485         static.
7486         (wide_int_range_get_mask_and_bounds): New.
7487         (wide_int_range_optimize_bit_op): New.
7488         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7489         (wide_int_range_bit_and): Same.
7490         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7491         (wide_int_range_optimize_bit_op): New.
7492         (wide_int_range_get_mask_and_bounds): New.
7494 2018-09-04  Richard Biener  <rguenther@suse.de>
7496         PR tree-optimization/87176
7497         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7498         variable.  When value-numbering a virtual PHI node make sure
7499         to not value-number to the backedge value.
7501 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
7503         * doc/extend.texi (Long Long, Hex Floats): Document support for
7504         long long and hex floats in more recent versions of ISO C++.
7506 2018-09-03  Richard Biener  <rguenther@suse.de>
7508         PR tree-optimization/87177
7509         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7510         cleanup.
7512 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7514         * bb-reorder.c (edge_order): Convert to C-qsort-style
7515         tri-state comparator.
7516         (reorder_basic_blocks_simple): Change std::stable_sort to
7517         gcc_stablesort.
7519 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7521         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7522         tri-state comparator.
7523         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7525 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7527         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
7528         (mergesort): ... here as maximum count for using netsort.
7529         (gcc_qsort): Set nlim to 3 if stable sort is requested.
7530         (gcc_stablesort): New.
7531         * system.h (gcc_stablesort): Declare.
7533 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7535         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7536         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
7537         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
7539 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
7541         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7542         lxsdx and stxsdx alternatives.
7543         (*mov<mode>_hardfloat64): Ditto.
7544         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7546 2018-09-03  Richard Biener  <rguenther@suse.de>
7548         PR tree-optimization/87200
7549         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7550         simplify result.
7552 2018-09-03  Martin Liska  <mliska@suse.cz>
7554         PR tree-optimization/87201
7555         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7556         Fix parenthesis in an expression.
7558 2018-09-03  Richard Biener  <rguenther@suse.de>
7560         PR tree-optimization/87197
7561         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7562         visited.  CSE the VN_INFO hashtable lookup.
7564         PR tree-optimization/87169
7565         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7566         iterating make sure there's no extra backedges from irreducible
7567         regions feeding the header.  Mark the destination block
7568         executable.
7570 2018-09-03  Martin Liska  <mliska@suse.cz>
7572         PR driver/83193
7573         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7574         * common/common-targhooks.c (default_get_valid_option_values):
7575         New function.
7576         * common/common-targhooks.h (default_get_valid_option_values):
7577         Likewise.
7578         * common/config/i386/i386-common.c: Move processor_target_table
7579         from i386.c.
7580         (ix86_get_valid_option_values): New function.
7581         (TARGET_GET_VALID_OPTION_VALUES): New macro.
7582         * config/i386/i386.c (struct ptt): Move to i386-common.c.
7583         (PTA_*): Move all defined masks into i386-common.c.
7584         (ix86_function_specific_restore): Use new processor_cost_table.
7585         * config/i386/i386.h (struct ptt): Moved from i386.c.
7586         (struct pta): Likewise.
7587         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7588         * doc/tm.texi.in: Likewise.
7589         * opt-suggestions.c (option_proposer::suggest_option):
7590         Pass prefix to build_option_suggestions.
7591         (option_proposer::get_completions): Likewise.
7592         (option_proposer::build_option_suggestions): Use the new target
7593         hook.
7594         * opts.c (struct option_help_tuple): New struct.
7595         (print_filtered_help): Use the new target hook.
7597 2018-09-03  Martin Liska  <mliska@suse.cz>
7599         PR middle-end/59521
7600         * predict.c (set_even_probabilities): Add likely_edges
7601         argument and handle cases where we have precisely one
7602         likely edge.
7603         (combine_predictions_for_bb): Catch also likely_edges.
7604         (tree_predict_by_opcode): Handle gswitch statements.
7605         * tree-cfg.h (find_case_label_for_value): New declaration.
7606         (find_taken_edge_switch_expr): Likewise.
7607         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7608         Find pivot in decision tree based on probabily, not by number of
7609         nodes.
7611 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
7613         * doc/standards.texi (Standards): Update Objective-C reference.
7615 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7617         * doc/install.texi (Prerequisites): Update link for MPC.
7619 2018-09-01  Michael Matz  <matz@suse.de>
7621         PR tree-optimization/87074
7622         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7623         PHIs for outer-loop uses.
7625 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7627         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7628         * doc/invoke.texi (C Dialect Options): Ditto.
7630 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7632         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7634 2018-08-31  Richard Biener  <rguenther@suse.de>
7636         PR tree-optimization/87168
7637         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7638         (rpo_elim::eliminate_avail): When OP was not visited it must
7639         be available.
7641 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
7643         * tree-vrp.c (copy_value_range): Convert param "from" from
7644         "value_range *" to "const value_range *".
7645         (range_is_null): Likewise for param "vr".
7646         (range_int_cst_p): Likewise.
7647         (range_int_cst_singleton_p): Likewise.
7648         (symbolic_range_p): Likewise.
7649         (value_ranges_intersect_p): Likewise for both params.
7650         (value_range_nonnegative_p): Likewise for param "vr".
7651         (value_range_constant_singleton): Likewise.
7652         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7653         (extract_range_into_wide_ints): Likewise for param "vr".
7654         (extract_range_from_multiplicative_op): Likewise for params "vr0"
7655         and "vr1".
7656         (vrp_can_optimize_bit_op): Likewise.
7657         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7658         "vr1_".
7659         (extract_range_from_unary_expr): Likewise.
7660         (debug_value_range): Likewise for param "vr".
7661         (value_range::dump): Add "const" qualifier.
7662         (vrp_prop::check_array_ref): Convert local "vr" from
7663         "value_range *" to "const value_range *".
7664         (vrp_prop::check_mem_ref): Likewise.
7665         (vrp_prop::visit_stmt): Likewise for local "old_vr".
7666         (vrp_intersect_ranges_1): Likewise for param "vr_1".
7667         (vrp_intersect_ranges): Likewise.
7668         (simplify_stmt_for_jump_threading): Likewise for local "vr".
7669         (vrp_prop::vrp_finalize): Likewise.
7670         * tree-vrp.h (value_range::dump): Add "const" qualifier.
7671         (vrp_intersect_ranges): Add "const" qualifier to params as above.
7672         (extract_range_from_unary_expr): Likewise.
7673         (value_range_constant_singleton): Likewise.
7674         (symbolic_range_p): Likewise.
7675         (copy_value_range): Likewise.
7676         (extract_range_from_binary_expr_1): Likewise.
7677         (range_int_cst_p): Likewise.
7678         (vrp_set_zero_nonzero_bits): Likewise.
7679         (range_int_cst_singleton_p): Likewise.
7681 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
7683         * config/aarch64/arm_neon.h (vabsd_s64): New.
7684         (vnegd_s64): Likewise.
7686 2018-08-31  Martin Jambor  <mjambor@suse.cz>
7688         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7690 2018-08-31  Martin Liska  <mliska@suse.cz>
7692         * ipa-icf.c (sem_item::add_type): Use
7693         sem_item::m_type_hash_cache.
7694         * ipa-icf.h: Move the cache from sem_item_optimizer
7695         to sem_item.
7697 2018-08-31  Nathan Sidwell  <nathan@acm.org>
7699         * doc/extend.texi (Backwards Compatibility): Remove implicit
7700         extern C leeway of () being (...).
7702 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7704         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7706 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
7708         PR target/86684
7709         PR target/87149
7710         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7712 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
7714         PR middle-end/87138
7715         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7716         gen_int_mode.  Formatting fixes.
7718 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
7720         * target.def (custom_function_descriptors): Improve documentation.
7721         * doc/tm.texi.in (Trampolines): Expand discussion of function
7722         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7723         beginning of the section.
7724         * doc/tm.texi: Regenerated.
7726 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
7728         * cfg.h (class auto_edge_flag): Spell out the template-id of the
7729         base class in the initializer list.  This is a workaround for
7730         building with older GCC.
7731         (class auto_bb_flag): Likewise.
7733 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
7735         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7736         (altivec_vcmpequ<VI_char>_p): Remove star.
7737         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7738         vector load modes.
7739         (expand_strncmp_vec_sequence): New function.
7740         (emit_final_str_compare_vec): New function.
7741         (expand_strn_compare): Add support for vector strncmp.
7742         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7743         length specification to bytes.
7744         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7745         (vcmpnezb_p): New pattern.
7746         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7747         for option -mstring-compare-inline-limit.
7749 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
7751         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7752         (PTA_SKYLAKE): Add PTA_AES.
7753         (PTA_GOLDMONT): Likewise.
7755 2018-08-29  Jan Hubicka  <jh@suse.cz>
7757         PR lto/86517
7758         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
7759         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
7761 2018-08-29  Jan Hubicka  <jh@suse.cz>
7763         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
7764         TYPE_STUB_DECL.
7765         (hash_tree): Do not visit TYPE_STUB_DECL.
7766         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
7767         stream TYPE_STUB_DECL.
7768         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
7769         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
7770         after free_lang_data.
7771         (type_in_anonymous_namespace_p): Likewise.
7773 2018-08-29  Jan Hubicka  <jh@suse.cz>
7775         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7776         comment that it has to be even number.
7777         (class sreal): Change m_sig type to int32_t.
7778         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7779         int64_t for temporary calculations.
7780         (sreal_verify_basics): Drop one bit from minimum and maximum.
7782 2018-08-30  Richard Biener  <rguenther@suse.de>
7784         PR tree-optimization/87147
7785         * tree-ssa-sccvn.c (SSA_VISITED): New function.
7786         (visit_phi): When the degenerate result is from the backedge and
7787         we didn't visit its definition yet drop to VARYING.
7788         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
7790 2018-08-29  Jan Hubicka  <jh@suse.cz>
7792         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
7793         DECL_VINDEX.
7794         (hash_tree): Likewise.
7796 2018-08-29  Jan Hubicka  <jh@suse.cz>
7798         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
7799         and TYPE_NEXT_REF_TO.
7801 2018-08-29  Jan Hubicka  <jh@suse.cz>
7803         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7804         comment that it has to be even number.
7805         (class sreal): Change m_sig type to int32_t.
7806         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7807         int64_t for temporary calculations.
7808         (sreal_verify_basics): Drop one bit from minimum and maximum.
7810 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
7812         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
7814 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
7816         PR middle-end/86995
7817         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
7818         if to_add is negative.
7820 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7822         PR middle-end/87053
7823         * builtins.c (c_strlen): Improve range checks.
7825 2018-08-29  Martin Sebor  <msebor@redhat.com>
7826             Jeff Law  <law@redhat.com>
7828         PR tree-optimization/86714
7829         PR tree-optimization/86711
7830         * builtins.c (c_strlen): Add arguments to call to string_constant.
7831         * expr.c (string_constant): Add argument.  Detect missing nul
7832         terminator and outermost declaration it's missing in.
7833         * expr.h (string_constant): Add argument.
7834         * fold-const.c (read_from_constant_string): Add arguments to call to
7835         string_constant.
7836         (c_getstr): Likewise.
7837         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7838         to string_constant.
7839         * tree-ssa-strlen.c (get_stridx): Likewise.
7841 2018-08-29  Jan Hubicka  <jh@suse.cz>
7843         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
7844         Do not stream DECL_VINDEX.
7845         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
7846         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
7847         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
7849 2018-08-29  Richard Biener  <rguenther@suse.de>
7851         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
7852         virtual operands that are not default defs to honor region
7853         boundaries.
7854         (rpo_vn_valueize): Remove ineffective code here.
7856 2018-08-29  Richard Biener  <rguenther@suse.de>
7858         PR tree-optimization/87132
7859         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
7860         when skipping defs reachable over backedges.
7862 2018-08-29  Richard Biener  <rguenther@suse.de>
7864         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
7865         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
7866         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
7867         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
7868         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
7869         (vn_reference_lookup_3): Remove use of const_parms.
7870         (free_rpo_vn): Do not free const_parms.
7871         (do_rpo_vn): Do not call init_const_parms.
7872         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
7873         SSA_NAME_POINTS_TO_READONLY_MEMORY.
7874         (call_may_clobber_ref_p_1): Likewise.
7876 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
7878         PR other/86726
7879         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
7880         (-O): Ditto.
7881         (-ftree-scev-cprop): Document.
7883 2018-08-29  Jan Hubicka  <jh@suse.cz>
7885         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
7886         parameters.
7887         (sreal constructor): Update.
7888         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
7889         sreal:operator/): Update.
7891 2018-08-29  Martin Liska  <mliska@suse.cz>
7893         * tree-switch-conversion.c (switch_conversion::expand):
7894         Strenghten assumption about gswitch statements.
7896 2018-08-29  Richard Biener  <rguenther@suse.de>
7898         PR tree-optimization/87117
7899         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
7900         re-value-number released SSA VDEFs.
7902 2018-08-29  Richard Biener  <rguenther@suse.de>
7904         PR tree-optimization/87126
7905         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
7907 2018-08-28  Jim Wilson  <jimw@sifive.com>
7909         * config/riscv/pic.md: Rewrite.
7910         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
7911         invalid address.
7912         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7913         (SOFTF, default_load, softload, softstore): New.
7915 2018-08-28  Jeff Law  <law@redhat.com>
7917         * fold-const.c (fold_binary_loc): Remove recently added assert.
7919 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
7921         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
7922         to OP parmeter of generated function.
7924 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
7926         PR tree-optimization/87009
7927         * match.pd: Add boolean optimizations.
7929 2018-08-28  Martin Sebor  <msebor@redhat.com>
7931         PR middle-end/86631
7932         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
7933         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
7934         (pass_walloca::gate): Use it.
7935         (alloca_call_type): Same.
7936         (pass_walloca::execute): Same.
7937         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
7939 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
7941         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
7942         GCC_VERSION for usage of "__gcc_dump_printf__" format from
7943         >= 3005 to >= 9000.
7945 2018-08-28  Richard Biener  <rguenther@suse.de>
7947         PR tree-optimization/87124
7948         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
7949         constants before looking up avail.
7951 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
7953         PR middle-end/87099
7954         * calls.c (maybe_warn_nonstring_arg): Punt early if
7955         warn_stringop_overflow is zero.  Don't call get_range_strlen
7956         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
7957         Swap comparison operands to have constants on rhs.  Only use
7958         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
7959         increment lenrng[0].
7961 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
7963         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
7964         use of tree_to_shwi.  Remove duplicated test for the size being
7965         a whole number of bytes.
7967 2018-08-28  Richard Biener  <rguenther@suse.de>
7969         PR tree-optimization/87117
7970         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
7971         Handle removed stmt without LHS (GIMPLE_NOP).
7973 2018-08-28  Richard Biener  <rguenther@suse.de>
7975         PR tree-optimization/87117
7976         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
7977         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
7979 2018-08-28  Richard Biener  <rguenther@suse.de>
7981         PR tree-optimization/87117
7982         * tree-ssa-pre.c (compute_avail): Do not make expressions
7983         with predicated values available.
7984         (get_expr_value_id): Assert we do not run into predicated value
7985         expressions.
7987 2018-08-28  Richard Biener  <rguenther@suse.de>
7989         PR tree-optimization/87117
7990         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
7991         get virtual operands.
7992         (get_expr_operands): Handle STRING_CST like other decls.
7994 2018-08-28  Martin Liska  <mliska@suse.cz>
7996         * tree.h: Update documentation of fndecl_built_in_p
7997         functions.
8000 2018-08-27  Jeff Law  <law@redhat.com>
8001         PR tree-optimization/87110
8002         * tree-ssa-dse.c (compute_trims): Handle non-constant
8003         TYPE_SIZE_UNIT.
8005 2018-08-27  Martin Sebor  <msebor@redhat.com>
8007         PR tree-optimization/86914
8008         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
8010 2018-08-27  Martin Sebor  <msebor@redhat.com>
8012         PR tree-optimization/87112
8013         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
8014         the type of the bound argument.
8016 2018-08-27  Jeff Law  <law@redhat.com>
8018         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
8019         type does not have a TYPE_SIZE_UNIT.
8021 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
8023         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
8024         with include of backend.h.
8026 2018-08-27  Richard Biener  <rguenther@suse.de>
8028         PR tree-optimization/86927
8029         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
8030         use const cond reduction code.
8032 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
8034         PR tree-optimization/85758
8035         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
8037 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
8039         PR c++/87091
8040         * diagnostic-show-locus.c (class layout_range): Update for
8041         conversion of show_caret_p to a tri-state.
8042         (layout_range::layout_range): Likewise.
8043         (make_range): Likewise.
8044         (layout::maybe_add_location_range): Likewise.
8045         (layout::should_print_annotation_line_p): Don't show annotation
8046         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
8047         (layout::get_state_at_point): Update for conversion of
8048         show_caret_p to a tri-state.  Bail out early for
8049         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
8050         underlining or source colorization.
8051         (gcc_rich_location::add_location_if_nearby): Update for conversion
8052         of show_caret_p to a tri-state.
8053         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
8054         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
8055         Likewise.
8056         (selftest::test_one_liner_labels): Likewise.
8057         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
8058         conversion of show_caret_p to a tri-state.
8059         * pretty-print.c (text_info::set_location): Likewise.
8060         * pretty-print.h (text_info::set_location): Likewise.
8061         * substring-locations.c (format_warning_n_va): Likewise.
8062         * tree-diagnostic.c (default_tree_printer): Likewise.
8063         * tree-pretty-print.c (newline_and_indent): Likewise.
8065 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
8067         PR c++/87091
8068         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
8069         line above for line-insertion fix-it hints.
8070         (selftest::test_fixit_insert_containing_newline): Update the
8071         expected results, and add a test with line-numbering enabled.
8073 2018-08-27  Martin Liska  <mliska@suse.cz>
8075         PR sanitizer/86962
8076         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
8077         params with DECL_HAS_VALUE_EXPR_P.
8079 2018-08-27  Martin Liska  <mliska@suse.cz>
8081         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
8082         selected expansion strategy.
8084 2018-08-27  Martin Liska  <mliska@suse.cz>
8086         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
8087         * builtins.c (is_builtin_fn): Likewise.
8088         * attribs.c (diag_attr_exclusions): Use new function
8089         fndecl_built_in_p and remove check for FUNCTION_DECL if
8090         possible.
8091         (builtin_mathfn_code): Likewise.
8092         (fold_builtin_expect): Likewise.
8093         (fold_call_expr): Likewise.
8094         (fold_builtin_call_array): Likewise.
8095         (fold_call_stmt): Likewise.
8096         (set_builtin_user_assembler_name): Likewise.
8097         (is_simple_builtin): Likewise.
8098         * calls.c (gimple_alloca_call_p): Likewise.
8099         (maybe_warn_nonstring_arg): Likewise.
8100         * cfgexpand.c (expand_call_stmt): Likewise.
8101         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
8102         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
8103         (cgraph_node::verify_node): Likewise.
8104         * cgraphclones.c (build_function_decl_skip_args): Likewise.
8105         (cgraph_node::create_clone): Likewise.
8106         * config/arm/arm.c (arm_insert_attributes): Likewise.
8107         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
8108         * dse.c (scan_insn): Likewise.
8109         * expr.c (expand_expr_real_1): Likewise.
8110         * fold-const.c (operand_equal_p): Likewise.
8111         (fold_binary_loc): Likewise.
8112         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
8113         * gimple-low.c (lower_stmt): Likewise.
8114         * gimple-pretty-print.c (dump_gimple_call): Likewise.
8115         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8116         Likewise.
8117         * gimple.c (gimple_build_call_from_tree): Likewise.
8118         (gimple_call_builtin_p): Likewise.
8119         (gimple_call_combined_fn): Likewise.
8120         * gimplify.c (gimplify_call_expr): Likewise.
8121         (gimple_boolify): Likewise.
8122         (gimplify_modify_expr): Likewise.
8123         (gimplify_addr_expr): Likewise.
8124         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
8125         * ipa-cp.c (determine_versionability): Likewise.
8126         * ipa-fnsummary.c (compute_fn_summary): Likewise.
8127         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
8128         * ipa-split.c (visit_bb): Likewise.
8129         (split_function): Likewise.
8130         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8131         * lto-cgraph.c (input_node): Likewise.
8132         * lto-streamer-out.c (write_symbol): Likewise.
8133         * omp-low.c (setjmp_or_longjmp_p): Likewise.
8134         (lower_omp_1): Likewise.
8135         * predict.c (strip_predict_hints): Likewise.
8136         * print-tree.c (print_node): Likewise.
8137         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
8138         * trans-mem.c (is_tm_irrevocable): Likewise.
8139         (is_tm_load): Likewise.
8140         (is_tm_simple_load): Likewise.
8141         (is_tm_store): Likewise.
8142         (is_tm_simple_store): Likewise.
8143         (is_tm_abort): Likewise.
8144         (tm_region_init_1): Likewise.
8145         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
8146         * tree-cfg.c (verify_gimple_call): Likewise.
8147         (move_stmt_r): Likewise.
8148         (stmt_can_terminate_bb_p): Likewise.
8149         * tree-eh.c (lower_eh_constructs_2): Likewise.
8150         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
8151         * tree-inline.c (remap_gimple_stmt): Likewise.
8152         (copy_bb): Likewise.
8153         (estimate_num_insns): Likewise.
8154         (fold_marked_statements): Likewise.
8155         * tree-sra.c (scan_function): Likewise.
8156         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
8157         (optimize_stack_restore): Likewise.
8158         (pass_fold_builtins::execute): Likewise.
8159         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
8160         (mark_all_reaching_defs_necessary_1): Likewise.
8161         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
8162         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8163         (pass_forwprop::execute): Likewise.
8164         * tree-ssa-loop-im.c (stmt_cost): Likewise.
8165         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8166         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
8167         * tree-ssa-strlen.c (get_string_length): Likewise.
8168         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
8169         (find_func_aliases_for_call): Likewise.
8170         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
8171         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
8172         * tree-tailcall.c (find_tail_calls): Likewise.
8173         * tree.c (need_assembler_name_p): Likewise.
8174         (free_lang_data_in_decl): Likewise.
8175         (get_call_combined_fn): Likewise.
8176         * ubsan.c (is_ubsan_builtin_p): Likewise.
8177         * varasm.c (incorporeal_function_p): Likewise.
8178         * tree.h (DECL_BUILT_IN): Remove and replace with
8179         fndecl_built_in_p.
8180         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
8181         (fndecl_built_in_p): New.
8183 2018-08-27  Martin Liska  <mliska@suse.cz>
8185         PR tree-optimization/86847
8186         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
8187         Dump also subtree probability.
8188         (switch_decision_tree::do_jump_if_equal): New function.
8189         (switch_decision_tree::emit_case_nodes): Handle special
8190         situations in balanced tree that can be emitted much simpler.
8191         Fix calculation of probabilities that happen in tree expansion.
8192         * tree-switch-conversion.h (struct cluster): Add
8193         is_single_value_p.
8194         (struct simple_cluster): Likewise.
8195         (struct case_tree_node): Add new function has_child.
8196         (do_jump_if_equal): New.
8198 2018-08-27  Martin Liska  <mliska@suse.cz>
8200         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
8201         Add new argument to bit_test_cluster constructor.
8202         (bit_test_cluster::emit): Set bits really number of values
8203         handlel by a test.
8204         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
8205         probability argument.
8206         * tree-switch-conversion.h (struct bit_test_cluster):
8207         Add m_handles_entire_switch.
8209 2018-08-27  Martin Liska  <mliska@suse.cz>
8211         PR tree-optimization/86702
8212         * tree-switch-conversion.c (jump_table_cluster::emit):
8213         Make probabilities even for values in jump table
8214         according to number of cases handled.
8215         (switch_decision_tree::compute_cases_per_edge): Pass
8216         argument to reset_out_edges_aux function.
8217         (switch_decision_tree::analyze_switch_statement): Likewise.
8218         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8219         Make it static.
8221 2018-08-27  Martin Liska  <mliska@suse.cz>
8223         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8224         cfun argument explicitly.
8225         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8226         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8227         function gimple_switch_default_bb.
8228         (convert_switch_statements):
8229         (expand_builtins):
8230         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8231         * stmt.c (label_to_block_fn): Use label_to_block and pass
8232         cfun argument explicitly and use gimple_switch_label_bb.
8233         (expand_case): Likewise.
8234         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8235         cfun argument explicitly. Likewise.
8236         (make_edges_bb): Likewise.
8237         (make_cond_expr_edges): Likewise.
8238         (get_cases_for_edge): Likewise.
8239         (make_gimple_switch_edges): Likewise.
8240         (label_to_block_fn): Likewise.
8241         (label_to_block): Likewise.
8242         (make_goto_expr_edges): Likewise.
8243         (make_gimple_asm_edges): Likewise.
8244         (main_block_label): Likewise.
8245         (group_case_labels_stmt): Likewise.
8246         (find_taken_edge_computed_goto): Likewise.
8247         (find_taken_edge_switch_expr): Likewise.
8248         (gimple_verify_flow_info): Likewise.
8249         (gimple_redirect_edge_and_branch): Likewise.
8250         (gimple_switch_label_bb): New function.
8251         (gimple_switch_default_bb): Likewise.
8252         (gimple_switch_edge): Likewise.
8253         (gimple_switch_default_edge): Likewise.
8254         * tree-cfg.h (label_to_block_fn): Remove and replace ...
8255         (label_to_block): ... with this.
8256         (gimple_switch_label_bb): New.
8257         (gimple_switch_default_bb): Likewise.
8258         (gimple_switch_edge): Likewise.
8259         (gimple_switch_default_edge): Likewise.
8260         * tree-cfgcleanup.c (convert_single_case_switch): Use
8261         new gimple functions and pass new argument to label_to_block.
8262         (cleanup_control_flow_bb):
8263         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8264         cfun argument explicitly.
8265         (make_eh_edges): Likewise.
8266         (redirect_eh_dispatch_edge): Likewise.
8267         (lower_resx): Likewise.
8268         (lower_eh_dispatch): Likewise.
8269         (maybe_remove_unreachable_handlers): Likewise.
8270         (unsplit_eh): Likewise.
8271         (cleanup_empty_eh): Likewise.
8272         (verify_eh_edges): Likewise.
8273         (verify_eh_dispatch_edge): Likewise.
8274         * tree-ssa-dom.c (record_edge_info): Likewise.
8275         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8276         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8277         (thread_through_normal_block): Likewise.
8278         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8279         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8280         * tree-switch-conversion.c (switch_conversion::collect): Use new
8281         gimple functions.
8282         (switch_conversion::check_final_bb): Likewise.
8283         (switch_conversion::gather_default_values): Pass new argument
8284         to label_to_block.
8285         (switch_conversion::build_constructors): Likewise.
8286         (switch_decision_tree::compute_cases_per_edge): Use new
8287         gimple_switch_edge function.
8288         (switch_decision_tree::analyze_switch_statement): Pass new argument
8289         to label_to_block.
8290         (switch_decision_tree::try_switch_expansion): Use
8291         gimple_switch_default_edge.
8292         * tree-vrp.c (find_switch_asserts): Pass new argument
8293         to label_to_block.
8294         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8295         (vr_values::simplify_switch_using_ranges): Likewise.
8297 2018-08-27  Richard Biener  <rguenther@suse.de>
8299         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8300         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8302         * tree-ssa-sccvn.h (struct vn_pval): New structure.
8303         (struct vn_nary_op_s): Add unwind_to member.  Add
8304         predicated_values flag and put result into a union together
8305         with a linked list of vn_pval.
8306         (struct vn_ssa_aux): Add name member to make maintaining
8307         a map of SSA name to vn_ssa_aux possible.  Remove no longer
8308         needed info, dfsnum, low, visited, on_sccstack, use_processed
8309         and range_info_anti_range_p members.
8310         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8311         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8312         New functions.
8313         (vn_valueize): New global.
8314         (vn_context_bb): Likewise.
8315         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8316         VN_INFO_PTR_INFO): Remove.
8317         * tree-ssa-sccvn.c: ... (rewrite)
8318         (pass_fre::execute): For -O2+ initialize loops and run
8319         RPO VN in optimistic mode (iterating).  For -O1 and -Og
8320         run RPO VN in non-optimistic mode.
8321         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8322         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8323         * doc/invoke.texi (sccvn-max-scc-size): Remove.
8324         (rpo-vn-max-loop-depth): Document.
8325         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8326         when valuezing the VUSE signals we walked out of the region.
8327         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8328         (phi_translate): Set VN context block to use for availability
8329         lookup.
8330         (compute_avail): Likewise.
8331         (pre_valueize): New function.
8332         (pass_pre::execute): Adjust to the RPO VN API.
8334         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8335         (propagate_constants_for_unrolling): Remove.
8336         (tree_unroll_loops_completely): Perform value-numbering
8337         on the unrolled bodies loop parent.
8339 2018-08-27  Richard Biener  <rguenther@suse.de>
8341         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8342         for partial antic compute.
8344 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
8346         PR rtl-optimization/87065
8347         * combine.c (simplify_if_then_else): Formatting fix.
8348         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8349         check.
8350         (known_cond): Don't return const_true_rtx for vector modes.  Use
8351         CONST0_RTX instead of const0_rtx.  Formatting fixes.
8353 2018-08-27  Martin Liska  <mliska@suse.cz>
8355         PR gcov-profile/87069
8356         * gcov.c (process_file): Record files already processed
8357         and warn about a file being processed multiple times.
8359 2018-08-27  Martin Liska  <mliska@suse.cz>
8361         PR driver/83193
8362         * config/aarch64/aarch64.c (aarch64_override_options_internal):
8363         Set default values for x_aarch64_*_string strings.
8364         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8365         prefix.  For -mabi do not print '=ABI' in help and use
8366         <option_value> format for -msve-vector-bits and -moverride
8367         options.
8369 2018-08-26  Jeff Law  <law@redhat.com>
8371         * config/mips/frame-header-opt.c: Include "backend.h" rather than
8372         "cfg.h"
8374 2018-08-26  Marek Polacek  <polacek@redhat.com>
8376         PR c++/87029, Implement -Wredundant-move.
8377         * doc/invoke.texi: Document -Wredundant-move.
8379 2018-08-25  Martin Sebor  <msebor@redhat.com>
8381         PR tree-optimization/87059
8382         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8383         to the same type as the other.
8384         * fold-const.c (fold_binary_loc): Assert expectation.
8386 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
8388         * config/darwin.c (machopic_legitimize_pic_address): Clean up
8389         extraneous parentheses, dead code section and formatting.
8391 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
8393         PR c++/87091
8394         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8395         wide enough for jumps in the line-numbering to be visible.
8396         (layout::print_gap_in_line_numbering): New member function.
8397         (layout::calculate_line_spans): When using line numbering, merge
8398         line spans that are only 1 line apart.
8399         (diagnostic_show_locus): When printing line numbers, show gaps in
8400         line numbering directly, rather than printing headers.
8401         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8402         line-numbering with multiple line spans.
8403         (selftest::test_fixit_insert_containing_newline_2): Add test of
8404         line-numbering, in which the spans are close enough to be merged.
8406 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
8408         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8409         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
8410         * tree-vrp.c (range_is_nonnull): Remove.
8411         (range_includes_zero_p): Accept value_range instead of min/max.
8412         (extract_range_from_binary_expr_1): Do not early bail on
8413         POINTER_PLUS_EXPR.
8414         Use range_includes_zero_p instead of range_is_nonnull.
8415         (extract_range_from_unary_expr): Use range_includes_zero_p instead
8416         of range_is_nonnull.
8417         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
8418         special case VR_ANTI_RANGE.
8419         (vrp_finalize): Same.
8420         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8421         instead of min/max.
8422         (range_is_nonnull): Remove.
8423         * vr-values.c (vrp_stmt_computes_nonzero): Use
8424         range_includes_zero_p instead of range_is_nonnull.
8425         (extract_range_basic): Pass value_range to range_includes_zero_p
8426         instead of range_is_nonnull.
8428 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
8430         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8431         * emit-rtl.h (rtl_data): Remove return_bnd.
8432         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8433         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8434         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8435         (POINTER_BOUNDS_MODE): Remove definition.
8436         (make_pointer_bounds_mode): Remove.
8437         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8438         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8439         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8440         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8441         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8442         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8443         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8445         * config/i386/i386-modes.def (BND32, BND64): Remove.
8446         * config/i386/i386.c (dbx_register_map): Remove bound registers.
8447         (dbx64_register_map): Ditto.
8448         (svr4_dbx_register_map): Ditto.
8449         (indirect_thunk_bnd_needed): Remove.
8450         (indirect_thunks_bnd_used): Ditto.
8451         (indirect_return_bnd_needed): Ditto.
8452         (indirect_return_via_cx_bnd): Ditto.
8453         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8454         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8455         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
8456         (output_indirect_thunk_function): Remove handling of
8457         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8458         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8459         (ix86_save_reg): Remove handling of crtl->return_bnd.
8460         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8461         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8462         and UNSPEC_BNDLX_ADDR.
8463         (ix86_output_indirect_branch_via_reg): Remove handling of
8464         indirect_thunk_prefix_bnd.
8465         (ix86_output_indirect_branch_via_push): Ditto.
8466         (ix86_output_function_return): Ditto.
8467         (ix86_output_indirect_function_return): Ditto.
8468         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8469         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8470         (CALL_USED_REGISTERS): Ditto.
8471         (REG_ALLOC_ORDER): Update for removal of bound registers.
8472         (HI_REGISTER_NAMES): Ditto.
8473         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8474         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8475         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8476         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8477         (FIRST_PSEUDO_REG): Update.
8478         (BND): Remove mode iterator.
8479         * config/i386/predicates.md (bnd_mem_operator): Remove.
8481 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
8483         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8484         vectors.
8486 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
8488         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8489         the case in which the permute needs only a single element and
8490         repeats for every vector of the result.  Extend that case to
8491         handle variable-length vectors.
8492         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8494 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
8496         PR debug/79342
8497         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8498         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8500 2018-08-24  Richard Biener  <rguenther@suse.de>
8502         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8503         bb_flags_allocated members.
8504         (auto_flag): New RAII class for allocating flags.
8505         (auto_edge_flag): New RAII class for allocating edge flags.
8506         (auto_bb_flag): New RAII class for allocating bb flags.
8507         * cfgloop.c (verify_loop_structure): Allocate temporary edge
8508         flag dynamically.
8509         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8510         in favor of temporarily allocated BB flag.
8511         * hsa-brig.c: Re-order includes.
8512         * hsa-dump.c: Likewise.
8513         * hsa-regalloc.c: Likewise.
8514         * print-rtl.c: Likewise.
8515         * profile-count.c: Likewise.
8517 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
8519         PR target/86989
8520         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8521         the TOC register.
8523 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
8525         PR 87073/bootstrap
8526         * wide-int-range.cc (wide_int_range_div): Do not ignore result
8527         from wide_int_range_multiplicative_op.
8529 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8531         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8532         "permutaion".
8534 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
8536         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8537         to 'expanded'.
8539 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
8541         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8542         full GENERIC expression used for replacement.
8544 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
8546         * tree-vrp.c (abs_extent_range): Remove.
8547         (extract_range_into_wide_ints): Pass wide ints by reference.
8548         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8549         Pass wide ints by reference in all calls to
8550         extract_range_into_wide_ints.
8551         * wide-int-range.cc (wide_int_range_div): New.
8552         * wide-int-range.h (wide_int_range_div): New.
8553         (wide_int_range_includes_zero_p): New.
8554         (wide_int_range_zero_p): New.
8556 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
8558         * config/aarch64/aarch64.md (arches): New enum.
8559         (arch): New enum attr.
8560         (arch_enabled): New attr.
8561         (enabled): Now uses arch_enabled only.
8562         (simd, sve, fp16): Removed attribute.
8563         (fp): Attr now defined in terms of 'arch'.
8564         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8565         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8566         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8567         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8568         attributes into 'arch'.
8569         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8570         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8571         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8572         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8573         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8574         'simd' attribute into 'arch'.
8575         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8576         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8577         Convert use of 'fp' attribute to 'arch'.
8578         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8579         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8580         into 'arch'.
8581         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8582         (different modes) Merge 'fp' and 'simd' into 'arch'.
8583         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8584         'simd' into 'arch'.
8586 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
8588         PR rtl-optimization/87026
8589         * expmed.c (canonicalize_comparison): If we can no longer create
8590         pseudoregisters, don't.
8592 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
8594         PR target/86951
8595         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8596         prototype.
8597         * config/arm/arm.c (speculation_barrier_libfunc): New static
8598         variable.
8599         (arm_init_libfuncs): Initialize it.
8600         (arm_emit_speculation_barrier): New function.
8601         * config/arm/arm.md (speculation_barrier): Call
8602         arm_emit_speculation_barrier for architectures that do not have
8603         DSB or ISB.
8604         (speculation_barrier_insn): Only match on Armv7 or later.
8606 2018-08-23  Richard Biener  <rguenther@suse.de>
8608         PR middle-end/87024
8609         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8610         calls.
8612 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
8614         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8615         of single-vector TBLs.
8616         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8617         one input is given.
8619 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
8621         PR target/85910
8622         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8623         aarch64_evpc_tbl guard.
8625 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8627         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8628         behaviour.
8630 2018-08-22  Martin Sebor  <msebor@redhat.com>
8632         PR middle-end/87052
8633         * tree-pretty-print.c (pretty_print_string): Add argument.
8634         (dump_generic_node): Call to pretty_print_string with string size.
8636 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
8638         PR rtl-optimization/86771
8639         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8640         of two SETs into those two SETs, one to be placed at i2, if that SETs
8641         destination is modified between i2 and i3.
8643 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8645         PR tree-optimization/86725
8646         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8647         function.
8648         (vect_analyze_scalar_cycles_1): Check it.
8650 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8652         PR tree-optimization/86725
8653         * tree-vect-loop.c (vect_is_simple_reduction): When treating
8654         an outer loop phi as a double reduction, make sure that the
8655         single user of the phi result is an inner loop phi.
8657 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8659         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8660         grouped stores with gaps to a strided group.
8662 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8664         * tree-vect-stmts.c (get_group_load_store_type)
8665         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8666         first statement in a group.
8668 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8670         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8671         the sequence used in gcc/gcc.c.
8673 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8675         PR other/704
8676         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8677         building it.
8679 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8681         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8682         Darwin10-specific unwinder-shim.
8683         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8684         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8685         New to cater for Darwin10 Rosetta.
8687 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8689         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8690         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8692 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8694         PR bootstrap/81033
8695         PR target/81733
8696         PR target/52795
8697         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8698         (dwarf2out_switch_text_section): Generate a local label for the
8699         second function sub-section and apply it as the second FDE start
8700         label.
8701         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8702         second sub-section start.
8704 2018-08-22  Richard Biener  <rguenther@suse.de>
8706         PR tree-optimization/86988
8707         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8709 2018-08-22  Richard Biener  <rguenther@suse.de>
8711         PR tree-optimization/86945
8712         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8714 2018-08-22  Alexandre Oliva <oliva@adacore.com>
8716         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8717         a comment about how uses of r2 for .sdata2 come about.
8719 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
8721         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8723 2018-08-21  Marek Polacek  <polacek@redhat.com>
8725         PR c++/86981, Implement -Wpessimizing-move.
8726         * doc/invoke.texi: Document -Wpessimizing-move.
8728 2018-08-21  Jan Hubicka  <jh@suse.cz>
8730         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8731         * tree.h (is_redundant_typedef): Remove.
8732         * dwarf2out.c (is_redundant_typedef): Turn into static function.
8734 2018-08-21  Jan Hubicka  <jh@suse.cz>
8736         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8737         when possible.
8739 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
8741         * expmed.c (extract_low_bits): Reject invalid subregs early.
8743 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8745         PR middle-end/86121
8746         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8747         behaviour.
8749 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8751         * config/vxworks.h: Guard vxworks_asm_out_constructor and
8752         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8753         * config/vxworks.c: Likewise.
8755 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8757         * config/vxworks.c: Set targetm.have_ctors_dtors
8758         if HAVE_INITFINI_ARRAY_SUPPORT.
8759         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
8760         if HAVE_INITFINI_ARRAY_SUPPORT.
8762 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8764         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
8765         default search path for VxWorks < 7.
8767 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8769         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
8770         (get_format_string): Refer to c_getstr.
8772 2018-08-21  Tom de Vries  <tdevries@suse.de>
8774         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8775         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8776         (debuginfo_early_stop): Declare.
8777         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8778         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8779         (debuginfo_early_stop): New function.
8780         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
8781         and debuginfo_early_stop.
8782         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
8783         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
8784         (general_init): Call debuginfo_early_init.
8785         (finalize): Call debuginfo_fini.
8786         (do_compile): Call debuginfo_init.
8787         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
8788         -fdump-early-debug.
8789         (@item -fdump-debug, @item -fdump-earlydebug): Add.
8791 2018-08-21  Tom de Vries  <tdevries@suse.de>
8793         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
8794         flag_dump_noaddr and flag_dump_unnumbered.
8796 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
8798         * wide-int-range.cc (wide_int_range_abs): New.
8799         (wide_int_range_order_set): Rename from wide_int_range_min_max.
8800         * wide-int-range.h (wide_int_range_abs): New.
8801         (wide_int_range_min_max): New.
8802         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
8803         case to call wide_int_range_abs.
8804         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
8805         (extract_range_from_abs_expr): Delete.
8807 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
8809         PR target/87033
8810         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
8811         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
8812         for indexed loads.
8814 2018-08-20  Nathan Sidwell  <nathan@acm.org>
8815             Jeff Law <law@redhat.com>
8817         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
8818         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
8820 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
8822         PR other/84889
8823         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
8824         (decl_attributes): Likewise.
8825         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
8826         instance.
8827         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8828         * diagnostic-core.h (class auto_diagnostic_group): New class.
8829         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
8830         (diagnostic_report_diagnostic): Handle the first diagnostics within
8831         a group.
8832         (emit_diagnostic): Add auto_diagnostic_group instance.
8833         (inform): Likewise.
8834         (inform_n): Likewise.
8835         (warning): Likewise.
8836         (warning_at): Likewise.
8837         (warning_n): Likewise.
8838         (pedwarn): Likewise.
8839         (permerror): Likewise.
8840         (error): Likewise.
8841         (error_n): Likewise.
8842         (error_at): Likewise.
8843         (sorry): Likewise.
8844         (fatal_error): Likewise.
8845         (internal_error): Likewise.
8846         (internal_error_no_backtrace): Likewise.
8847         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
8848         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
8849         * diagnostic.h (struct diagnostic_context): Add fields
8850         "diagnostic_group_nesting_depth",
8851         "diagnostic_group_emission_count", "begin_group_cb",
8852         "end_group_cb".
8853         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
8854         Add auto_diagnostic_group instance(s).
8855         (find_explicit_erroneous_behavior): Likewise.
8856         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
8857         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
8858         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
8859         (gimplify_va_arg_expr): Likewise.
8860         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
8861         (HSA_SORRY_AT): Likewise.
8862         * ipa-devirt.c (compare_virtual_tables): Likewise.
8863         (warn_odr): Likewise.
8864         * multiple_target.c (expand_target_clones): Likewise.
8865         * opts-common.c (cmdline_handle_error): Likewise.
8866         * reginfo.c (globalize_reg): Likewise.
8867         * substring-locations.c (format_warning_n_va): Likewise.
8868         * tree-inline.c (expand_call_inline): Likewise.
8869         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
8870         * tree-ssa-loop-niter.c
8871         (do_warn_aggressive_loop_optimizations): Likewise.
8872         * tree-ssa-uninit.c (warn_uninit): Likewise.
8873         * tree.c (warn_deprecated_use): Likewise.
8875 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
8877         PR target/87014
8878         * config/i386/i386.md (eh_return): Always update EH return
8879         address in word_mode.
8881 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
8883         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
8884         TARGET_SPLIT_COMPLEX_ARG is defined.
8886 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8888         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
8890 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8892         PR target/86984
8893         * expr.c (expand_assignment): Assert that bitpos is positive.
8894         (store_field): Likewise
8895         (expand_expr_real_1): Make sure that bitpos is positive.
8896         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
8897         integer overflow.
8899 2018-08-20  Nathan Sidwell  <nathan@acm.org>
8901         * Makefile.in (CPP_ID_DATA_H): Delete.
8902         (CPP_INTERNAL_H): Don't add it.
8903         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
8904         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
8906 2018-08-20  Richard Biener  <rguenther@suse.de>
8908         PR tree-optimization/78655
8909         * tree-vrp.c (extract_range_from_binary_expr_1): Make
8910         pointer + offset nonnull if either operand is nonnull work.
8912 2018-08-20  Tom de Vries  <tdevries@suse.de>
8914         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
8915         unless the referenced die describes the added property using
8916         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
8917         Otherwise, add a DW_AT_location to the referenced die.
8919 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
8921         PR target/86994
8922         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
8923         register_operand when calling ix86_set_reg_reg_cost.
8924         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
8925         Set *total to 0 for operands that satisfy x86_64_immediate_operand
8926         predicate and to 1 otherwise.
8928 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
8930         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
8931         emit a diagnostic that it is not supported and reset the option.
8932         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
8933         supported and consume the option.  (ASM_FINAL_SPEC): New.
8935 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
8937         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
8938         a sentence.
8940 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
8942         C-SKY port: Documentation
8944         * doc/extend.texi (C-SKY Function Attributes): New section.
8945         * doc/invoke.texi (Option Summary): Add C-SKY options.
8946         (C-SKY Options): New section.
8947         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
8949 2018-08-17  Jojo  <jijie_rong@c-sky.com>
8950             Huibin Wang  <huibin_wang@c-sky.com>
8951             Sandra Loosemore  <sandra@codesourcery.com>
8952             Chung-Lin Tang  <cltang@codesourcery.com>
8954         C-SKY port: Backend implementation
8956         * config/csky/*: New.
8957         * common/config/csky/*: New.
8959 2018-08-17  Jojo  <jijie_rong@c-sky.com>
8960             Huibin Wang  <huibin_wang@c-sky.com>
8961             Sandra Loosemore  <sandra@codesourcery.com>
8962             Chung-Lin Tang  <cltang@codesourcery.com>
8963             Andrew Jenner  <andrew@codesourcery.com>
8965         C-SKY port: Configury
8967         * config.gcc (csky-*-*): New.
8968         * configure.ac: Add csky to targets for dwarf2 debug_line support.
8969         * configure: Regenerated.
8971 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
8973         * dump-context.h: Include "dumpfile.h".
8974         (dump_context::dump_printf_va): Convert final param from va_list
8975         to va_list *.  Convert from ATTRIBUTE_PRINTF to
8976         ATTRIBUTE_GCC_DUMP_PRINTF.
8977         (dump_context::dump_printf_loc_va): Likewise.
8978         * dumpfile.c: Include "stringpool.h".
8979         (make_item_for_dump_printf_va): Delete.
8980         (make_item_for_dump_printf): Delete.
8981         (class dump_pretty_printer): New class.
8982         (dump_pretty_printer::dump_pretty_printer): New ctor.
8983         (dump_pretty_printer::emit_items): New member function.
8984         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
8985         function.
8986         (dump_pretty_printer::emit_item): New member function.
8987         (dump_pretty_printer::stash_item): New member function.
8988         (dump_pretty_printer::format_decoder_cb): New member function.
8989         (dump_pretty_printer::decode_format): New member function.
8990         (dump_context::dump_printf_va): Reimplement in terms of
8991         dump_pretty_printer.
8992         (dump_context::dump_printf_loc_va): Convert final param from va_list
8993         to va_list *.
8994         (dump_context::begin_scope): Reimplement call to
8995         make_item_for_dump_printf.
8996         (dump_printf): Update for change to dump_printf_va.
8997         (dump_printf_loc): Likewise.
8998         (selftest::test_capture_of_dump_calls): Convert "stmt" from
8999         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
9000         with %T, %E, and %G.
9001         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
9002         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
9003         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
9004         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
9005         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
9006         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
9007         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
9008         within a dump_printf_loc call to "%wu".
9009         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
9010         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
9011         missing space after "=".
9012         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
9013         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
9014         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
9015         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
9016         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
9017         duplicate "vectorized" from message.
9019 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
9021         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
9022         polyNxK_t element's TYPE_STRING_FLAG.
9024 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
9026         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
9027         (they were unnamed before).  Fix comments.
9029 2018-08-17  Nathan Sidwell  <nathan@acm.org>
9031         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
9033 2018-08-17  Richard Biener  <rguenther@suse.de>
9035         PR tree-optimization/86841
9036         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
9038 2018-08-17  Martin Liska  <mliska@suse.cz>
9040         * common.opt: Remove Warn, Init and Report for options with
9041         Ignore/Deprecated flag. Warning is done automatically for
9042         Deprecated flags.
9043         * config/i386/i386.opt: Likewise.
9044         * config/ia64/ia64.opt: Likewise.
9045         * config/rs6000/rs6000.opt: Likewise.
9046         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
9047         Remove usage of flag_check_pointer_bounds.
9048         * lto-wrapper.c (merge_and_complain): Do not handle
9049         OPT_fcheck_pointer_bounds.
9050         (append_compiler_options): Likewise.
9051         * opt-functions.awk: Do not handle Deprecated.
9052         * optc-gen.awk: Check that Var, Report and Init are not
9053         used for an option with Ignore/Deprecated flag.
9054         * opts-common.c (decode_cmdline_option): Do not report
9055         CL_ERR_DEPRECATED.
9056         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
9057         options.
9058         * opts.h (struct cl_option): Remove cl_deprecated flag.
9059         (CL_ERR_DEPRECATED): Remove error enum value.
9061 2018-08-17  Richard Biener  <rguenther@suse.de>
9063         PR middle-end/86505
9064         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
9065         across a va-arg-pack using call adjust its return value accordingly.
9067 2018-08-16  Martin Sebor  <msebor@redhat.com>
9069         PR tree-optimization/86853
9070         * gimple-ssa-sprintf.c (struct format_result): Rename member.
9071         (struct fmtresult): Add member and initialize it in ctors.
9072         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
9073         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
9074         (format_directive): Set POSUNDER4K when MAYFAIL is set.
9075         (parse_directive): Handle %C same as %c.
9076         (sprintf_dom_walker::compute_format_length): Adjust.
9077         (is_call_safe): Adjust.
9079 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9081         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
9082         for determining how to count the elements.
9083         * builtins.h (c_strlen): Adjust prototype.
9084         * expr.c (string_constant): Add new parameter mem_size.
9085         Set *mem_size appropriately.
9086         * expr.h (string_constant): Adjust protoype.
9087         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
9088         * gimple-fold.h (get_range_strlen): Adjust prototype.
9089         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
9090         (format_string): Call get_string_length with eltsize.
9092 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
9094         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
9095         to emit the span, rather than setting it as the prefix.
9097 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
9099         * diagnostic-show-locus.c (layout::start_annotation_line): Add
9100         "margin_char" parameter, defaulting to space.  Use it in place
9101         of pp_space for the initial part of the margin.
9102         (layout::print_leading_fixits): Use '+' when filling the margin
9103         of line-insertion fix-it hints.
9105 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
9107         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
9108         Delete.
9110 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
9112         * config/rs6000/altivec.md: Don't set length attribute to the default
9113         value.
9114         * config/rs6000/darwin.md: Ditto.
9115         * config/rs6000/dfp.md: Ditto.
9116         * config/rs6000/htm.md: Ditto.
9117         * config/rs6000/rs6000.md: Ditto.
9118         * config/rs6000/sync.md: Ditto.
9119         * config/rs6000/vsx.md: Ditto.
9121 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
9123         * config/rs6000/altivec.md: Don't set length attribute to the default
9124         value, for branch instructions.
9125         * config/rs6000/darwin.md: Ditto.
9126         * config/rs6000/rs6000.md: Ditto.
9128 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
9130         * config/rs6000/rs6000.md (length): Always define as const_int 4.
9131         (unnamed conditional branch define_insn): Set length to 4 or 8
9132         depending on offset.
9133         (<bd>_<mode>): Similar, for alternative 0.
9134         (<bd>tf_<mode>): Ditto.
9136 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
9138         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
9140 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
9142         * doc/rtl.texi: Replace old RTX class names with new names.
9145 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
9147         * expmed.h (canonicalize_comparison): New declaration.
9148         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
9149         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
9150         * optabs.c (prepare_cmp_insn): Likewise.
9151         * rtl.h (unsigned_condition_p): New function which checks if a
9152         comparison operator is unsigned.
9154 2018-08-16  Nathan Sidwell  <nathan@acm.org>
9156         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
9157         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
9159 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
9161         PR target/84711
9162         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
9163         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
9164         (mov<mov>): ..this and enable unconditionally.
9166 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
9168         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
9170 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
9172         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
9173         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
9174         "Common" with "Target".
9176 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
9178         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
9179         * doc/invoke.texi (mmitigate-rop): Remove.
9180         * config/i386/i386.c: Do not include "regrename.h".
9181         (ix86_rop_should_change_byte_p, reg_encoded_number)
9182         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
9183         Remove.
9184         (ix86_reorg): Remove call to ix86_mitigate_rop.
9185         * config/i386/i386.md (attr "modrm_class"): Remove.
9186         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
9187         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
9188         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
9190 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
9192         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
9193         allow folding of mergeh() and mergel() for the float and double types.
9194         (fold_mergehl_helper): Rework to handle building a permute tree
9195         for float vectors.
9197 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
9199         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
9200         for TARGET_SSE.
9202 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
9204         * common.opt (fdiagnostics-show-labels): New option.
9205         * diagnostic-show-locus.c (class layout_range): Add field
9206         "m_label".
9207         (class layout): Add field "m_show_labels_p".
9208         (layout_range::layout_range): Add param "label" and use it to
9209         initialize m_label.
9210         (make_range): Pass in NULL for new "label" param of layout_range's
9211         ctor.
9212         (layout::layout): Initialize m_show_labels_p.
9213         (layout::maybe_add_location_range): Pass in loc_range->m_label
9214         when constructing layout_range instances.
9215         (struct line_label): New struct.
9216         (layout::print_any_labels): New member function.
9217         (layout::print_line): Call it if label-printing is enabled.
9218         (selftest::test_one_liner_labels): New test.
9219         (selftest::test_diagnostic_show_locus_one_liner): Call it.
9220         * diagnostic.c (diagnostic_initialize): Initialize
9221         context->show_labels_p.
9222         * diagnostic.h (struct diagnostic_context): Add field
9223         "show_labels_p".
9224         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9225         -fno-diagnostics-show-labels.
9226         * dwarf2out.c (gen_producer_string): Add
9227         OPT_fdiagnostics_show_labels to the ignored options.
9228         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9229         param.
9230         (gcc_rich_location::maybe_add_expr): Likewise.
9231         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9232         label" param, defaulting to NULL.
9233         (gcc_rich_location::add_expr): Add "label" param.
9234         (gcc_rich_location::maybe_add_expr): Likewise.
9235         (class text_range_label): New class.
9236         (class range_label_for_type_mismatch): New class.
9237         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9238         of format_warning_va.
9239         (fmtwarn_n): Likewise for new params of format_warning_n_va.
9240         * lto-wrapper.c (merge_and_complain): Add
9241         OPT_fdiagnostics_show_labels to the "pick one setting" options.
9242         (append_compiler_options): Likewise to the dropped options.
9243         (append_diag_options): Likewise to the passed-on options.
9244         * opts.c (common_handle_option): Handle the new option.
9245         * selftest-diagnostic.c
9246         (test_diagnostic_context::test_diagnostic_context): Enable
9247         show_labels_p.
9248         * substring-locations.c: Include "gcc-rich-location.h".
9249         (format_warning_n_va): Add "fmt_label" and "param_label" params
9250         and use them as appropriate.
9251         (format_warning_va): Add "fmt_label" and "param_label" params,
9252         passing them on to format_warning_n_va.
9253         (format_warning_at_substring): Likewise.
9254         (format_warning_at_substring_n): Likewise.
9255         * substring-locations.h (format_warning_va): Add "fmt_label" and
9256         "param_label" params.
9257         (format_warning_n_va): Likewise.
9258         (format_warning_at_substring): Likewise.
9259         (format_warning_at_substring_n): Likewise.
9260         * toplev.c (general_init): Initialize global_dc->show_labels_p.
9262 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
9264         PR testsuite/86519
9265         * builtins.c (expand_builtin_memcmp): Do not expand the call
9266         when overflow is detected.
9268 2018-08-15  Martin Sebor  <msebor@redhat.com>
9270         PR tree-optimization/71625
9271         * config/aarch64/aarch64-builtins.c
9272         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9274 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
9276         * config/s390/s390.c (s390_reorg): Remove loop.
9278 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
9280         * config/darwin.c
9281          (darwin_function_switched_text_sections): Delete.
9282         * gcc/config/darwin.h
9283          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9285 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
9287         PR target/81685
9288         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9289         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
9290         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9292 2018-08-15  Martin Liska  <mliska@suse.cz>
9294         PR tree-optimization/86925
9295         * predict.c (expr_expected_value_1): When taking
9296         later predictor, assign also probability.
9297         Use fold_build2_initializer_loc in order to fold
9298         the expression in -frounding-math.
9300 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
9302         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9303         patterns.
9304         (expand_vec_perm_1): Try the new method.
9306 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
9308         PR target/86547
9309         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9310         Check whether lra_live_max_point is 0 before dividing.
9312 2018-08-14  Martin Sebor  <msebor@redhat.com>
9314         PR tree-optimization/86650
9315         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9316         (vrp_prop::check_mem_ref): Same.
9318 2018-08-13  Liu Hao <lh_mouse@126.com>
9320         * pretty-print.c (eat_esc_sequence): Swap the foreground and
9321         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9322         and clear it thereafter, as it only works for DBCS.
9324 2018-08-13  Liu Hao <lh_mouse@126.com>
9326         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9327         handle returned by _get_osf_handle().
9329 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
9331         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9332         for folding vec_perm.
9334 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
9336         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9337         Add support for gimple-folding of vec_pack() and vec_unpack()
9338         intrinsics.
9340 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
9342         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9343         vec_xst variants to the list.
9344         (rs6000_gimple_fold_builtin): Add support for folding unaligned
9345         vector loads and stores.
9347 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
9349         * config.gcc (rs6000-ibm-aix4.x): Delete.
9350         (rs6000-ibm-aix5.1): Delete.
9351         (rs6000-ibm-aix5.2): Delete.
9352         (rs6000-ibm-aix5.3): Delete.
9353         * config/rs6000/aix43.h: Delete.
9354         * config/rs6000/aix51.h: Delete.
9355         * config/rs6000/aix52.h: Delete.
9356         * config/rs6000/t-aix43: Delete.
9358 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
9360         * config/s390/s390.c (s390_decompose_constant_pool_ref):
9361         New function.
9362         (s390_decompose_address): Factor out constant pool ref
9363         decomposition.
9365 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9367         * config/nds32/nds32-predicates.c
9368         (nds32_can_use_bclr_p): Change return type as bool.
9369         (nds32_can_use_bset_p): Ditto.
9370         (nds32_can_use_btgl_p): Ditto.
9371         (nds32_can_use_bitci_p): Ditto.
9372         * config/nds32/nds32-protos.h
9373         (nds32_can_use_bclr_p): Change declaration.
9374         (nds32_can_use_bset_p): Ditto.
9375         (nds32_can_use_btgl_p): Ditto.
9376         (nds32_can_use_bitci_p): Ditto.
9378 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9380         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9381         Support -msched-prolog-epilog option.
9382         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9384 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9386         * common/config/nds32/nds32-common.c
9387         (nds32_option_optimization_table): Enalbe -malways-align.
9389 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9391         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9392         extra_headers.
9393         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9394         OPT_misr_secure_ case.
9395         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9396         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9397         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9398         secure attribute.
9399         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9400         (nds32_isr_info): New field security_level.
9401         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9402         * config/nds32/nds32.md (return_internal): Consider critical attribute.
9403         * config/nds32/nds32.opt (misr-secure): New option.
9404         * config/nds32/nds32_init.inc: New file.
9405         * config/nds32/nds32_isr.h: New file.
9407 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
9409         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9410         Update comment for atomic instructions.
9411         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9412         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9413         Remove.
9414         (atomic_loaddi): Revise fence expansion to only emit fence prior to
9415         load for __ATOMIC_SEQ_CST model.
9416         (atomic_loaddi_1): Remove float register target.
9417         (atomic_storedi): Handle CONST_INT values.
9418         (atomic_storedi_1): Remove float register source.  Add special case
9419         for zero value.
9420         (memory_barrier): New expander and insn.
9422 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
9424         PR tree-optimization/86835
9425         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9426         new_stmt after def_gsi, make sure to insert new_square_stmt after
9427         that stmt, not 2 stmts before it.
9429 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
9431         PR target/82418
9432         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9433         instead of SWI48.
9435 2018-08-10  Martin Liska  <mliska@suse.cz>
9437         PR target/83610
9438         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9439         function type.
9440         * builtins.c (expand_builtin_expect_with_probability):
9441         New function.
9442         (expand_builtin_expect_with_probability): New function.
9443         (build_builtin_expect_predicate): Add new argumnet probability
9444         for BUILT_IN_EXPECT_WITH_PROBABILITY.
9445         (fold_builtin_expect):
9446         (fold_builtin_2):
9447         (fold_builtin_3):
9448         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9449         * builtins.h (fold_builtin_expect): Set new argument.
9450         * doc/extend.texi: Document __builtin_expect_with_probability.
9451         * doc/invoke.texi: Likewise.
9452         * gimple-fold.c (gimple_fold_call): Pass new argument.
9453         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9454         also BUILT_IN_EXPECT_WITH_PROBABILITY.
9455         * predict.c (get_predictor_value): New function.
9456         (expr_expected_value): Add new argument probability. Assume
9457         that predictor and probability are always non-null.
9458         (expr_expected_value_1): Likewise.  For __builtin_expect and
9459         __builtin_expect_with_probability set probability.  Handle
9460         combination in binary expressions.
9461         (tree_predict_by_opcode): Simplify code by simply calling
9462         get_predictor_value.
9463         (pass_strip_predict_hints::execute): Add handling of
9464         BUILT_IN_EXPECT_WITH_PROBABILITY.
9465         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9466         new predictor.
9467         * tree.h (DECL_BUILT_IN_P): New function.
9469 2018-08-10  Martin Liska  <mliska@suse.cz>
9471         PR tree-optimization/85799
9472         * passes.def: Add argument for pass_strip_predict_hints.
9473         * predict.c (class pass_strip_predict_hints): Add new argument
9474         early_p.
9475         (strip_predictor_early): New function.
9476         (pass_strip_predict_hints::execute): Call the function to
9477         strip predictors.
9478         (strip_predict_hints): New function.
9479         * predict.def: Fix comment.
9481 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
9483         * Makefile.in: Clarify which tm.texi to copy over to assert the
9484         right to grant a GFDL license for all.
9486 2018-08-09  Jeff Law  <law@redhat.com>
9488         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9489         unused variable.
9491 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
9493         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9494         prototype.
9496 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9498         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9499         reductions for variable-length vectors.
9501 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
9503         PR other/84889
9504         * common.opt (fdiagnostics-show-line-numbers): New option.
9505         * diagnostic-show-locus.c (class layout): Add fields
9506         "m_show_line_numbers_p" and "m_linenum_width";
9507         (num_digits): New function.
9508         (test_num_digits): New function.
9509         (layout::layout): Initialize new fields.  Update m_x_offset
9510         logic to handle any left margin.
9511         (layout::print_source_line): Print line number when requested.
9512         (layout::start_annotation_line): New member function.
9513         (layout::print_annotation_line): Call it.
9514         (layout::print_leading_fixits): Likewise.
9515         (layout::print_trailing_fixits): Likewise.  Update calls to
9516         move_to_column for new parameter.
9517         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9518         it to potentially call start_annotation_line.
9519         (layout::show_ruler): Call start_annotation_line.
9520         (selftest::test_line_numbers_multiline_range): New selftest.
9521         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9522         and selftest::test_line_numbers_multiline_range.
9523         * diagnostic.c (diagnostic_initialize): Initialize
9524         show_line_numbers_p.
9525         * diagnostic.h (struct diagnostic_context): Add field
9526         "show_line_numbers_p".
9527         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9528         -fno-diagnostics-show-line-numbers.
9529         * dwarf2out.c (gen_producer_string): Add
9530         OPT_fdiagnostics_show_line_numbers to the ignored options.
9531         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9532         one setting" options.
9533         (append_compiler_options): Likewise to the dropped options.
9534         (append_diag_options): Likewise to the passed-on options.
9535         * opts.c (common_handle_option): Handle the new option.
9536         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9538 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9540         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9541         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
9542         third argument of type "const signed char" to descriptions of
9543         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9544         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9545         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9546         __builtin_bcdsub_ov functions.
9548 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9550         PR tree-optimization/86858
9551         * tree-vect-loop.c (vect_is_simple_reduction): Restore
9552         flow_bb_inside_loop_p calls.
9554 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9556         PR tree-optimization/86871
9557         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9558         instead of gimple_assign_lhs.
9560 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
9562         PR target/86887
9563         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9564         register constraint to operand 0.
9565         (add<mode>3_carryinC): Likewise.
9566         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9568 2018-08-09  Martin Liska  <mliska@suse.cz>
9570         PR c/86895
9571         * common.opt: Remove extra line.
9573 2018-08-09  Martin Liska  <mliska@suse.cz>
9575         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9576         at the end of a line, make first letter capital and end up
9577         a sentence with a dot.
9578         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9579         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9580         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9581         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9582         (PARAM_MAX_ISL_OPERATIONS): Likewise.
9583         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9584         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9585         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9586         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9587         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9588         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9589         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9590         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9591         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9592         (PARAM_TREE_REASSOC_WIDTH): Likewise.
9593         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9594         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9595         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9597 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
9599         PR target/84332
9600         * config/s390/s390.c (s390_option_override_internal): Reduce the
9601         stack-clash-protection-probe-interval param if it would be too big
9602         for z900.
9604 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
9606         PR target/46179
9607         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9608         * config/m68k/m68k.c (handle_move_double): Don't call
9609         m68k_final_prescan_insn.
9610         (m68k_adjust_decorated_operand): Renamed from
9611         m68k_final_prescan_insn, remove first and third operand and
9612         simplify.
9613         (print_operand): Call it.
9614         (print_operand_address): Call it.
9616 2018-08-08  Nathan Sidwell  <nathan@acm.org>
9618         * diagnostic.c (diagnostic_report_current_module): Use
9619         linemap_included_from & linemap_included_from_linemap.
9621 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
9623         * config/aarch64/aarch64-cores.def: Add phecda core.
9624         * config/aarch64/aarch64-tune.md: Regenerate.
9625         * doc/invoke.texi: Add phecda core.
9627 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
9629         PR target/85295
9630         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9631         definitions.
9632         * config/s390/s390.md ("movti"): Add more alternatives for
9633         constant to GPR copies.
9635 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
9637         * config/s390/s390.c: Fix whitespace damage throughout the file.
9638         * config/s390/s390.h: Likewise.
9639         * config/s390/tpf.h: Likewise.
9641 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
9643         * config/s390/s390.c (s390_loadrelative_operand_p):
9644         Remove TARGET_CPU_ZARCH usages.
9645         (s390_rtx_costs): Likewise.
9646         (s390_legitimate_constant_p): Likewise.
9647         (s390_cannot_force_const_mem): Likewise.
9648         (legitimate_reload_constant_p): Likewise.
9649         (s390_preferred_reload_class): Likewise.
9650         (legitimize_pic_address): Likewise.
9651         (legitimize_tls_address): Likewise.
9652         (s390_split_branches): Removed.
9653         (s390_add_execute): Removed.
9654         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9655         (s390_mainpool_start): Likewise.
9656         (s390_mainpool_finish): Likewise.
9657         (s390_mainpool_cancel): Removed.
9658         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9659         (s390_chunkify_cancel): Likewise.
9660         (s390_return_addr_rtx): Likewise.
9661         (s390_register_info): Remove split_branches_pending_p uages.
9662         (s390_optimize_register_info): Likewise.
9663         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9664         split_branches_pending_p usages.
9665         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9666         (s390_load_got): Likewise.
9667         (s390_expand_split_stack_prologue): Likewise.
9668         (output_asm_nops): Likewise.
9669         (s390_function_profiler): Likewise.
9670         (s390_emit_call): Likewise.
9671         (s390_conditional_register_usage): Likewise.
9672         (s390_optimize_prologue): Likewise.
9673         (s390_reorg): Remove TARGET_CPU_ZARCH and
9674         split_branches_pending_p usages.
9675         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9676         usages.
9677         (s390_output_indirect_thunk_function): Likewise.
9678         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9679         (TARGET_CPU_ZARCH_P): Removed.
9680         (struct machine_function): Remove split_branches_pending_p.
9681         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9683 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
9685         * common/config/s390/s390-common.c (processor_flags_table):
9686         Remove flags.
9687         * config.gcc: Remove with_arch/with_tune support.
9688         * config/s390/2064.md: Remove cpu attribute comparisons.
9689         * config/s390/driver-native.c (s390_host_detect_local_cpu):
9690         Remove MTN.
9691         * config/s390/linux.h (ASM_SPEC):
9692         Remove -march support.
9693         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9694         Use a table to get an arch level.
9695         * config/s390/s390-opts.h (enum processor_type):
9696         Remove enum values.
9697         * config/s390/s390.c
9698         (processor_table): Remove entries, add arch_level values.
9699         (s390_issue_rate): Remove cases.
9700         (s390_option_override): Adjust
9701         s390_option_override_internal() call.
9702         (s390_option_override_internal): Remove deprecation warning.
9703         (s390_valid_target_attribute_tree): Adjust
9704         s390_option_override_internal() call.
9705         * config/s390/s390.h (struct s390_processor):
9706         Share with s390-c.c, add arch_level field.
9707         * config/s390/s390.md:
9708         Remove occurrences in cpu attribute.
9709         * config/s390/s390.opt: Remove -march/-mtune support.
9710         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9711         * doc/invoke.texi: Remove deprecation warning.
9713 2018-08-08  Luis Machado  <luis.machado@linaro.org>
9715         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9716         global.
9717         (qdf24xx_tunings): Set vector cost structure to
9718         qdf24xx_vector_cost.
9720         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9721         <register_sextend>: Set to 3.
9723 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
9725         PR target/86838
9726         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9727         * config/aarch64/aarch64-simd.md
9728         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9729         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9730         (aarch64_frecpx<mode>): ...this new pattern.
9731         * config/aarch64/aarch64-simd-builtins.def: Remove comment
9732         about aarch64_frecp<FRECP:frecp_suffix><mode>.
9734 2018-08-07  Martin Liska  <mliska@suse.cz>
9736         PR middle-end/83023
9737         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9738         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9739         * predict.def (PRED_MALLOC_NONNULL): New predictor.
9740         * doc/extend.texi: Document that malloc attribute adds
9741         hit to compiler.
9743 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
9745         PR target/86785
9746         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9747         Define to speculation_safe_value_not_needed.
9749 2018-08-06  Jeff Law  <law@redhat.com>
9751         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9752         the vr_values instance to cprop_into_stmt.
9753         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9754         (cprop_operand): Also query EVRP to determine if OP is a constant.
9756 2018-08-06  Nathan Sidwell  <nathan@acm.org>
9758         * diagnostic.c (diagnostic_report_current_module): Reroll
9759         included-at loop.  Translate text.
9761 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
9763         * function-tests.c (selftest::test_expansion_to_rtl): Call
9764         free_after_compilation.
9766 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9768         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
9770 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
9772         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
9773         loops with memory block operations from getting unrolled.
9775 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
9777         PR target/86807
9778         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9779         Define to speculation_safe_value_not_needed.
9781 2018-08-06  Jeff Law  <law@redhat.com>
9783         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
9784         assert.
9786 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9788         PR target/86662
9789         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
9790         with all enabled __intN types.
9792         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
9794 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9796         * alias.c (record_set): Check for clobber high.
9797         * cfgexpand.c (expand_gimple_stmt): Likewise.
9798         * combine-stack-adj.c (single_set_for_csa): Likewise.
9799         * combine.c (find_single_use_1): Likewise.
9800         (set_nonzero_bits_and_sign_copies): Likewise.
9801         (get_combine_src_dest): Likewise.
9802         (is_parallel_of_n_reg_sets): Likewise.
9803         (try_combine): Likewise.
9804         (record_dead_and_set_regs_1): Likewise.
9805         (reg_dead_at_p_1): Likewise.
9806         (reg_dead_at_p): Likewise.
9807         * dce.c (deletable_insn_p): Likewise.
9808         (mark_nonreg_stores_1): Likewise.
9809         (mark_nonreg_stores_2): Likewise.
9810         * df-scan.c (df_find_hard_reg_defs): Likewise.
9811         (df_uses_record): Likewise.
9812         (df_get_call_refs): Likewise.
9813         * dwarf2out.c (mem_loc_descriptor): Likewise.
9814         * haifa-sched.c (haifa_classify_rtx): Likewise.
9815         * ira-build.c (create_insn_allocnos): Likewise.
9816         * ira-costs.c (scan_one_insn): Likewise.
9817         * ira.c (equiv_init_movable_p): Likewise.
9818         (rtx_moveable_p): Likewise.
9819         (interesting_dest_for_shprep): Likewise.
9820         * jump.c (mark_jump_label_1): Likewise.
9821         * postreload-gcse.c (record_opr_changes): Likewise.
9822         * postreload.c (reload_cse_simplify): Likewise.
9823         (struct reg_use): Add source expr.
9824         (reload_combine): Check for clobber high.
9825         (reload_combine_note_use): Likewise.
9826         (reload_cse_move2add): Likewise.
9827         (move2add_note_store): Likewise.
9828         * print-rtl.c (print_pattern): Likewise.
9829         * recog.c (decode_asm_operands): Likewise.
9830         (store_data_bypass_p): Likewise.
9831         (if_test_bypass_p): Likewise.
9832         * regcprop.c (kill_clobbered_value): Likewise.
9833         (kill_set_value): Likewise.
9834         * reginfo.c (reg_scan_mark_refs): Likewise.
9835         * reload1.c (maybe_fix_stack_asms): Likewise.
9836         (eliminate_regs_1): Likewise.
9837         (elimination_effects): Likewise.
9838         (mark_not_eliminable): Likewise.
9839         (scan_paradoxical_subregs): Likewise.
9840         (forget_old_reloads_1): Likewise.
9841         * reorg.c (find_end_label): Likewise.
9842         (try_merge_delay_insns): Likewise.
9843         (redundant_insn): Likewise.
9844         (own_thread_p): Likewise.
9845         (fill_simple_delay_slots): Likewise.
9846         (fill_slots_from_thread): Likewise.
9847         (dbr_schedule): Likewise.
9848         * resource.c (update_live_status): Likewise.
9849         (mark_referenced_resources): Likewise.
9850         (mark_set_resources): Likewise.
9851         * rtl.c (copy_rtx): Likewise.
9852         * rtlanal.c (reg_referenced_p): Likewise.
9853         (single_set_2): Likewise.
9854         (noop_move_p): Likewise.
9855         (note_stores): Likewise.
9856         * sched-deps.c (sched_analyze_reg): Likewise.
9857         (sched_analyze_insn): Likewise.
9859 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9861         * cse.c (invalidate_reg): New function extracted from...
9862         (invalidate): ...here.
9863         (canonicalize_insn): Check for clobber high.
9864         (invalidate_from_clobbers): invalidate clobber highs.
9865         (invalidate_from_sets_and_clobbers): Likewise.
9866         (count_reg_usage): Check for clobber high.
9867         (insn_live_p): Likewise.
9868         * cselib.c (cselib_expand_value_rtx_1):Likewise.
9869         (cselib_invalidate_regno): Check for clobber in setter.
9870         (cselib_invalidate_rtx): Pass through setter.
9871         (cselib_invalidate_rtx_note_stores):
9872         (cselib_process_insn): Check for clobber high.
9873         * cselib.h (cselib_invalidate_rtx): Add operand.
9875 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9877         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
9878         (mark_not_eliminable): Likewise.
9879         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
9880         * lra-lives.c (process_bb_lives): Check for clobber high.
9881         * lra.c (new_insn_reg): Remember clobber highs.
9882         (collect_non_operand_hard_regs): Check for clobber high.
9883         (lra_set_insn_recog_data): Likewise.
9884         (add_regs_to_insn_regno_info): Likewise.
9885         (lra_update_insn_regno_info): Likewise.
9887 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9889         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
9890         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
9892 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9894         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
9895         (copy_insn_1): Likewise.
9896         (gen_hard_reg_clobber_high): New gen function.
9897         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
9898         * genemit.c (gen_exp): Likewise.
9899         (gen_emit_seq): Pass through info.
9900         (gen_insn): Check for CLOBBER_HIGH.
9901         (gen_expand): Pass through info.
9902         (gen_split): Likewise.
9903         (output_add_clobbers): Likewise.
9904         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
9905         (remove_clobbers): Likewise.
9906         * rtl.h (gen_hard_reg_clobber_high): New declaration.
9908 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9910         * doc/rtl.texi (clobber_high): Add.
9911         (parallel): Add in clobber high
9912         * rtl.c (rtl_check_failed_code3): Add function.
9913         * rtl.def (CLOBBER_HIGH): Add expression.
9914         * rtl.h (RTL_CHECKC3): Add macro.
9915         (rtl_check_failed_code3): Add declaration.
9916         (XC3EXP): Add macro.
9918 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
9920         PR target/86386
9921         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
9922         cfun->machine->max_used_stack_alignment if needed.
9924 2018-08-04  Martin Sebor  <msebor@redhat.com>
9926         PR tree-optimization/86571
9927         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
9928         NaN output to 4.
9930 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
9932         PR target/86799
9933         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9934         Define.
9936 2018-08-03  Jeff Law  <law@redhat.com>
9938         PR target/86795
9939         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9940         Define to speculation_safe_value_not_needed.
9942 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
9944         * doc/gcov.texi (-x): Remove duplicate "to".
9945         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
9946         (-Wif-not-aligned): Remove duplicate "is".
9947         (-flto): Remove duplicate "the".
9948         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
9949         duplicate "v5.00.b".
9950         (MSP430 Options): Remove duplicate "and" from the description
9951         of "-mgprel-sec=regexp".
9952         (x86 Options): Remove duplicate copies of "vmldLog102" and
9953         vmlsLog104 from description of "-mveclibabi=type".
9955 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
9957         * internal-fn.h (first_commutative_argument): Declare.
9958         * internal-fn.c (first_commutative_argument): New function.
9959         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
9960         restrictions for pattern statements.  Use first_commutative_argument
9961         to look for commutative operands in calls to internal functions.
9963 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
9965         * Makefile.in (wide-int-range.o): New.
9966         * tree-vrp.c: Move all the wide_int_* functions to...
9967         * wide-int-range.cc: ...here.
9968         * tree-vrp.h: Move all the wide_int_* prototypes to...
9969         * wide-int-range.h: ...here.
9971 2018-08-03  Tom de Vries  <tdevries@suse.de>
9973         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
9974         UI_NONE.
9975         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
9976         * except.c (output_function_exception_table): Do early exit if
9977         targetm_common.except_unwind_info (&global_options) == UI_NONE.
9979 2018-08-03  Martin Liska  <mliska@suse.cz>
9981         * predict.c (dump_prediction): Change to 2 digits
9982         in fraction part.
9984 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9986         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
9987         neon_dup_q to...
9988         (falkor_am_1_gtov_gtov): ... a new insn reservation.
9990 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
9992         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
9993         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
9994         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
9995         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
9996         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
9998 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
10000         * diagnostic-show-locus.c (diagnostic_show_locus): Use
10001         pp_take_prefix when saving the existing prefix.
10002         * diagnostic.c (diagnostic_append_note): Likewise.
10003         * langhooks.c (lhd_print_error_function): Likewise.
10004         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
10005         param's type.  Free the existing prefix.
10006         (pp_take_prefix): New function.
10007         (pretty_printer::pretty_printer): Drop the prefix parameter.
10008         Rename the length parameter to match the comment.
10009         (pretty_printer::~pretty_printer): Free the prefix.
10010         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
10011         parameter.
10012         (struct pretty_printer): Drop the "const" from "prefix" field's
10013         type and clarify memory management.
10014         (pp_set_prefix): Drop the "const" from the 2nd param.
10015         (pp_take_prefix): New decl.
10017 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
10019         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
10020         for word_mode_ok here instead of passing as argument.
10021         (expand_block_compare): Change select_block_compare_mode() call.
10022         (expand_strncmp_gpr_sequence): New function.
10023         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
10025 2018-08-02  Jeff Law  <law@redhat.com>
10027         PR target/86790
10028         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10029         Define to speculation_safe_value_not_needed.
10031         PR target/86784
10032         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10033         Define to speculation_safe_value_not_needed.
10035 2018-08-02  Tom de Vries  <tdevries@suse.de>
10037         PR target/86660
10038         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
10039         function.  Return UI_TARGET unconditionally.
10040         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
10041         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
10043 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
10045         * genemit.c (print_overload_test): Fix typo.
10047 2018-08-02  Richard Biener  <rguenther@suse.de>
10049         PR tree-optimization/86816
10050         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
10051         which checks for value availability before querying it.
10052         (gvn_uses_equal): Use it.
10053         (same_succ_hash): Likewise.
10054         (gimple_equal_p): Likewise.
10056 2018-08-02  Nick Clifton  <nickc@redhat.com>
10058         PR target/86813
10059         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10060         Define to speculation_safe_value_not_needed.
10062         PR target/86810
10063         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10064         Define to speculation_safe_value_not_needed.
10066         PR target/86810
10067         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10068         Define to speculation_safe_value_not_needed.
10070         PR target/86803
10071         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10072         Define to speculation_safe_value_not_needed.
10074         PR target/86797
10075         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10076         Define to speculation_safe_value_not_needed.
10078         PR target/86791
10079         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10080         Define to speculation_safe_value_not_needed.
10082         PR target/86789
10083         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10084         Define to speculation_safe_value_not_needed.
10086         PR target/86787
10087         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10088         Define to speculation_safe_value_not_needed.
10090         PR target/86782
10091         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10092         speculation_safe_value_not_needed.
10094         PR target/86781
10095         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
10096         to speculation_safe_value_not_needed.
10098 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
10100         * doc/md.texi: Expand the documentation of instruction names
10101         to mention port-local uses.  Document '@' in pattern names.
10102         * read-md.h (overloaded_instance, overloaded_name): New structs.
10103         (mapping): Declare.
10104         (md_reader::handle_overloaded_name): New member function.
10105         (md_reader::get_overloads): Likewise.
10106         (md_reader::m_first_overload): New member variable.
10107         (md_reader::m_next_overload_ptr): Likewise.
10108         (md_reader::m_overloads_htab): Likewise.
10109         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
10110         m_next_overload_ptr and m_overloads_htab.
10111         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
10112         (get_mode_token, get_code_token, get_int_token): New functions.
10113         (map_attr_string): Add an optional argument that passes back
10114         the associated iterator.
10115         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
10116         (md_reader::handle_overloaded_name, add_overload_instance): New
10117         functions.
10118         (apply_iterators): Handle '@' names.  Report an error if '@'
10119         is used without iterators.
10120         (initialize_iterators): Initialize the new iterator_group fields.
10121         * genopinit.c (handle_overloaded_code_for)
10122         (handle_overloaded_gen): New functions.
10123         (main): Use them to print declarations of maybe_code_for_* and
10124         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
10125         * genemit.c (print_overload_arguments, print_overload_test)
10126         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
10127         (main): Use it to print definitions of maybe_code_for_* and
10128         maybe_gen_* functions.
10129         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
10130         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
10131         instead of explicit mode checks.
10132         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
10133         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
10134         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
10135         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
10136         (aarch64_expand_compare_and_swap): Likewise
10137         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
10138         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
10139         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
10140         (aarch64_constant_pool_reload_icode): Delete.
10141         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
10142         instead of aarch64_constant_pool_reload_icode.  Use
10143         code_for_aarch64_reload_mov instead of explicit mode checks.
10144         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
10145         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
10146         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
10147         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
10148         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
10149         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
10150         (aarch64_atomic_load_op_code): Delete.
10151         (aarch64_emit_atomic_load_op): Likewise.
10152         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
10153         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
10154         instead of aarch64_emit_atomic_load_op.
10155         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
10156         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
10157         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
10158         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
10159         character before the pattern name.
10160         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
10161         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
10162         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
10163         (aarch64_frecps<mode>): Likewise.
10164         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
10165         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
10166         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
10167         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
10168         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
10170 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
10172         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
10173         Allow HFmode constants if TARGET_FP_F16INST.
10175 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
10177         PR target/86014
10178         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
10179         No longer check last store for clobber of address register.
10181 2018-08-02  Martin Liska  <mliska@suse.cz>
10183         PR gcov-profile/86817
10184         * gcov.c (process_all_functions): New function.
10185         (main): Call it.
10186         (process_file): Move functions processing to
10187         process_all_functions.
10189 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
10191         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
10192         "const" to the "gimple *" and "rtx_insn *" parameters.
10193         * dumpfile.h (dump_user_location_t::dump_user_location_t):
10194         Likewise.
10195         (dump_location_t::dump_location_t): Likewise.
10197 2018-08-01  Martin Sebor  <msebor@redhat.com>
10199         PR tree-optimization/86650
10200         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
10201         rather than a "gcall *".  Directly pass the data of interest
10202         to percent_K_format, rather than building a temporary CALL_EXPR
10203         to hold it.
10204         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
10205         (gimple_fold_builtin_strncat): Adjust.
10206         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
10207         gcall* argument with gimple*.
10208         * gimple-ssa-warn-restrict.c (check_call): Same.
10209         (wrestrict_dom_walker::before_dom_children): Same.
10210         (builtin_access::builtin_access): Same.
10211         (check_bounds_or_overlap): Same
10212         (maybe_diag_overlap): Same.
10213         (maybe_diag_offset_bounds): Same.
10214         * tree-diagnostic.c (default_tree_printer): Move usage of
10215         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
10216         to this callsite.
10217         * tree-pretty-print.c (percent_K_format): Add argument.
10218         * tree-pretty-print.h: Add argument.
10219         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
10220         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10221         (maybe_diag_stxncpy_trunc): Same.
10222         (handle_builtin_stxncpy): Same.
10223         (handle_builtin_strcat): Same.
10225 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10227         * match.pd: Optimise pointer range checks.
10229 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10231         PR tree-optimization/86758
10232         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10233         to remove pattern statements.
10235 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10237         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10238         result of dfs_enumerate_from when constructing stmt_vec_infos,
10239         instead of additionally calling get_loop_body.
10241 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10243         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10244         parameter.
10245         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10246         When creating an iv, assert that the step is not known to be zero.
10247         (vect_setup_realignment): Update call accordingly.
10248         * tree-vect-stmts.c (vectorizable_store): Likewise.
10249         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
10251 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10253         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10254         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10255         (vectorizable_reduction): Likewise.
10256         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10257         (vect_detect_hybrid_slp_stmts): Likewise.
10258         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10260 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
10262         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10263         (wide_int_set_zero_nonzero_bits): ...this.
10264         (zero_nonzero_bits_from_vr): Rename to...
10265         (vrp_set_zero_nonzero_bits): ...this.
10266         (extract_range_from_multiplicative_op_1): Abstract wide int
10267         code...
10268         (wide_int_range_multiplicative_op): ...here.
10269         (extract_range_from_binary_expr_1): Extract wide int binary
10270         operations into their own functions.
10271         (wide_int_range_lshift): New.
10272         (wide_int_range_can_optimize_bit_op): New.
10273         (wide_int_range_shift_undefined_p): New.
10274         (wide_int_range_bit_xor): New.
10275         (wide_int_range_bit_ior): New.
10276         (wide_int_range_bit_and): New.
10277         (wide_int_range_trunc_mod): New.
10278         (extract_range_into_wide_ints): New.
10279         (vrp_shift_undefined_p): New.
10280         (extract_range_from_multiplicative_op): New.
10281         (vrp_can_optimize_bit_op): New.
10282         * tree-vrp.h (value_range::dump): New.
10283         (wide_int_range_multiplicative_op): New.
10284         (wide_int_range_lshift):New.
10285         (wide_int_range_shift_undefined_p): New.
10286         (wide_int_range_bit_xor): New.
10287         (wide_int_range_bit_ior): New.
10288         (wide_int_range_bit_and): New.
10289         (wide_int_range_trunc_mod): New.
10290         (zero_nonzero_bits_from_bounds): Rename to...
10291         (wide_int_set_zero_nonzero_bits): ...this.
10292         (zero_nonzero_bits_from_vr): Rename to...
10293         (vrp_set_zero_nonzero_bits): ...this.
10294         (range_easy_mask_min_max): Rename to...
10295         (wide_int_range_can_optimize_bit_op): this.
10296         * vr-values.c (simplify_bit_ops_using_ranges): Rename
10297         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10299 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10301         * tree-vectorizer.h (vect_orig_stmt): New function.
10302         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10303         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10304         (vect_create_epilog_for_reduction): Likewise.
10305         (vectorizable_live_operation): Likewise.
10306         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10307         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10308         * tree-vect-stmts.c (vectorizable_call): Likewise.
10309         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10311 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10313         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10314         argument.
10315         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10316         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10317         (vect_transform_loop): Likewise.
10318         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10320 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10322         * tree-vectorizer.h (vect_schedule_slp): Return void.
10323         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10324         (vect_schedule_slp): Likewise.
10326 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10328         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10329         argument.
10330         (vect_transform_loop): Update calls accordingly.  Schedule SLP
10331         instances before the main loop, if any exist.
10333 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10335         PR tree-optimization/86749
10336         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10337         If the lhs is used in a COND_EXPR, check that it is being used
10338         as the "then" or "else" value.
10340 2018-08-01  Tom de Vries  <tdevries@suse.de>
10342         PR target/86800
10343         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10344         speculation_safe_value_not_needed.
10346 2018-08-01  Richard Biener  <rguenther@suse.de>
10348         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10349         as base and offset.
10351 2018-08-01  Martin Liska  <mliska@suse.cz>
10353         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10354         format how successful transformation is dumped.
10355         (gimple_mod_pow2_value_transform): Likewise.
10356         (gimple_mod_subtract_transform): Likewise.
10357         (gimple_stringops_transform): Likewise.
10359 2018-08-01  Martin Liska  <mliska@suse.cz>
10361         PR value-prof/35543
10362         * value-prof.c (interesting_stringop_to_profile_p):
10363         Simplify the code and add BUILT_IN_MEMMOVE.
10364         (gimple_stringops_transform): Likewise.
10366 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
10368         * config/aarch64/aarch64-simd.md
10369         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10370         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10371         use GPI iterator instead of SI mode.
10373 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
10375         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10376         rs6000_speculation_barrier.
10377         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10378         new barrier pattern name.
10380 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
10382         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10383         (speculation_barrier): New insn.
10385 2018-08-01  Richard Biener  <rguenther@suse.de>
10387         PR bootstrap/86724
10388         * graphite.h: Include isl/id.h and isl/space.h to allow build
10389         with ISL 0.20.
10391 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
10393         PR target/86651
10394         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10395         mode for COFF targets.
10396         * defaults.h (TARGET_COFF): Define.
10397         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10398         TARGET_COFF): Define.
10399         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10400         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10401         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10403 2018-07-31  Alexandre Oliva <oliva@adacore.com>
10405         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10406         * gimple-streamer-out.c (output_bb): Save it.
10407         * lto-streamer-in.c (input_struct_function_base): Restore
10408         instance discriminator if available.  Create map on demand.
10409         * lto-streamer-out.c (output_struct_function_base): Save it if
10410         available.
10411         * final.c (decl_to_instance_map): Document LTO strategy.
10413 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
10414             Olivier Hainque  <hainque@adacore.com>
10416         * debug.h (decl_to_instance_map_t): New type.
10417         (decl_to_instance_map): Declare.
10418         (maybe_create_decl_to_instance_map): New inline function.
10419         * final.c (bb_discriminator, last_bb_discriminator): New statics,
10420         to track basic block discriminators.
10421         (final_start_function_1): Initialize them.
10422         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10423         bb_discriminator.
10424         (decl_to_instance_map): New variable.
10425         (map_decl_to_instance, maybe_set_discriminator): New functions.
10426         (notice_source_line): Set discriminator.
10428 2018-07-31  Ian Lance Taylor  <iant@golang.org>
10430         * targhooks.c (default_have_speculation_safe_value): Add
10431         ATTRIBUTE_UNUSED.
10433 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
10435         * dump-context.h: Include "pretty-print.h".
10436         (dump_context::refresh_dumps_are_enabled): New decl.
10437         (dump_context::emit_item): New decl.
10438         (class dump_context): Add fields "m_test_pp" and
10439         "m_test_pp_flags".
10440         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10441         (temp_dump_context::get_dumped_text): New decl.
10442         (class temp_dump_context): Add field "m_pp".
10443         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10444         (dump_context::refresh_dumps_are_enabled): ...and add a test for
10445         m_test_pp.
10446         (set_dump_file): Update for above change.
10447         (set_alt_dump_file): Likewise.
10448         (dump_loc): New overload, taking a pretty_printer *.
10449         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
10450         to any test pretty-printer.
10451         (make_item_for_dump_gimple_stmt): New function, adapted from
10452         optinfo::add_gimple_stmt.
10453         (dump_context::dump_gimple_stmt): Call it, and use the result,
10454         eliminating the direct usage of dump_file and alt_dump_file in
10455         favor of indirectly using them via emit_item.
10456         (make_item_for_dump_gimple_expr): New function, adapted from
10457         optinfo::add_gimple_expr.
10458         (dump_context::dump_gimple_expr): Call it, and use the result,
10459         eliminating the direct usage of dump_file and alt_dump_file in
10460         favor of indirectly using them via emit_item.
10461         (make_item_for_dump_generic_expr): New function, adapted from
10462         optinfo::add_tree.
10463         (dump_context::dump_generic_expr): Call it, and use the result,
10464         eliminating the direct usage of dump_file and alt_dump_file in
10465         favor of indirectly using them via emit_item.
10466         (make_item_for_dump_printf_va): New function, adapted from
10467         optinfo::add_printf_va.
10468         (make_item_for_dump_printf): New function.
10469         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10470         and use the result, eliminating the direct usage of dump_file and
10471         alt_dump_file in favor of indirectly using them via emit_item.
10472         (make_item_for_dump_dec): New function.
10473         (dump_context::dump_dec): Call it, and use the result,
10474         eliminating the direct usage of dump_file and alt_dump_file in
10475         favor of indirectly using them via emit_item.
10476         (make_item_for_dump_symtab_node): New function, adapted from
10477         optinfo::add_symtab_node.
10478         (dump_context::dump_symtab_node): Call it, and use the result,
10479         eliminating the direct usage of dump_file and alt_dump_file in
10480         favor of indirectly using them via emit_item.
10481         (dump_context::begin_scope): Reimplement, avoiding direct usage
10482         of dump_file and alt_dump_file in favor of indirectly using them
10483         via emit_item.
10484         (dump_context::emit_item): New member function.
10485         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10486         Set up test pretty-printer on the underlying context.  Call
10487         refresh_dumps_are_enabled.
10488         (temp_dump_context::~temp_dump_context): Call
10489         refresh_dumps_are_enabled.
10490         (temp_dump_context::get_dumped_text): New member function.
10491         (selftest::verify_dumped_text): New function.
10492         (ASSERT_DUMPED_TEXT_EQ): New macro.
10493         (selftest::test_capture_of_dump_calls): Run all tests twice, with
10494         and then without optinfo enabled.  Add uses of
10495         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
10496         * dumpfile.h: Update comment for the dump_* API.
10497         * optinfo-emit-json.cc
10498         (selftest::test_building_json_from_dump_calls): Update for new
10499         param for temp_dump_context ctor.
10500         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10501         and "m_owned" field.
10502         (optinfo_item::~optinfo_item): Likewise.
10503         (optinfo::add_item): New member function.
10504         (optinfo::emit): Update comment.
10505         (optinfo::add_string): Delete.
10506         (optinfo::add_printf): Delete.
10507         (optinfo::add_printf_va): Delete.
10508         (optinfo::add_gimple_stmt): Delete.
10509         (optinfo::add_gimple_expr): Delete.
10510         (optinfo::add_tree): Delete.
10511         (optinfo::add_symtab_node): Delete.
10512         (optinfo::add_dec): Delete.
10513         * optinfo.h (class dump_context): New forward decl.
10514         (optinfo::add_item): New decl.
10515         (optinfo::add_string): Delete.
10516         (optinfo::add_printf): Delete.
10517         (optinfo::add_printf_va): Delete.
10518         (optinfo::add_gimple_stmt): Delete.
10519         (optinfo::add_gimple_expr): Delete.
10520         (optinfo::add_tree): Delete.
10521         (optinfo::add_symtab_node): Delete.
10522         (optinfo::add_dec): Delete.
10523         (optinfo::add_poly_int): Delete.
10524         (optinfo_item::optinfo_item): Remove "owned" param.
10525         (class optinfo_item): Remove field "m_owned".
10527 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10529         PR middle-end/86705
10530         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10531         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10532         requested variable alignment.
10533         (expand_one_ssa_partition): Likewise.
10534         (expand_one_var): Likewise.
10536 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10538         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10539         to speculation_safe_value_not_needed.
10541 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10543         * targhooks.h (speculation_safe_value_not_needed): New prototype.
10544         * targhooks.c (speculation_safe_value_not_needed): New function.
10545         * target.def (have_speculation_safe_value): Update documentation.
10546         * doc/tm.texi: Regenerated.
10548 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10550         * config/aarch64/iterators.md (ALLI_TI): New iterator.
10551         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10552         expand.
10553         (despeculate_copy<ALLI:mode>_insn): New insn.
10554         (despeculate_copyti_insn): New insn.
10555         (despeculate_simple<ALLI:mode>): New insn
10556         (despeculate_simpleti): New insn.
10557         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10558         function.
10559         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10560         aarch64_speculation_safe_value.
10561         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10563 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10565         * config/aarch64/aarch64-speculation.cc: New file.
10566         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10567         before pass_reorder_blocks.
10568         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10569         prototype.
10570         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10571         X14 and X15 when tracking speculation.
10572         * config/aarch64/aarch64.md (register name constants): Add
10573         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10574         (unspec): Add UNSPEC_SPECULATION_TRACKER.
10575         (speculation_barrier): New insn attribute.
10576         (cmp<mode>): Allow SP in comparisons.
10577         (speculation_tracker): New insn.
10578         (speculation_barrier): Add speculation_barrier attribute.
10579         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10580         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10581         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10583 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10585         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10586         aarch64_track_speculation is true.
10587         (tb<optab><mode>1): Likewise.
10588         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10589         generate CB[N]Z when tracking speculation.
10590         (aarch64_split_compare_and_swap): Likewise.
10591         (aarch64_split_atomic_op): Likewise.
10593 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10595         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10597 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10599         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10600         (speculation_barrier): New insn.
10602 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10604         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10605         * config/arm/arm.md (speculation_barrier): New expand.
10606         (speculation_barrier_insn): New pattern.
10608 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10610         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10611         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10612         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10613         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10614         list.
10615         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10616         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10617         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10618         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10619         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10620         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10621         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10622         * builtins.c (expand_speculation_safe_value): New function.
10623         (expand_builtin): Call it.
10624         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10625         * doc/extend.texi: Document __builtin_speculation_safe_value.
10626         * doc/md.texi: Document "speculation_barrier" pattern.
10627         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10628         TARGET_HAVE_SPECULATION_SAFE_VALUE.
10629         * doc/tm.texi: Regenerated.
10630         * target.def (have_speculation_safe_value, speculation_safe_value): New
10631         hooks.
10632         * targhooks.c (default_have_speculation_safe_value): New function.
10633         (default_speculation_safe_value): New function.
10634         * targhooks.h (default_have_speculation_safe_value): Add prototype.
10635         (default_speculation_safe_value): Add prototype.
10637 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
10639         * dump-context.h (dump_context::dump_loc): New decl.
10640         * dumpfile.c (dump_context::dump_loc): New member function.
10641         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10642         and dump_gimple_stmt.
10643         (dump_context::dump_gimple_expr_loc): Likewise, using
10644         dump_gimple_expr.
10645         (dump_context::dump_generic_expr_loc): Likewise, using
10646         dump_generic_expr.
10647         (dump_context::dump_printf_loc_va): Likewise, using
10648         dump_printf_va.
10649         (dump_context::begin_scope): Explicitly using the global function
10650         "dump_loc", rather than the member function.
10652 2018-07-31  Martin Sebor  <msebor@redhat.com>
10654         PR tree-optimization/86741
10655         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10657 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
10659         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10660         depend on whether prefetch instructions will be emitted or not.
10661         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10662         will be emitted or not.
10663         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10664         (TARGET_SETMEM_PFD): New macros.
10666 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10668         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10669         (NULL_STMT_VEC_INFO): Delete.
10670         (stmt_vec_info::operator*): Likewise.
10671         (stmt_vec_info::operator gimple *): Likewise.
10672         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10673         of NULL_STMT_VEC_INFO.
10674         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10675         (vect_reassociating_reduction_p): Likewise.
10676         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10677         (vectorizable_store): Likewise.
10678         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10679         (vec_info::free_stmt_vec_infos): Likewise.
10681 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10683         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10684         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10686 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10688         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10689         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10690         (vec_info::free_stmt_vec_info): New private member functions.
10691         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10692         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10693         * tree-parloops.c (gather_scalar_reductions): Remove calls to
10694         set_stmt_vec_info_vec and free_stmt_vec_infos.
10695         * tree-vect-loop.c (_loop_vec_info): Remove call to
10696         set_stmt_vec_info_vec.
10697         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10698         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10699         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10700         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10701         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
10702         assignments in {vec_info::,}new_stmt_vec_info that are redundant
10703         with the clearing in the xcalloc.
10704         (stmt_vec_info_vec): Delete.
10705         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10706         (vectorize_loops): Likewise.
10707         (vec_info::~vec_info): Remove argument from call to
10708         free_stmt_vec_infos.
10709         (vec_info::add_stmt): Remove vinfo argument from call to
10710         new_stmt_vec_info.
10712 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10714         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10715         rather than a gimple stmt.
10716         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
10717         information for pattern statements when passed the original
10718         statement; instead wait to be passed the pattern statement itself.
10719         Don't call set_vinfo_for_stmt here.
10720         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10721         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10722         stmt_vec_infos here.
10723         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10724         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10725         stmt_vec_infos entry.
10727 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10729         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10730         * tree-vectorizer.c (vec_info::replace_stmt): New function.
10731         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10732         * tree-vect-stmts.c (vectorizable_call): Likewise.
10733         (vectorizable_simd_clone_call): Likewise.
10735 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10737         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10738         * tree-vectorizer.c (vec_info::remove_stmt): New function.
10739         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10740         * tree-vect-loop.c (vect_transform_loop): Likewise.
10741         * tree-vect-slp.c (vect_schedule_slp): Likewise.
10742         * tree-vect-stmts.c (vect_remove_stores): Likewise.
10744 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10746         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10747         (vect_dr_stmt): Delete.
10748         * tree-vectorizer.c (vec_info::lookup_dr): New function.
10749         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10750         of DR_VECT_AUX.
10751         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10752         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10753         (vect_verify_datarefs_alignment, vect_peeling_supportable)
10754         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10755         (vect_analyze_data_refs): Likewise.
10756         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
10757         argument.
10758         (vect_find_same_alignment_drs): Likewise.
10759         (vect_slp_analyze_node_dependences): Update calls accordingly.
10760         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
10761         instead of DR_VECT_AUX.
10762         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
10763         of a vector data references.  Use vec_info::lookup_dr instead of
10764         DR_VECT_AUX.
10765         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
10766         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
10767         instead of DR_VECT_AUX.
10769 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10771         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
10772         dr_vec_info.
10773         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10774         accordingly.
10775         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10776         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10777         (vect_gen_prolog_loop_niters): Likewise.
10779 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10781         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
10782         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
10783         (vect_known_alignment_in_bytes, vect_dr_behavior)
10784         (vect_get_scalar_dr_size): Take references as dr_vec_infos
10785         instead of data_references.  Update calls to other routines for
10786         which the same change has been made.
10787         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
10788         dr_vec_infos instead of stmt_vec_infos.
10789         (vect_analyze_data_ref_dependence): Update call accordingly.
10790         (vect_slp_analyze_data_ref_dependence)
10791         (vect_record_base_alignments): Use DR_VECT_AUX.
10792         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
10793         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
10794         (vector_alignment_reachable_p, vect_get_data_access_cost)
10795         (vect_peeling_supportable, vect_analyze_group_access_1)
10796         (vect_analyze_group_access, vect_analyze_data_ref_access)
10797         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
10798         (vect_compile_time_alias, vect_small_gap_p)
10799         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
10800         (vect_supportable_dr_alignment): Take references as dr_vec_infos
10801         instead of data_references.  Update calls to other routines for
10802         which the same change has been made.
10803         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
10804         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10805         (vect_slp_analyze_and_verify_node_alignment)
10806         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10807         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10808         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
10809         above changes.
10810         (_vect_peel_info::dr): Replace with...
10811         (_vect_peel_info::dr_info): ...this new field.
10812         (vect_peeling_hash_get_most_frequent)
10813         (vect_peeling_hash_choose_best_peeling): Update accordingly.
10814         (vect_peeling_hash_get_lowest_cost):
10815         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
10816         routines for which the same change has been made.
10817         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
10818         data_reference.
10819         * tree-vect-loop-manip.c (get_misalign_in_elems)
10820         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
10821         above changes.
10822         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10823         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
10824         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
10825         (get_group_load_store_type, get_negative_load_store_type)
10826         (vect_get_data_ptr_increment, vectorizable_store)
10827         (vectorizable_load): Likewise.
10828         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
10829         Update calls to other routines for which the same change has been made.
10831 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10833         * tree-vectorizer.h (vec_info::move_dr): New member function.
10834         (dataref_aux): Rename to...
10835         (dr_vec_info): ...this and add "dr" and "stmt" fields.
10836         (_stmt_vec_info::dr_aux): Update accordingly.
10837         (_stmt_vec_info::data_ref_info): Delete.
10838         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
10839         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
10840         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
10841         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
10842         of data_ref.
10843         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
10844         (STMT_VINFO_DR_INFO): New macro.
10845         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
10846         (set_dr_misalignment): Update after rename of dataref_aux.
10847         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
10848         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
10849         initialization of STMT_VINFO_DATA_REF.
10850         * tree-vectorizer.c (vec_info::move_dr): New function.
10851         * tree-vect-patterns.c (vect_recog_bool_pattern)
10852         (vect_recog_mask_conversion_pattern)
10853         (vect_recog_gather_scatter_pattern): Use it.
10854         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
10855         the "dr" and "stmt" fields of dr_vec_info instead of
10856         STMT_VINFO_DATA_REF.
10858 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10860         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
10861         (is_pattern_stmt_p): Use it.
10862         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
10863         on pattern statements.
10865 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10867         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
10868         original stmt as a stmt_vec_info rather than a gimple stmt.
10869         (vect_pattern_recog_1): Take the statement directly as a
10870         stmt_vec_info, rather than via a gimple_stmt_iterator.
10871         Update call to vect_mark_pattern_stmts.
10872         (vect_pattern_recog): Update calls accordingly.
10874 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10876         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
10877         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
10878         a vect_def_type for the first argument.
10879         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
10880         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
10881         operand if it isn't defined by a vectorized statement.
10882         (vect_build_gather_load_calls): Remove the mask_dt argument and
10883         update calls to vect_get_vec_def_for_stmt_copy.
10884         (vectorizable_bswap): Likewise the dt argument.
10885         (vectorizable_call): Update calls to vectorizable_bswap and
10886         vect_get_vec_def_for_stmt_copy.
10887         (vectorizable_simd_clone_call, vectorizable_assignment)
10888         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
10889         (vectorizable_comparison): Update calls to
10890         vect_get_vec_def_for_stmt_copy.
10891         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
10892         vect_is_simple_use.
10893         (vect_get_loop_based_defs): Remove dt argument and update call
10894         to vect_get_vec_def_for_stmt_copy.
10895         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
10896         and vect_get_vec_def_for_stmt_copy.
10897         (vectorizable_load): Update calls to vect_build_gather_load_calls
10898         and vect_get_vec_def_for_stmt_copy.
10899         * tree-vect-loop.c (vect_create_epilog_for_reduction)
10900         (vectorizable_reduction, vectorizable_live_operation): Update calls
10901         to vect_get_vec_def_for_stmt_copy.
10903 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10905         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
10906         and gimple stmt arguments with a stmt_vec_info.
10907         (vect_record_base_alignments): Update calls accordingly.
10908         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
10909         and gimple stmt arguments with a stmt_vec_info.
10910         (vect_build_slp_tree_1): Remove vinfo argument and update call
10911         to vect_record_max_nunits.
10912         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
10913         and vect_record_max_nunits.
10915 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10917         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
10918         file and take a stmt_vec_info instead of a gimple stmt.
10919         (supportable_widening_operation, vect_finish_replace_stmt)
10920         (vect_finish_stmt_generation, vect_get_store_rhs)
10921         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
10922         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
10923         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
10924         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
10925         (vect_create_data_ref_ptr, bump_vector_ptr)
10926         (vect_permute_store_chain, vect_setup_realignment)
10927         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
10928         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
10929         (vectorizable_reduction, vectorizable_induction)
10930         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
10931         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
10932         than gimple stmts as arguments.
10933         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
10934         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
10935         (can_group_stmts_p, vect_check_gather_scatter)
10936         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10937         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
10938         (vect_permute_load_chain, vect_shift_permute_load_chain)
10939         (vect_transform_grouped_load)
10940         (vect_record_grouped_load_vectors): Likewise.
10941         * tree-vect-loop.c (vect_fixup_reduc_chain)
10942         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
10943         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
10944         (vectorizable_reduction, vectorizable_induction)
10945         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
10946         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
10947         (vect_get_load_store_mask): Likewise.
10948         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
10949         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
10950         * tree-vect-stmts.c (vect_mark_relevant)
10951         (is_simple_and_all_uses_invariant)
10952         (exist_non_indexing_operands_for_use_p, process_use)
10953         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
10954         (vect_get_vec_def_for_operand, vect_get_vec_defs)
10955         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
10956         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
10957         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
10958         (get_negative_load_store_type, get_load_store_type)
10959         (vect_check_load_store_mask, vect_check_store_rhs)
10960         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
10961         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10962         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10963         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10964         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
10965         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
10966         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
10967         (supportable_widening_operation): Likewise.
10969 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10971         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
10972         a stmt_vec_info instead of a gcall.
10973         (vect_check_gather_scatter): Update call accordingly.
10974         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
10975         of a gphi.
10976         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
10977         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
10978         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
10979         instead of a gimple stmt.
10980         (vect_transform_loop): Update calls accordingly.
10981         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
10982         stmt_vec_infos instead of gimple stmts.
10983         (vect_analyze_slp_instance): Update use accordingly.
10984         * tree-vect-stmts.c (read_vector_array, write_vector_array)
10985         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
10986         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
10987         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
10988         (vect_gen_widened_results_half, vect_get_loop_based_defs)
10989         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
10990         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
10991         down to subroutines.
10993 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10995         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
10996         of the worklist from a vector of gimple stmts to a vector of
10997         stmt_vec_infos.
10998         * tree-vect-stmts.c (vect_mark_relevant, process_use)
10999         (vect_mark_stmts_to_be_vectorized): Likewise
11001 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11003         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
11004         statement before passing it to vect_analyze_stmt.
11005         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
11006         the chain of phi vector definitions.  Track the exit phi via its
11007         stmt_vec_info.
11008         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
11009         STMT_VINFO_REDUC_DEF.
11010         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
11011         stmt_vec_infos to handle the statement chains.
11012         (vect_get_slp_defs): Record the first statement in the node
11013         using a stmt_vec_info.
11014         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
11015         statements here and pass their stmt_vec_info down to subroutines.
11016         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
11017         down to vect_finish_stmt_generation.
11018         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
11019         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
11020         stmt_vec_infos to subroutines.
11021         (vect_remove_stores): Use stmt_vec_infos to handle the statement
11022         chains.
11024 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11026         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
11027         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
11028         (vect_permute_store_chain, vect_setup_realignment)
11029         (vect_permute_load_chain, vect_shift_permute_load_chain)
11030         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
11031         stmts internally, and when passing values to other vectorizer routines.
11032         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11033         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
11034         (vect_analyze_loop_operations, get_initial_def_for_reduction)
11035         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
11036         (vectorizable_reduction, vectorizable_induction)
11037         (vectorizable_live_operation, vect_transform_loop_stmt)
11038         (vect_transform_loop): Likewise.
11039         * tree-vect-patterns.c (vect_reassociating_reduction_p)
11040         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
11041         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
11042         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11043         (vect_slp_analyze_node_operations_1): Likewise.
11044         * tree-vect-stmts.c (vect_mark_relevant, process_use)
11045         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
11046         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
11047         (vect_finish_stmt_generation_1, get_group_load_store_type)
11048         (get_load_store_type, vect_build_gather_load_calls)
11049         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11050         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11051         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11052         (vectorizable_store, vectorizable_load, vectorizable_condition)
11053         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
11054         (supportable_widening_operation): Likewise.
11055         (vect_get_vector_types_for_stmt): Likewise.
11056         * tree-vectorizer.h (vect_dr_behavior): Likewise.
11058 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11060         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11061         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
11062         (vect_permute_store_chain, vect_permute_load_chain)
11063         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
11064         repeated stmt_vec_info lookups.
11065         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11066         (vect_update_ivs_after_vectorizer): Likewise.
11067         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
11068         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11069         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
11070         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11071         (vect_bb_slp_scalar_cost): Likewise.
11072         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
11074 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11076         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
11077         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
11078         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
11079         to get gassigns and gcalls, rather than operating on generc gimple
11080         stmts.
11081         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
11082         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
11083         (vectorizable_load, vect_analyze_stmt): Likewise.
11084         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
11086 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11088         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
11089         return stmt_vec_infos rather than gimple stmts.  Do not accept
11090         null arguments.
11091         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
11092         of a gimple stmt.
11093         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11094         Update use of get_later_stmt.
11095         (vect_get_constant_vectors): Update call accordingly.
11096         (vect_schedule_slp_instance): Likewise
11097         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
11098         (vect_slp_analyze_instance_dependence): Likewise.
11099         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
11101 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11103         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
11104         (stmt_info_for_cost::stmt_info): ...this new field.
11105         (add_stmt_costs): Update accordingly.
11106         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11107         (vect_get_known_peeling_cost): Likewise.
11108         (vect_estimate_min_profitable_iters): Likewise.
11109         * tree-vect-stmts.c (record_stmt_cost): Likewise.
11111 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11113         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
11114         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11115         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11116         accordingly.
11117         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
11119 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11121         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
11122         a gimple stmt to a stmt_vec_info.
11123         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11125 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11127         * tree-vectorizer.h (vec_info::grouped_stores): Change from
11128         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11129         (_loop_vec_info::reduction_chains): Likewise.
11130         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
11131         accordingly.
11132         * tree-vect-slp.c (vect_analyze_slp): Likewise.
11134 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11136         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
11137         a gimple stmt to a stmt_vec_info.
11138         (_stmt_vec_info::next_element): Likewise.
11139         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
11140         (vect_slp_analyze_and_verify_node_alignment)
11141         (vect_analyze_group_access_1, vect_analyze_group_access)
11142         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
11143         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
11144         (vect_supportable_dr_alignment): Update accordingly.
11145         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
11146         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
11147         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
11148         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11149         * tree-vect-slp.c (vect_build_slp_tree_1)
11150         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
11151         (vect_split_slp_store_group, vect_analyze_slp_instance)
11152         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
11153         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
11154         (get_group_load_store_type, get_load_store_type)
11155         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
11156         (vect_transform_stmt, vect_remove_stores): Likewise.
11158 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11160         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
11161         than a gimple stmt.
11162         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11163         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
11164         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
11165         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
11166         (vector_alignment_reachable_p, vect_get_data_access_cost)
11167         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
11168         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
11169         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11170         (vect_analyze_group_access_1, vect_analyze_group_access)
11171         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
11172         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
11173         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
11174         result of vect_dr_stmt and use the stmt_vec_info instead of
11175         the associated gimple stmt.
11176         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11177         (vect_gen_prolog_loop_niters): Likewise.
11178         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11180 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11182         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
11183         to a vec<stmt_vec_info>.
11184         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
11185         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
11186         vec<stmt_vec_info>.
11187         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
11188         to a vec<stmt_vec_info>.
11189         (bst_traits::value_type, bst_traits::value_type): Likewise.
11190         (bst_traits::hash): Update accordingly.
11191         (vect_get_and_check_slp_defs): Change the stmts parameter from
11192         a vec<gimple *> to a vec<stmt_vec_info>.
11193         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
11194         (vect_build_slp_tree): Likewise.
11195         (vect_build_slp_tree_2): Likewise.  Update uses of
11196         SLP_TREE_SCALAR_STMTS.
11197         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
11198         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
11199         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
11200         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
11201         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
11202         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
11203         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
11204         (vect_get_constant_vectors, vect_get_slp_defs)
11205         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
11206         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
11207         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
11208         instead of gimple stmts.
11209         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
11210         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
11211         (vect_slp_analyze_instance_dependence): Update uses of
11212         SLP_TREE_SCALAR_STMTS.
11213         (vect_slp_analyze_and_verify_node_alignment): Likewise.
11214         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
11215         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
11216         (get_initial_defs_for_reduction): Likewise.
11217         (vect_create_epilog_for_reduction): Likewise.
11218         (vectorize_fold_left_reduction): Likewise.
11219         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
11220         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11221         (can_vectorize_live_stmts): Likewise.
11223 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11225         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11226         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11227         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11228         than gimple stmts.
11229         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11230         of a gimple stmt.
11231         (gather_scalar_reductions): Update after above interface changes.
11232         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11233         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11234         than gimple stmts.
11235         (vect_force_simple_reduction): Likewise.
11236         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11237         LOOP_VINFO_REDUCTIONS.
11238         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11240 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11242         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11243         a gimple stmt to a stmt_vec_info.
11244         * tree-vect-loop.c (vect_active_double_reduction_p)
11245         (vect_force_simple_reduction, vectorizable_reduction): Update
11246         accordingly.
11248 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11250         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11251         vec<gimple *> to a vec<stmt_vec_info>.
11252         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11253         the reduction_phis argument from a vec<gimple *> to a
11254         vec<stmt_vec_info>.
11255         (vectorizable_reduction): Likewise the phis local variable that
11256         is passed to vect_create_epilog_for_reduction.  Update for new type
11257         of SLP_TREE_VEC_STMTS.
11258         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11259         (vectorizable_live_operation): Likewise.
11260         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11261         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11263 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11265         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11266         a gimple stmt to a stmt_vec_info.
11267         (vectorizable_condition, vectorizable_live_operation)
11268         (vectorizable_reduction, vectorizable_induction): Pass back the
11269         vectorized statement as a stmt_vec_info.
11270         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11271         use of STMT_VINFO_VEC_STMT.
11272         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11273         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11274         as stmt_vec_infos rather than gimple stmts.
11275         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11276         to a stmt_vec_info.
11277         (vectorizable_live_operation): Likewise.
11278         (vectorizable_reduction, vectorizable_induction): Likewise,
11279         updating use of STMT_VINFO_VEC_STMT.
11280         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11281         of STMT_VINFO_VEC_STMT.
11282         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11283         (vectorizable_simd_clone_call, vectorizable_conversion)
11284         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11285         (vectorizable_store, vectorizable_load, vectorizable_condition)
11286         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11287         from a gimple stmt to a stmt_vec_info.
11288         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
11289         pointer to a stmt_vec_info to the vectorizable_* routines.
11291 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11293         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11294         a gimple stmt to a stmt_vec_info.
11295         (is_pattern_stmt_p): Update accordingly.
11296         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11297         (vect_record_grouped_load_vectors): Likewise.
11298         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11299         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11300         (vect_model_reduction_cost): Likewise.
11301         (vect_create_epilog_for_reduction): Likewise.
11302         (vectorizable_reduction, vectorizable_induction): Likewise.
11303         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11304         Return the stmt_vec_info for the pattern statement.
11305         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11306         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11307         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11308         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11309         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11310         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11311         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11312         (free_stmt_vec_info, vect_is_simple_use): Likewise.
11314 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11316         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11317         (vect_finish_stmt_generation): Likewise.
11318         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11319         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11320         (vect_build_gather_load_calls): Use the return value of the above
11321         functions instead of a separate call to vinfo_for_stmt.  Use narrow
11322         scopes for the input gimple stmt and wider scopes for the associated
11323         stmt_vec_info.  Use vec_info::lookup_def when setting these
11324         stmt_vec_infos from an SSA_NAME definition.
11325         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11326         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11327         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11328         (vectorizable_store, vectorizable_load, vectorizable_condition)
11329         (vectorizable_comparison): Likewise.
11330         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11331         (vectorizable_reduction): Likewise.
11333 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11335         * tree-vectorizer.h (vect_is_simple_use): Add an optional
11336         stmt_vec_info * parameter before the optional gimple **.
11337         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11338         (process_use, vect_get_vec_def_for_operand_1): Update callers.
11339         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11340         * tree-vect-loop.c (vectorizable_reduction): Likewise.
11341         (vectorizable_live_operation): Likewise.
11342         * tree-vect-patterns.c (type_conversion_p): Likewise.
11343         (vect_look_through_possible_promotion): Likewise.
11344         (vect_recog_rotate_pattern): Likewise.
11345         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11347 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11349         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11350         a typedef to a wrapper class.
11351         (NULL_STMT_VEC_INFO): New macro.
11352         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11353         (stmt_vec_info::operator*): New function.
11354         (stmt_vec_info::operator gimple *): Likewise.
11355         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11356         (add_stmt_costs): Likewise.
11357         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11358         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11359         (vect_get_known_peeling_cost): Likewise.
11360         (vect_estimate_min_profitable_iters): Likewise.
11361         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11362         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11363         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11364         (vectorizable_store, free_stmt_vec_infos): Likewise.
11365         (new_stmt_vec_info): Change return type of xcalloc to
11366         _stmt_vec_info *.
11368 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11370         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11371         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11372         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11373         a single_imm_use-based sequence.
11374         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11376 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11378         * tree-vectorizer.h (vec_info::lookup_def): Declare.
11379         * tree-vectorizer.c (vec_info::lookup_def): New function.
11380         * tree-vect-patterns.c (vect_get_internal_def): Use it.
11381         (vect_widened_op_tree): Likewise.
11382         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11383         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11384         (vectorizable_reduction): Likewise.
11385         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11386         of a gimple *.
11387         (vect_is_slp_reduction): Update calls accordingly.  Use
11388         vec_info::lookup_def.
11389         (vect_is_simple_reduction): Likewise
11390         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11392 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11394         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11395         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11396         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11397         of vinfo_for_stmt.
11398         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11399         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11400         (vect_update_vf_for_slp, vect_analyze_loop_operations)
11401         (vect_is_slp_reduction, vectorizable_induction)
11402         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11403         * tree-vect-patterns.c (vect_init_pattern_stmt):
11404         (vect_determine_min_output_precision_1, vect_determine_precisions)
11405         (vect_pattern_recog): Likewise.
11406         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11407         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11408         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11409         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11410         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11411         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
11412         info field from a loop to a loop_vec_info.
11414 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11416         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11417         (vec_info::add_stmt): Declare.
11418         * tree-vectorizer.c (vec_info::add_stmt): New function.
11419         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11420         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11421         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11422         (vectorizable_induction): Likewise.
11423         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11424         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11425         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11426         (vectorizable_load): Likewise.
11427         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11428         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11429         (vect_recog_gather_scatter_pattern): Likewise.
11430         (append_pattern_def_seq): Likewise.  Remove a check that is
11431         performed by add_stmt itself.
11433 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11435         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11436         which make_ssa_name was called with new_stmt before new_stmt
11437         had been created.
11439 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11441         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11442         split out from...
11443         (vect_is_slp_reduction): ...here...
11444         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
11445         that are already known to be false.
11447 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11449         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11450         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
11451         STMT_VINFO_NUM_SLP_USES when it's true.
11452         (vect_free_slp_instance): Add a final_p parameter and pass it to
11453         vect_free_slp_tree.
11454         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11455         (vect_analyze_slp_instance): Likewise.
11456         (vect_slp_analyze_operations): Likewise.
11457         (vect_slp_analyze_bb_1): Likewise.
11458         * tree-vectorizer.c (vec_info): Likewise.
11459         * tree-vect-loop.c (vect_transform_loop): Likewise.
11461 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11463         * tree-vect-loop.c (vectorizable_reduction): Assert that the
11464         function is not called for second and subsequent members of
11465         a reduction group.
11467 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11469         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11470         cases for nested loops from here to ...
11471         (vect_create_epilog_for_reduction): ...here.  Only call
11472         vect_is_simple_use for inner-loop reductions.
11474 2018-07-31  Martin Liska  <mliska@suse.cz>
11476         PR gcov-profile/85338
11477         PR gcov-profile/85350
11478         PR gcov-profile/85372
11479         * profile.c (struct location_triplet): New.
11480         (struct location_triplet_hash): Likewise.
11481         (output_location): Do not output a BB that
11482         is already recorded for a line.
11483         (branch_prob): Use streamed_locations.
11485 2018-07-31  Martin Liska  <mliska@suse.cz>
11487         PR gcov-profile/85370
11488         * coverage.c (coverage_begin_function): Do not mark target
11489         clones as artificial functions.
11491 2018-07-31  Martin Liska  <mliska@suse.cz>
11493         PR gcov-profile/83813
11494         PR gcov-profile/84758
11495         PR gcov-profile/85217
11496         PR gcov-profile/85332
11497         * profile.c (branch_prob): Do not record GOTO expressions
11498         for GIMPLE statements which locations are already streamed.
11500 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11502         * gcc.c (handle_spec_function): Accept a soft_matched_part
11503         argument, as do_spec_1.  Pass it down to ...
11504         (eval_spec_function): Accept a soft_matched_part argument,
11505         and pass it down to ...
11506         (do_spec_2): Accept a soft_matched_part argument, and pass
11507         it down to do_spec_1.
11508         (do_spec_1): Pass soft_matched_part to handle_spec_function.
11509         (handle_braces): Update call to handle_spec_function.
11510         (driver::set_up_specs): Update calls to do_spec_2.
11511         (compare_debug_dump_opt_spec_function): Likewise.
11512         (compare_debug_self_opt_spec_function): Likewise.
11514 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11516         * common.opt (nolibc): New option.
11517         * doc/invoke.texi (Link Options): Document it.
11518         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11519         * config/alpha/linux.h: Likewise.
11520         * config/arc/elf.h: Likewise.
11521         * config/arm/uclinux-elf.h: Likewise.
11522         * config/arm/unknown-elf.h: Likewise.
11523         * config/avr/avrlibc.h: Likewise.
11524         * config/bfin/bfin.h: Likewise.
11525         * config/bfin/linux.h: Likewise.
11526         * config/bfin/uclinux.h: Likewise.
11527         * config/darwin.h: Likewise.
11528         * config/darwin10.h: Likewise.
11529         * config/darwin12.h: Likewise.
11530         * config/gnu-user.h: Likewise.
11531         * config/lm32/uclinux-elf.h: Likewise.
11532         * config/pa/pa-hpux11.h: Likewise.
11533         * config/pa/pa64-hpux.h: Likewise.
11534         * config/sparc/sparc.h: Likewise.
11536 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11538         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11539         undefined variables.
11541 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
11543         PR target/86640
11544         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11545         instead of GEN_INT.
11547 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11549         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11550         terminated string literal.
11552 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
11554         PR rtl-optimization/85160
11555         * combine.c (is_just_move): New function.
11556         (try_combine): Allow combining two instructions into two if neither of
11557         the original instructions was a move.
11559 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
11561         PR target/86673
11562         * doc/extend.texi (Global Register Variables): Discourage use of type
11563         qualifiers.
11564         (Local Register Variables): Likewise.
11566 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
11568         PR tree-optimization/86506
11569         * hwint.h (ceil_log2): Resync with hwint.c implementation.
11571 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
11573         PR target/86547
11574         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11575         hard_regno, make sure no insn between `from` and `to` clobbers it.
11577 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
11578             Tom de Vries  <tdevries@suse.de>
11580         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11581         (PTX_DEFAULT_RUNTIME_DIM): ... this.
11582         (nvptx_goacc_validate_dims): Set default worker and gang dims to
11583         PTX_DEFAULT_RUNTIME_DIM.
11584         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11586 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
11588         * config/pa/pa.c (pa_output_addr_vec): Align address table.
11589         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11590         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11592 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
11594         * config/rs6000/constraints.md (wG constraint): Delete, no longer
11595         used.
11596         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11597         predicate to reflect toc fusion has been deleted.
11598         (toc_fusion_mem_raw): Delete, no longer used.
11599         (toc_fusion_mem_wrapped): Likewise.
11600         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11601         fusion mask bit.
11602         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11603         Delete, no longer used.
11604         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11605         meant to be used for toc fusion.
11606         (rs6000_debug_print_mode): Delete toc fusion debugging.
11607         (rs6000_debug_reg_global): Likewise.
11608         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11609         fusion and secondary reload support that were never used.
11610         (rs6000_option_override_internal): Delete TOC fusion, that was only
11611         partially defined, and it did not work unless you also used the
11612         -mcmodel= switch.
11613         (rs6000_legitimate_address_p): Delete TOC fusion support.
11614         (rs6000_opt_masks): Likewise.
11615         (fusion_wrap_memory_address): Delete function, no longer used.
11616         (fusion_split_address); Delete TOC fusion support.
11617         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11618         longer used with toc fusion being deleted.
11619         (TARGET_TOC_FUSION_FP): Likewise.
11620         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11621         UNSPEC.
11622         (toc fusion spliter): Delete TOC fusion support.
11623         (toc_fusionload_<mode>): Likewise.
11624         (toc_fusionload_di): Likewise.
11625         (fusion_gpr_load_<mode>): Delete generator function, this insn no
11626         longer needs to be named.  Rename predicate to delete TOC fusion.
11627         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11628         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11629         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11630         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11631         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11633 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11635         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11636         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
11637         __int128 in built-in function prototypes.
11638         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11639         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11641 2018-07-27  Martin Sebor  <msebor@redhat.com>
11643         PR tree-optimization/86696
11644         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11645         types, including enums.
11646         (handle_char_store): Be prepared for the above function to fail.
11648 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
11650         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11651         when optimization level is lower than 2 or optimize for size.
11653 2018-07-26  Martin Sebor  <msebor@redhat.com>
11655         PR tree-optimization/86043
11656         PR tree-optimization/86042
11657         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11658         (get_string_cst_length): Rename...
11659         (get_min_string_length): ...to this.  Add argument.
11660         (handle_char_store): Extend to handle multi-character stores by
11661         MEM_REF.
11662         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
11663         * tree.h (initializer_zerop): Add argument.
11665 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
11667         PR middle-end/86660
11668         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11669         declare target to variables if they have always,{to,from,tofrom} map
11670         kinds.
11672 2018-07-26  Martin Liska  <mliska@suse.cz>
11674         PR lto/86548
11675         * lto-wrapper.c: Add linker_output as prefix
11676         for ltrans_output_file.
11678 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
11680         PR rtl-optimization/85805
11681         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11682         value for hard registers if that was written in the same mode.
11684 2018-07-26  Martin Liska  <mliska@suse.cz>
11686         PR gcov-profile/86536
11687         * gcov.c (format_gcov): Use printf format %.*f directly
11688         and do not handle special values.
11690 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11692         * common/config/arc/arc-common.c (arc_option_optimization_table):
11693         Update default optimizations for size.
11695 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11697         * config/arc/arc.md (movsf_insn): Add short instruction selection.
11698         * config/arc/constraints.md (CfZ): New constraint.
11699         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11700         (subsf3_fpu): Likewise.
11701         (cmpsf_fpu): Likewise.
11702         (cmpsf_fpu_uneq): Likewise.
11704 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11706         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11707         accesses as well.
11708         (arc_is_uncached_mem_p): uncached applies to both the variable and
11709         the pointer.
11711 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11713         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11714         register names.
11716 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
11718         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11719         field "m_scopes" from vec to auto_vec.
11721 2018-07-25  Martin Liska  <mliska@suse.cz>
11723         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11724         return type.
11726 2018-07-25  Richard Biener  <rguenther@suse.de>
11728         PR debug/86654
11729         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11730         special wrt context_die late.
11731         (gen_subprogram_die): Re-use DIEs in local scope.
11733 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
11735         PR tree-optimization/86644
11736         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
11738 2018-07-25  Martin Liska  <mliska@suse.cz>
11740         PR middle-end/86645
11741         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11742         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11744 2018-07-25  Martin Liska  <mliska@suse.cz>
11746         PR sanitizer/79635
11747         * params.def: Explain ASan abbreviation and provide
11748         a documentation link.
11750 2018-07-24  Martin Sebor  <msebor@redhat.com>
11752         PR tree-optimization/86622
11753         PR tree-optimization/86532
11754         * builtins.h (string_length): Declare.
11755         * builtins.c (c_strlen): Correct handling of non-constant offsets.
11756         (check_access): Be prepared for non-constant length ranges.
11757         (string_length): Make extern.
11758         * expr.c (string_constant): Only handle the minor non-constant
11759         array index.  Use string_constant to compute the length of
11760         a generic string constant.
11762 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
11764         PR tree-optimization/86618
11765         * tree-vect-stmts.c (vectorizable_call): Don't take the address
11766         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
11768 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
11770         PR tree-optimization/86636
11771         * json.cc (json::object::set): Fix comment.  Add assertions.
11772         (json::array::append): Move here from json.h.  Add comment and an
11773         assertion.
11774         (json::string::string): Likewise.
11775         * json.h (json::array::append): Move to json.cc.
11776         (json::string::string): Likewise.
11777         * optinfo-emit-json.cc
11778         (optrecord_json_writer::impl_location_to_json): Assert that we
11779         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
11780         wrapper around it.  Expand the location once, rather than three
11781         times.
11782         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
11783         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
11784         wrappers.
11785         (optrecord_json_writer::optinfo_to_json): Likewise, in four
11786         places.  Fix some overlong lines.
11788 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
11790         * config/aarch64/aarch64-simd.md
11791         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
11792         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
11793         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
11794         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
11795         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
11796         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
11797         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
11798         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
11799         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
11801 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
11803         PR middle-end/86627
11804         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
11805         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
11806         and abs_d == d, do the power of two handling if profitable.
11808 2018-07-24  Richard Biener  <rguenther@suse.de>
11810         * match.pd: Add BIT_FIELD_REF canonicalizations.
11812 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11814         PR c/86617
11815         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
11817 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11819         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
11820         terminated STRING_CST object.
11822 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11824         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
11826 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
11828         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
11829         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
11830         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
11831         the elements into a register.
11832         (rs6000_split_v4si_init_di_reg): Delete.
11833         (rs6000_split_v4si_init): Delete.
11834         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
11835         (vsx_init_v4si): Rewrite as a define_expand.
11837 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
11839         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
11840         zero_extend argument from memory): New.
11842 2018-07-22  Martin Sebor  <msebor@redhat.com>
11844         PR bootstrap/86621
11845         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
11846         diagnosing calls with unknown arguments unless -Walloca-larger-than
11847         is restricted to less than PTRDIFF_MAX bytes.
11849 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
11851         * doc/gcov.texi (Invoking Gcov): Editorial changes.
11853 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
11855         * pretty-print.c (text_info::set_location): Remove redundant
11856         "line_table" parameter from call to rich_location::set_range.
11858 2018-07-20  Martin Sebor  <msebor@redhat.com>
11860         PR middle-end/82063
11861         * builtins.c (expand_builtin_alloca): Adjust.
11862         * calls.c (alloc_max_size): Simplify.
11863         * cgraphunit.c (cgraph_node::expand): Adjust.
11864         * common.opt (larger_than_size, warn_frame_larger_than): Remove
11865         variables.
11866         (frame_larger_than_size): Same.
11867         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
11868         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
11869         Initialize.
11870         * doc/invoke.texi (GCC Command Options): Document option arguments.
11871         Explain byte-size arguments and suffixes.
11872         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
11873         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
11874         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
11875         * doc/options.texi (UInteger): Expand.
11876         (Host_Wide_Int, ByteSize): Document new properties.
11877         * final.c (final_start_function_1): Include sizes in an error message.
11878         * function.c (frame_offset_overflow): Same.
11879         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
11880         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
11881         Diagnose unbounded alloca calls only for limits of less than
11882         PTRDIFF_MAX.
11883         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
11884         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
11885         for alloca(0).
11886         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
11887         only for limits of less than PTRDIFF_MAX.
11888         * langhooks-def.h (lhd_handle_option): Change function argument
11889         to HOST_WIDE_INT.
11890         * langhooks.c (lhd_handle_option): Same.
11891         * langhooks.h (handle_option): Same.
11892         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
11893         ByteSize flags.
11894         (var_type, var_type_struct): Same.
11895         (var_set): Handle ByteSize flag.
11896         * optc-gen.awk: Add comments to output to ease debugging.  Make
11897         use of HOST_WIDE_INT where appropriate.
11898         * opts-gen-save.awk:  Use %lx to format unsigned long.
11899         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
11900         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
11901         arguments.  Parse bytes-size suffixes.
11902         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
11903         (enum_value_to_arg): Same.
11904         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
11905         (handle_option): Adjust.
11906         (generate_option): Change function argument to HOST_WIDE_INT.
11907         (cmdline_handle_error): Adjust.
11908         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
11909         (set_option): Change function argument to HOST_WIDE_INT.
11910         (option_enabled): Handle cl_host_wide_int.
11911         (get_option_state): Handle CLVC_SIZE.
11912         (control_warning_option): Same.
11913         * opts.c (common_handle_option): Change function argument to
11914         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
11915         OPT_Wvla_larger_than_.
11916         * opts.h (enum cl_var_type): Add an enumerator.
11917         * stor-layout.c (layout_decl): Print a more meaningful warning.
11918         * toplev.c (output_stack_usage): Adjust.
11920 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
11922         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
11923         call to inline_expand_builtin_string_cmp.
11924         (expand_builtin_strcmp): Likewise.
11925         (expand_builtin_strncmp): Likewise.
11926         (inline_string_cmp): Delete the last parameter, change char_type_node
11927         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
11928         two operands.
11929         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
11930         the inlining expansion on target where the type of the call has same or
11931         narrower precision than unsigned char.
11933 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
11935         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
11936         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
11937         * common.opt (fsave-optimization-record): New option.
11938         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
11939         * doc/invoke.texi (-fsave-optimization-record): New option.
11940         * dumpfile.c: Include "optinfo-emit-json.h".
11941         (struct kv_pair): Move to coretypes.h.
11942         (optgroup_options): Make non-static.
11943         (dump_context::end_scope): Call
11944         optimization_records_maybe_pop_dump_scope.
11945         * dumpfile.h (optgroup_options): New decl.
11946         * json.cc: New file.
11947         * json.h: New file.
11948         * optinfo-emit-json.cc: New file.
11949         * optinfo-emit-json.h: New file.
11950         * optinfo.cc: Include "optinfo-emit-json.h".
11951         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
11952         (optinfo_enabled_p): Check optimization_records_enabled_p.
11953         (optinfo_wants_inlining_info_p): Likewise.
11954         * optinfo.h: Update comment.
11955         * profile-count.c (profile_quality_as_string): New function.
11956         * profile-count.h (profile_quality_as_string): New decl.
11957         (profile_count::quality): New accessor.
11958         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
11959         and optinfo_emit_json_cc_tests.
11960         * selftest.h (selftest::json_cc_tests): New decl.
11961         (selftest::optinfo_emit_json_cc_tests): New decl.
11962         * toplev.c: Include "optinfo-emit-json.h".
11963         (compile_file): Call optimization_records_finish.
11964         (do_compile): Call optimization_records_start.
11965         * tree-ssa-live.c: Include optinfo.h.
11966         (remove_unused_scope_block_p): Retain inlining information if
11967         optinfo_wants_inlining_info_p returns true.
11969 2018-07-20  Richard Biener  <rguenther@suse.de>
11971         PR debug/86585
11972         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
11973         to cover -flto-partition=none.
11975 2018-07-20  Martin Liska  <mliska@suse.cz>
11977         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
11978         (get_decl_source_range): Remove unused function.
11980 2018-07-20  Richard Biener  <rguenther@suse.de>
11982         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
11983         (struct vn_phi_s): Likewise.
11984         (struct vn_reference_s): Likewise.
11985         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
11986         for searching the slot of an entry known to be in the hash itself.
11987         (vn_phi_hasher::equal): Likewise.
11988         (vn_reference_hasher::equal): Likewise.
11989         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
11990         globals.
11991         (optimistic_info, current_info): Remove, keeping only valid_info.
11992         (vn_reference_lookup_1): Remove fallback lookup.
11993         (vn_reference_lookup_2): Likewise.
11994         (vn_nary_op_lookup_1): Likewise.
11995         (vn_phi_lookup): Likewise.
11996         (vn_nary_build_or_lookup_1): Make sure to not chain the built
11997         hash element.
11998         (vn_reference_insert): Adjust, chain the inserted hash element
11999         at last_inserted_ref.
12000         (vn_reference_insert_pieces): Likewise.
12001         (visit_reference_op_call): Likewise.
12002         (vn_nary_op_insert_into): Chain the inserted hash element at
12003         last_inserted_nary.
12004         (vn_nary_op_insert_pieces): Adjust.
12005         (vn_nary_op_insert): Likewise.
12006         (vn_nary_op_insert_stmt): Likewise.
12007         (vn_phi_insert): Adjust, chain the inserted hash element at
12008         last_inserted_phi.
12009         (process_scc): Remove clearing and copying the optimistic
12010         table.  Instead remove elements inserted during an optimistic
12011         iteration from the single table we maintain.
12012         (init_scc_vn): Adjust.
12013         (free_scc_vn): Likewise.
12014         (sccvn_dom_walker::record_cond): Likewise.
12015         (sccvn_dom_walker::after_dom_children): Likewise.
12017 2018-07-19  Martin Sebor  <msebor@redhat.com>
12019         PR tree-optimization/84047
12020         PR tree-optimization/83776
12021         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
12022         (check_array_bounds): Call it.
12024 2018-07-19  Martin Sebor  <msebor@redhat.com>
12026         * align.h (align_flags): Use member initialization.
12028 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
12030         * Makefile.in (OBJS): Add optinfo.o.
12031         * coretypes.h (class symtab_node): New forward decl.
12032         (struct cgraph_node): New forward decl.
12033         (class varpool_node): New forward decl.
12034         * dump-context.h: New file.
12035         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
12036         "tree-pass.h".
12037         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
12038         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
12039         (set_alt_dump_file): Likewise.
12040         (dump_context::~dump_context): New dtor.
12041         (dump_gimple_stmt): Move implementation to...
12042         (dump_context::dump_gimple_stmt): ...this new member function.
12043         Add the stmt to any pending optinfo, creating one if need be.
12044         (dump_gimple_stmt_loc): Move implementation to...
12045         (dump_context::dump_gimple_stmt_loc): ...this new member function.
12046         Start a new optinfo and add the stmt to it.
12047         (dump_gimple_expr): Move implementation to...
12048         (dump_context::dump_gimple_expr): ...this new member function.
12049         Add the stmt to any pending optinfo, creating one if need be.
12050         (dump_gimple_expr_loc): Move implementation to...
12051         (dump_context::dump_gimple_expr_loc): ...this new member function.
12052         Start a new optinfo and add the stmt to it.
12053         (dump_generic_expr): Move implementation to...
12054         (dump_context::dump_generic_expr): ...this new member function.
12055         Add the tree to any pending optinfo, creating one if need be.
12056         (dump_generic_expr_loc): Move implementation to...
12057         (dump_context::dump_generic_expr_loc): ...this new member
12058         function.  Add the tree to any pending optinfo, creating one if
12059         need be.
12060         (dump_printf): Move implementation to...
12061         (dump_context::dump_printf_va): ...this new member function.  Add
12062         the text to any pending optinfo, creating one if need be.
12063         (dump_printf_loc): Move implementation to...
12064         (dump_context::dump_printf_loc_va): ...this new member function.
12065         Start a new optinfo and add the stmt to it.
12066         (dump_dec): Move implementation to...
12067         (dump_context::dump_dec): ...this new member function.  Add the
12068         value to any pending optinfo, creating one if need be.
12069         (dump_context::dump_symtab_node): New member function.
12070         (dump_context::get_scope_depth): New member function.
12071         (dump_context::begin_scope): New member function.
12072         (dump_context::end_scope): New member function.
12073         (dump_context::ensure_pending_optinfo): New member function.
12074         (dump_context::begin_next_optinfo): New member function.
12075         (dump_context::end_any_optinfo): New member function.
12076         (dump_context::s_current): New global.
12077         (dump_context::s_default): New global.
12078         (dump_scope_depth): Delete global.
12079         (dumpfile_ensure_any_optinfo_are_flushed): New function.
12080         (dump_symtab_node): New function.
12081         (get_dump_scope_depth): Reimplement in terms of dump_context.
12082         (dump_begin_scope): Likewise.
12083         (dump_end_scope): Likewise.
12084         (selftest::temp_dump_context::temp_dump_context): New ctor.
12085         (selftest::temp_dump_context::~temp_dump_context): New dtor.
12086         (selftest::verify_item): New function.
12087         (ASSERT_IS_TEXT): New macro.
12088         (ASSERT_IS_TREE): New macro.
12089         (ASSERT_IS_GIMPLE): New macro.
12090         (selftest::test_capture_of_dump_calls): New test.
12091         (selftest::dumpfile_c_tests): Call it.
12092         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
12093         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
12094         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
12095         descriptive comment.
12096         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
12097         (dump_node, dump_bb): Move these unrelated decls.
12098         (class dump_manager): Add leading comment.
12099         * optinfo.cc: New file.
12100         * optinfo.h: New file.
12102 2018-07-19  Michael Collison  <michael.collison@arm.com>
12103             Richard Henderson <rth@redhat.com>
12105         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
12106         (subti): Handle op1 zero.
12107         (subvti4, usub4ti4): New.
12108         (*sub<GPI>3_compare1_imm): New.
12109         (sub<GPI>3_carryinCV): New.
12110         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
12111         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
12113 2018-07-19  Michael Collison  <michael.collison@arm.com>
12114             Richard Henderson <rth@redhat.com>
12116         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
12117         (addti3): Create simpler code if low part is already known to be 0.
12118         (addvti4, uaddvti4): New.
12119         (*add<GPI>3_compareC_cconly_imm): New.
12120         (*add<GPI>3_compareC_cconly): New.
12121         (*add<GPI>3_compareC_imm): New.
12122         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
12123         handle constants within this pattern..
12124         (*add<GPI>3_compareV_cconly_imm): New.
12125         (*add<GPI>3_compareV_cconly): New.
12126         (*add<GPI>3_compareV_imm): New.
12127         (add<GPI>3_compareV): New.
12128         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
12129         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
12130         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
12131         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
12132         with 'comparison' operator.
12133         (*add<GPI>3_compareV_cconly_imm): Ditto.
12134         (*add<GPI>3_compareV_cconly): Ditto.
12135         (*add<GPI>3_compareV_imm): Ditto.
12136         (add<GPI>3_compareV): Ditto.
12137         (add<mode>3_carryinC): Ditto.
12138         (*add<mode>3_carryinC_zero): Ditto.
12139         (*add<mode>3_carryinC): Ditto.
12140         (add<mode>3_carryinV): Ditto.
12141         (*add<mode>3_carryinV_zero): Ditto.
12142         (*add<mode>3_carryinV): Ditto.
12144 2018-07-19  Michael Collison  <michael.collison@arm.com>
12145             Richard Henderson <rth@redhat.com>
12147         * config/aarch64/aarch64-modes.def (CC_V): New.
12148         * config/aarch64/aarch64-protos.h
12149         (aarch64_addti_scratch_regs): Declare
12150         (aarch64_subvti_scratch_regs): Declare.
12151         (aarch64_expand_subvti): Declare.
12152         (aarch64_gen_unlikely_cbranch): Declare
12153         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
12154         for signed overflow using CC_Vmode.
12155         (aarch64_get_condition_code_1): Handle CC_Vmode.
12156         (aarch64_gen_unlikely_cbranch): New function.
12157         (aarch64_addti_scratch_regs): New function.
12158         (aarch64_subvti_scratch_regs): New function.
12159         (aarch64_expand_subvti): New function.
12161 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12163         * config/aarch64/aarch64-option-extensions.def: New entry for profile
12164         extension.
12165         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
12166         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
12167         extension.
12169 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12171         PR target/83009
12172         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12173         address check not strict.
12175 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12177         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
12178         Umq with Umn.
12179         (store_pair_lanes<mode>): Likewise.
12180         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
12181         enum value 'ADDR_QUERY_LDP_STP_N'.
12182         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
12183         (aarch64_print_address_internal): Add declaration.
12184         (aarch64_print_ldpstp_address): Remove.
12185         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
12186         (aarch64_print_operand): Change printing of 'y'.
12187         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
12188         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
12189         'true' rather than '1'.
12190         * config/aarch64/constraints.md (Uml): Likewise.
12191         (Uml): Rename to Umn.
12192         (Umq): Remove.
12194 2018-07-19  Richard Biener  <rguenther@suse.de>
12196         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
12197         a trailing array.
12198         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
12199         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
12200         (vn_reference_hasher): Likewise.
12201         (struct vn_tables_s): Remove obstack and alloc-pool members.
12202         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
12203         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
12204         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
12205         (vn_reference_insert_pieces): Likewise.
12206         (alloc_vn_nary_op_noinit): Adjust.
12207         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
12208         (vn_phi_eq): Adjust.
12209         (shared_lookup_phiargs): Remove.
12210         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
12211         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
12212         (visit_reference_op_call): Likewise.
12213         (copy_nary, copy_phi, copy_reference): Remove.
12214         (process_scc): Rewind the obstack when iterating.  Do not
12215         copy the elements to valid_info but just move them from one
12216         hashtable to the other.
12217         (allocate_vn_table): Adjust.
12218         (free_vn_table): Likewise.
12219         (init_scc_vn): Likewise.
12220         (free_scc_vn): Likewise.
12222 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
12224         PR target/86560
12225         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12226         indirect_return as function type attribute.
12227         (ix86_attribute_table): Change indirect_return to function
12228         type attribute.
12229         * doc/extend.texi: Update indirect_return attribute.
12231 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
12233         * wide-int.h (widest2_int): New.
12234         * gimple-fold.c (arith_overflowed_p): Use it.
12235         * tree.h (widest2_int_cst): New.
12236         * tree-vrp.c (wide_int_binop_overflow): Rename from
12237         vrp_int_const_binop.
12238         Rewrite to work on trees.
12239         (extract_range_from_multiplicative_op_1): Abstract code to...
12240         (wide_int_range_min_max): ...here.
12241         (wide_int_range_cross_product): ...and here.
12242         (extract_range_from_binary_expr_1): Abstract overflow code to...
12243         (wide_int_range_mult_wrapping): ...here.
12244         * tree-vrp.h (wide_int_range_cross_product): New.
12245         (wide_int_range_mult_wrapping): New.
12247 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
12248             Julia Koval  <julia.koval@intel.com>
12250         * config/i386/x86-tune-costs.h (skylake_memcpy,
12251         skylake_memset): Replace rep_prefix with unrolling for size 512.
12253 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
12255         PR middle-end/86544
12256         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12257         comparision with EQ_EXPR in last stmt.
12259 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12261         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12262         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12263         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12264         previously known as "PowerPC AltiVec Built-in Functions".  Move
12265         some material to new subsubsections "PowerPC AltiVec Built-in
12266         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12267         ISA 2.07".
12268         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12269         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12270         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12271         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12273 2018-07-18  Richard Biener  <rguenther@suse.de>
12275         PR tree-optimization/86557
12276         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12277         EXACT_DIV_EXPR.
12279 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
12281         * config/s390/s390.c (s390_function_profiler): Generate CFI.
12283 2018-07-17  Jeff Law  <law@redhat.com>
12285         * config/arm/arm.c (get_label_padding): Update for recent
12286         changes to label_to_alignment.
12288         PR tree-optimization/86010
12289         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12291         * config/mips/mips.c (vr4130_align_insns): Update for recent
12292         changes to label_to_alignment.
12294         * config/frv/frv.c (frv_label_align): Update for recent changes
12295         to label_to_alignment.
12297         * config/nios2/nios2.c (nios2_label_align): Update for recent
12298         changes which dropped ALIGN_LABELS_LOG.
12300 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
12302         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12303         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12305 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12307         * config/arc/arc.c (arc_label_align): Use align_labels instead of
12308         deprecated align_labels_log.
12310 2018-07-17  Richard Biener  <rguenther@suse.de>
12312         PR lto/86456
12313         * dwarf2out.c (init_sections_and_labels): Always generate
12314         a debug_line_str_section for early LTO debug.
12315         (dwarf2out_finish): Reset debug_line_str_hash output early.
12316         Bump counter for extra dwarf5 .debug_loc labels to not conflict
12317         with fat LTO part.
12318         (dwarf2out_early_finish): Output debug_line_str.
12320 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
12322         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12323         index register on z196 or later.
12325 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
12327         * config/s390/s390.c (s390_default_align): Set default function
12328         alignment to 16.
12329         (s390_override_options_after_change): Call s390_default align.
12330         (s390_option_override_internal): Call s390_default_align.
12331         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12333 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
12335         PR middle-end/86542
12336         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12337         to _looptemp_ clauses, other than the first two.
12339 2018-07-17  Martin Liska  <mliska@suse.cz>
12341         * opts.c: Do not enable OPT_falign_* for -Os.
12343 2018-07-17  Martin Liska  <mliska@suse.cz>
12345         * align.h (MAX_CODE_ALIGN): New.
12346         (MAX_CODE_ALIGN_VALUE): New.
12347         * common/config/i386/i386-common.c (ix86_handle_option):
12348         (MAX_CODE_ALIGN): Moved to align.h.
12349         * final.c (MAX_CODE_ALIGN): Likewise.
12350         * opts.c (parse_and_check_align_values):
12351         (MAX_CODE_ALIGN): Likewise.
12352         (MAX_CODE_ALIGN_VALUE): Likewise.
12354 2018-07-17  Martin Liska  <mliska@suse.cz>
12356         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12357         in order to fulfil coding style.
12358         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12359         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12360         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12361         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12362         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12363         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12364         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12365         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12366         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12368 2018-07-17  Martin Liska  <mliska@suse.cz>
12370         * align.h: New file.
12371         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12372         directly.
12373         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12374         align_flags of label_to_alignment.
12375         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12376         align_flags class.
12377         * config/m68k/m68k.c: Do not use removed align_labels_value and
12378         align_loops_value.
12379         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12380         (LOOP_ALIGN): Likewise.
12381         (LABEL_ALIGN): Likewise.
12382         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12383         Remove not used macro.
12384         (rs6000_loop_align): Change return type to align_flags.
12385         (rs6000_loop_align_max_skip): Remove.
12386         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12387         Change return type to align_flags.
12388         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12389         Remove not used macro.
12390         (rs6000_loop_align):  Change return type to align_flags.
12391         (rs6000_loop_align_max_skip): Remove.
12392         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12393         * config/rx/rx-protos.h (rx_align_for_label): Make it
12394         static function.
12395         * config/rx/rx.c (rx_align_for_label): Change return type
12396         to align_flags.
12397         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12398         macro definitions.
12399         into align_flags class.
12400         (LABEL_ALIGN): Likewise.
12401         (LOOP_ALIGN): Likewise.
12402         * config/s390/s390.c (s390_label_align): Use align_flags
12403         class member.
12404         (s390_asm_output_function_label): Likewise.
12405         * config/sh/sh.c (sh_override_options_after_change):
12406         Use align_flags class directly without macros.
12407         (find_barrier): Likewise.
12408         (barrier_align): Likewise.
12409         (sh_loop_align): Likewise.
12410         * config/spu/spu.c (spu_option_override):
12411         Use align_flags_tuple::get_value instead of removed macros.
12412         (spu_sched_init): Likewise.
12413         * config/spu/spu.h (GTY): Likewise.
12414         * config/visium/visium.c (visium_option_override):
12415         Set "8" as default secondary alignment.
12416         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12417         in order to guarantee secondary alignment of 8.
12418         * coretypes.h: Include align.h header file.
12419         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12420         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12421         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12422         * doc/tm.texi.in: Likewise.
12423         * final.c (struct label_alignment): Remove not used structure.
12424         (LABEL_ALIGN): Change type to align_flags.
12425         (LOOP_ALIGN): Likewise.
12426         (JUMP_ALIGN): Likewise.
12427         (default_loop_align_max_skip): Remove.
12428         (default_label_align_max_skip): Likewise.
12429         (default_jump_align_max_skip): Likewise.
12430         (default_label_align_after_barrier_max_skip):
12431         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12432         (LABEL_TO_MAX_SKIP): Remove.
12433         (label_to_alignment): Return align_flags type instead of integer.
12434         (label_to_max_skip): Remove.
12435         (align_fuzz): Use align_flags type.
12436         (compute_alignments): Use align_flags type and use align_flags::max
12437         to combine multiple alignments.
12438         (grow_label_align): Grow vec instead of C array.
12439         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12440         (shorten_branches):  Use align_flags type and use align_flags::max
12441         to combine multiple alignments.
12442         (final_scan_insn_1): Remove usage of secondary alignment that comes
12443         from label alignment, but instead use proper secondary alignment
12444         which is computed in grow_label_align.
12445         * flags.h (struct align_flags_tuple): Move to align.h.
12446         (struct align_flags): Likewise.
12447         (state_align_loops): Rename to align_loops.
12448         (state_align_jumps): Rename to align_jumps.
12449         (state_align_labels): Rename to align_labels.
12450         (state_align_functions): Rename to align_functions.
12451         (align_loops_log): Remove.
12452         (align_jumps_log): Remove.
12453         (align_labels_log): Remove.
12454         (align_functions_log): Remove.
12455         (align_loops_max_skip): Remove.
12456         (align_jumps_max_skip): Remove.
12457         (align_labels_max_skip): Remove.
12458         (align_functions_max_skip): Remove.
12459         (align_loops_value): Remove.
12460         (align_jumps_value): Remove.
12461         (align_labels_value): Remove.
12462         (align_functions_value): Remove.
12463         * output.h (label_to_alignment): Change return type to align_flags.
12464         (label_to_max_skip): Remove.
12465         * target.def: Remove loop_align_max_skip, label_align_max_skip,
12466         jump_align_max_skip macros.
12467         * targhooks.h (default_loop_align_max_skip): Remove.
12468         (default_label_align_max_skip): Likewise.
12469         (default_jump_align_max_skip): Likewise.
12470         (default_label_align_after_barrier_max_skip): Remove.
12471         * toplev.c (read_log_maxskip): Use ::normalize function.
12472         (parse_N_M): Remove not used argument and also call ::normalize.
12473         (parse_alignment_opts): Do not pass unused arguments.
12474         * varasm.c (assemble_start_function): Use directly align_functions
12475         instead of removed macros.
12476         * system.h: Do not poison removed macros.
12478 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
12480         PR middle-end/86539
12481         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12482         and cond temporaries don't have reference type if iterator has
12483         pointer type.  For init use &for_pre_body instead of pre_p if
12484         for_pre_body is non-empty.
12486 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12488         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12489         double-double modes to SFmode directly directly.
12490         (trunc<mode>sf2_fprs): Delete.
12492 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12494         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12495         for conversions between IFmode and the decimal floating point modes.
12496         (init_float128_ieee): Use the correct names for conversions between
12497         KFmode and the decimal floating point modes.
12499 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12501         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12502         for the conversions between TDmode and IFmode.
12503         (init_float128_ieee): Use more correct names for the conversions
12504         between TDmode and KFmode.
12506 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
12508         PR tree-optimization/86526
12509         * builtins.c (expand_builtin_memcmp): Formatting fixes.
12510         (inline_expand_builtin_string_cmp): Likewise.
12511         (inline_string_cmp): Likewise.  Use c_readstr instead of
12512         builtin_memcpy_read_str.  Add unit_mode temporary.
12514 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12516         PR middle-end/86528
12517         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12518         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12520 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12522         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12523         Alphabetize prototypes of built-in functions, separating out
12524         built-in functions that are listed in this section but should be
12525         described elsewhere.
12527 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
12529         PR target/86511
12530         * expmed.c (emit_store_flag): Do not emit setcc followed by a
12531         conditional move when trapping comparison was split to a
12532         non-trapping one (and vice versa).
12534 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12536         * config/s390/s390.c (s390_function_profiler): Generate nops
12537         instead of profiler call sequences.
12538         * config/s390/s390.opt: Add the new option.
12540 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12542         * config/s390/s390.c (s390_function_profiler): Generate
12543         __mcount_loc section.
12544         * config/s390/s390.opt: Add the new option.
12546 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12548         * common.opt: Add the new warning.
12549         * config/s390/s390.c (s390_function_profiler): Emit "brasl
12550         %r0,__fentry__" when -mfentry is specified.
12551         (s390_option_override_internal): Disallow -mfentry for 31-bit
12552         CPUs.
12553         * config/s390/s390.opt: Add the new option.
12555 2018-07-16  Richard Biener  <rguenther@suse.de>
12557         PR lto/86523
12558         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12559         for function-local FUNCTION_DECL and RESULT_DECL immediately.
12561 2018-07-16  Martin Liska  <mliska@suse.cz>
12563         PR ipa/86529
12564         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12565         to ::get_create.
12567 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
12569         * config/arc/arcHS.md: Update ARCHS scheduling rules.
12571 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
12573         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12574         for ARCHS4x.
12575         * config/arc/arc-cpus.def (hs4x): New cpu.
12576         (hs4xd): Likewise.
12577         * config/arc/arc-tables.opt: Regenerate.
12578         * config/arc/arc.c (arc_sched_issue_rate): New function.
12579         (TARGET_SCHED_ISSUE_RATE): Define.
12580         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12581         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12582         fpu_cvt.
12583         (attr tune): Add ARCHS4x tune values.
12584         (attr tune_dspmpy): Define.
12585         (*tst): Correct instruction type.
12586         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12587         * config/arc/arcHS4x.md: New file.
12588         * config/arc/fpu.md: Update instruction type attributes.
12589         * config/arc/t-multilib: Regenerate.
12591 2018-07-16  Tom de Vries  <tdevries@suse.de>
12593         PR debug/86455
12594         * var-tracking.c (vt_initialize): Fix pre_dec handling.
12596 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12598         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12599         early clobber.
12601 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
12603         PR tree-optimization/86514
12604         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12605         conversion to a boolean type from a type with greater precision.
12607 2018-07-16  Tom de Vries  <tdevries@suse.de>
12609         * var-tracking.c (vt_initialize): Print adjusted insn slim if
12610         dump_flags request TDF_SLIM.
12612 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
12614         * fold-const.c (int_const_binop_1): Abstract...
12615         (wide_int_binop): ...wide int code here.
12616         (poly_int_binop): ...poly int code here.
12617         Abstract the rest of int_const_binop_1 into int_const_binop.
12618         * fold-const.h (wide_int_binop): New.
12619         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12620         Remove useless PLUS/MINUS_EXPR case.
12621         (zero_nonzero_bits_from_vr): Move wide int code...
12622         (zero_nonzero_bits_from_bounds): ...here.
12623         (extract_range_from_binary_expr_1): Move mask optimization code...
12624         (range_easy_mask_min_max): ...here.
12625         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12626         (range_easy_mask_min_max): New.
12628 2018-07-15  Jeff Law  <law@redhat.com>
12630         PR target/85993
12631         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12632         block.
12634 2018-07-14  Jim Wilson  <jimw@sifive.com>
12636         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12638 2018-07-14  Paul Koning  <ni1d@arrl.net>
12640         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12642 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
12644         * lto-streamer-out.c (copy_function_or_variable): Dump info about
12645         copying section.
12647 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
12648             Steve Munroe  <munroesj52@gmail.com>
12650         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12651         (_mm_andnot_si128): Likewise.
12652         (_mm_or_si128): Likewise.
12653         (_mm_xor_si128): Likewise.
12655 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
12657         PR middle-end/78809
12658         * builtins.c (expand_builtin_memcmp): Inline the calls first
12659         when result_eq is false.
12660         (expand_builtin_strcmp): Inline the calls first.
12661         (expand_builtin_strncmp): Likewise.
12662         (inline_string_cmp): New routine. Expand a string compare
12663         call by using a sequence of char comparison.
12664         (inline_expand_builtin_string_cmp): New routine. Inline expansion
12665         a call to str(n)cmp/memcmp.
12666         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12667         New option.
12668         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12670 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
12672         * config/arm/driver-arm.c: Include arm-native.h.
12673         (host_detect_local_cpu): Use auto-generated data tables.
12674         (vendors, arm_cpu_table): Delete.  Move part information to ...
12675         * config/arm/arm-cpus.in: ... here.
12676         * config/arm/parsecpu.awk (gen_native): New function.
12677         (vendor, part): New CPU fields.
12678         (END): Add support for building the native CPU detection tables.
12679         * config/arm/t-arm (arm-native.h): Add build rule.
12680         (driver-arm.o): Add dependency on arm-native.h.
12682 2018-07-13  Richard Biener  <rguenther@suse.de>
12684         PR middle-end/85974
12685         * match.pd (addr1 - addr2): Allow either of the operand to
12686         have a conversion.
12688 2018-07-13  Tom de Vries  <tdevries@suse.de>
12690         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12691         in remap_ssa_name.
12693 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
12695         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12696         arrays instead of numbered variables.
12698 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
12700         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12701         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12703 2018-07-13  Richard Biener  <rguenther@suse.de>
12705         PR debug/86452
12706         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12707         instead of get_context_die.
12709 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
12710             Richard Biener  <rguenther@suse.de>
12712         PR middle-end/86489
12713         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12714         that the loop latch destination where phi is defined.
12716 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
12718         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12719         (riscv_expand_epilogue): Add assertion to check interrupt mode.
12720         (riscv_set_current_function): Extract getting interrupt type to new
12721         function.
12722         (riscv_get_interrupt_type): New function.
12723         (riscv_merge_decl_attributes): New function, checking interrupt type is
12724         same.
12725         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12727 2018-07-12  Paul Koning  <ni1d@arrl.net>
12729         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12730         directive.
12732 2018-07-12  Paul Koning  <ni1d@arrl.net>
12734         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12735         zero reference, add doloop_end instead.
12736         * doc/md.texi (decrement_and_branch_until_zero): Remove.
12737         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
12738         detail for doloop_end.
12740 2018-07-12  Martin Sebor  <msebor@redhat.com>
12742         PR c/86453
12743         * attribs.c (decl_attributes): Reject conflicting attributes before
12744         calling attribute handlers.
12746 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
12748         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12749          parameter.
12750         (gcc::dump_manager::get_dump_file_name): likewise.
12751         (dump_begin): Likewise.
12752         * dumpfile.h (dump_begin): Update prototype.
12753         (gcc::dump_manager::get_dump_file_name,
12754         gcc::dump_manager::get_dump_file_name): Update prototype.
12756 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12758         * internal-fn.h (vectorizable_internal_fn_p): New function.
12759         * tree-vect-slp.c (compatible_calls_p): Likewise.
12760         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
12761         to internal functions.
12762         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
12764 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12766         * fold-const.h (inverse_conditions_p): Declare.
12767         * fold-const.c (inverse_conditions_p): New function.
12768         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
12769         that test the inverse condition of a conditional internal function.
12770         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
12771         * internal-fn.c (internal_fn_mask_index): Handle conditional
12772         internal functions.
12773         (vectorized_internal_fn_supported_p): New function.
12774         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
12775         (any_pred_load_store): Replace with...
12776         (need_to_predicate): ...this new variable.
12777         (redundant_ssa_names): New variable.
12778         (ifcvt_can_use_mask_load_store): Move initial checks to...
12779         (ifcvt_can_predicate): ...this new function.  Handle tree codes
12780         for which a conditional internal function exists.
12781         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
12782         instead of ifcvt_can_use_mask_load_store.  Update after variable
12783         name change.
12784         (predicate_load_or_store): New function, split out from
12785         predicate_mem_writes.
12786         (check_redundant_cond_expr): New function.
12787         (value_available_p): Likewise.
12788         (predicate_rhs_code): Likewise.
12789         (predicate_mem_writes): Rename to...
12790         (predicate_statements): ...this.  Use predicate_load_or_store
12791         and predicate_rhs_code.
12792         (combine_blocks, tree_if_conversion): Update after above name changes.
12793         (ifcvt_local_dce): Handle redundant_ssa_names.
12794         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
12795         general conditional functions.
12796         * tree-vect-stmts.c (vectorizable_call): Likewise.
12798 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12799             Alan Hayward  <alan.hayward@arm.com>
12800             David Sherwood  <david.sherwood@arm.com>
12802         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
12803         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
12804         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
12805         plus and minus and convert them into IFN_COND_FMA-based sequences.
12806         (convert_mult_to_fma): Handle conditional plus and minus.
12808 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12810         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
12811         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
12812         (cond_fnms_optab): New optabs.
12813         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
12814         internal functions.
12815         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
12816         * internal-fn.h (get_conditional_internal_fn): Declare.
12817         (get_unconditional_internal_fn): Likewise.
12818         * internal-fn.c (cond_ternary_direct): New macro.
12819         (expand_cond_ternary_optab_fn): Likewise.
12820         (direct_cond_ternary_optab_supported_p): Likewise.
12821         (FOR_EACH_COND_FN_PAIR): Likewise.
12822         (get_conditional_internal_fn): New function.
12823         (get_unconditional_internal_fn): Likewise.
12824         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
12825         (gimple_match_op::gimple_match_op): Add a new overload for 5
12826         operands.
12827         (gimple_match_op::set_op): Likewise.
12828         (gimple_resimplify5): Declare.
12829         * genmatch.c (decision_tree::gen): Generate simplifications for
12830         5 operands.
12831         * gimple-match-head.c (gimple_simplify): Define an overload for
12832         5 operands.  Handle calls with 5 arguments in the top-level overload.
12833         (convert_conditional_op): Handle conversions from unconditional
12834         internal functions to conditional ones.
12835         (gimple_resimplify5): New function.
12836         (build_call_internal): Pass a fifth operand.
12837         (maybe_push_res_to_seq): Likewise.
12838         (try_conditional_simplification): Try converting conditional
12839         internal functions to unconditional internal functions.
12840         Handle 3-operand unconditional forms.
12841         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
12842         Define ternary equivalents of the current rules for binary conditional
12843         internal functions.
12844         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
12845         ternary operations.
12846         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
12847         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
12848         (optab): Handle them.
12849         (SVE_COND_FP_TERNARY): New int iterator.
12850         (sve_fmla_op, sve_fmad_op): New int attributes.
12851         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
12852         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
12853         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
12855 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12857         * target.def (preferred_else_value): New target hook.
12858         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
12859         * doc/tm.texi: Regenerate.
12860         * targhooks.h (default_preferred_else_value): Declare.
12861         * targhooks.c (default_preferred_else_value): New function.
12862         * internal-fn.h (conditional_internal_fn_code): Declare.
12863         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
12864         (get_conditional_internal_fn): Use it.
12865         (conditional_internal_fn_code): New function.
12866         * gimple-match.h (gimple_match_cond): New struct.
12867         (gimple_match_op): Add a cond member function.
12868         (gimple_match_op::gimple_match_op): Update all forms to take a
12869         gimple_match_cond.
12870         * genmatch.c (expr::gen_transform): Use the same condition as res_op
12871         for the suboperation, but don't specify a particular else_value.
12872         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
12873         (visit_nary_op, visit_reference_op_load): Pass
12874         gimple_match_cond::UNCOND to the gimple_match_op constructor.
12875         * gimple-match-head.c: Include tree-eh.h
12876         (convert_conditional_op): New function.
12877         (maybe_resimplify_conditional_op): Likewise.
12878         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
12879         (gimple_resimplify2): Likewise.
12880         (gimple_resimplify3): Likewise.
12881         (gimple_resimplify4): Likewise.
12882         (maybe_push_res_to_seq): Return null for conditional operations.
12883         (try_conditional_simplification): New function.
12884         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
12885         constructor.
12886         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
12887         IFN_COND_* call.
12888         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
12889         function.
12890         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
12892 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
12894         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12895         DECL_FCONTEXT
12896         (hash_tree): Do not hash DECL_FCONTEXT
12897         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
12898         Do not stream DECL_FCONTEXT.
12899         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
12900         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
12902 2018-07-12  Richard Biener  <rguenther@suse.de>
12904         PR debug/86462
12905         * dwarf2out.c (gen_block_die): Only output blocks when they have
12906         at least one !DECL_IGNORED_P variable.
12908 2018-07-12  Richard Biener  <rguenther@suse.de>
12910         PR target/84829
12911         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
12912         Remove -mieee-fp handling.
12914 2018-07-12  Richard Biener  <rguenther@suse.de>
12916         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
12917         left-over from last patch.
12919 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
12921         PR tree-optimization/86492
12922         * gimple-ssa-store-merging.c
12923         (imm_store_chain_info::coalesce_immediate_stores): Call
12924         check_no_overlap even for the merge_overlapping case.  Formatting fix.
12926 2018-07-12  Richard Biener  <rguenther@suse.de>
12928         PR middle-end/86479
12929         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
12930         move possibly trapping operations into the conditional.
12932 2018-07-12  Richard Biener  <rguenther@suse.de>
12934         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
12935         (vn_lookup_simplify_result): Remove recursion limit applied
12936         here.
12937         (vn_nary_build_or_lookup_1): Adjust.
12938         (try_to_simplify): Likewise.
12939         * gimple-match-head.c (gimple_resimplify1): Instead apply one
12940         here.
12941         (gimple_resimplify2): Likewise.
12942         (gimple_resimplify3): Likewise.
12943         (gimple_resimplify4): Likewise.
12945 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
12947         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
12948         Use __mmask64 type instead of __mmask8 for __M argument.
12949         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
12950         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
12951         __U argument.
12952         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
12953         __mmask16 for __M argument.
12954         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
12955         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
12956         to __mmask16 instead of __mmask8.
12957         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
12958         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
12959         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
12960         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
12961         instead of __mmask16 for __U argument.
12962         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
12963         __mmask16 instead of __mmask8 for __U argument.
12964         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
12965         __U argument.
12966         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
12967         __mmask16.
12968         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
12969         argument.
12970         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
12971         __U argument.
12972         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
12973         __mmask16.
12974         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
12975         of __mmask16.
12976         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
12977         __U argument.
12978         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
12979         __U argument.
12980         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
12981         __U argument.
12982         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
12983         __U argument.
12984         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
12985         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
12986         return type as well as __M argument type and all casts from __mmask8
12987         to __mmask32.
12988         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
12989         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
12990         return type as well as __M argument type and all casts from __mmask8
12991         to __mmask16.
12992         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
12993         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
12994         return type as well as __M argument type and all casts from __mmask8
12995         to __mmask32.
12996         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
12997         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
12998         return type as well as __M argument type and all casts from __mmask8
12999         to __mmask16.
13000         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
13001         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
13002         __mmask16.
13004 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
13006         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
13007         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
13008         for __U argument.
13010 2018-07-11  Paul Koning  <ni1d@arrl.net>
13012         * doc/md.texi (define_subst): Document how multiple occurrences of
13013         the same argument in the replacement pattern are handled.
13015 2018-07-11  Paul Koning  <ni1d@arrl.net>
13017         * doc/extend.texi (Common Variable Attributes): Move "mode" into
13018         alphabetical order.
13019         (Common Type Attributes): Add "mode" attribute.
13021 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
13023         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
13024         stream DECL_ORIGINAL_TYPE.
13025         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
13026         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
13027         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
13028         Do not walk original type.
13029         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
13030         external decls.
13031         (write_ts_decl_non_common_tree_pointers): Do not stream
13032         DECL_ORIGINAL_TYPE
13033         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
13034         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
13036 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
13038         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
13039         thread twice from the same starting edge.
13041 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
13043         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
13044         * gimple.c (gimple_call_nonnull_result_p): ...here...
13045         (gimple_call_nonnull_arg): ...and here.
13046         * gimple.h (gimple_call_nonnull_result_p): New.
13047         (gimple_call_nonnull_arg): New.
13049 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
13051         * config/arm/arm-cpus.in: Move information from fpu field of each
13052         cpu definition to the isa field.
13053         * config/arm/parsecpu.awk (fpu): Delete match rule.
13054         (gen_comm_data): Don't add bits from the CPU's FPU entry.
13056 2018-07-11  Richard Biener  <rguenther@suse.de>
13058         PR debug/86457
13059         * dwarf2out.c (init_sections_and_labels): Use
13060         output_asm_line_debug_info consistently.
13061         (dwarf2out_early_finish): Likewise.
13062         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
13063         type units.
13065 2018-07-11  Richard Biener  <rguenther@suse.de>
13067         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
13068         Rework father_bb setting in a way to avoid propagating constants
13069         multiple times on a loop body.
13071 2018-07-10  Mark Wielaard  <mark@klomp.org>
13073         PR debug/86459
13074         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
13076 2018-07-10  Richard Biener  <rguenther@suse.de>
13078         * hash-map.h (hash_map::iterator::operator*): Return
13079         references to key and value.
13081 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
13083         PR c++/86443
13084         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
13085         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
13086         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
13087         (gimplify_omp_for): For composite loops, move outer
13088         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
13089         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
13090         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
13091         TREE_LIST for both the original class iterator and the "last" helper
13092         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
13093         loop, remember has_decl_expr from outer composite loops for the
13094         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
13096 2018-07-09  Martin Sebor  <msebor@redhat.com>
13098         PR middle-end/77357
13099         PR middle-end/86428
13100         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
13101         accessing implicitly initialized array elements.
13102         * expr.c (string_constant): Handle string initializers of
13103         character arrays within aggregates.
13104         * gimple-fold.c (fold_array_ctor_reference): Add argument.
13105         Store element offset.  As a special case, handle zero size.
13106         (fold_nonarray_ctor_reference): Same.
13107         (fold_ctor_reference): Add argument.  Store subobject offset.
13108         * gimple-fold.h (fold_ctor_reference): Add argument.
13110 2018-07-09  Paul Koning  <ni1d@arrl.net>
13112         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
13113         (pdp11_insn_cost): New function.
13114         (pdp11_md_asm_adjust): New function.
13115         (TARGET_INVALID_WITHIN_DOLOOP): Define.
13116         (pdp11_rtx_costs): Update to match machine better.
13117         (output_addr_const_pdp11): Correct format mismatch warnings.
13118         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
13119         * config/pdp11/pdp11.md: General change to add base_cost and/or
13120         length attributes for use by new pdp11_insn_cost function.
13121         (MIN_BRANCH): Correct definition.
13122         (MIN_SOB): Ditto.
13123         (doloop_end): Use standard pattern name for looping pattern.
13124         (doloop_end_nocc): New.
13125         (movsf): Add another constraint alternative.
13126         (zero_extendqihi2): Add constraint alternatives for not in place
13127         extend.
13128         (zero_extendhisi2): Remove.
13129         (shift patterns): Add CC handling variants.
13130         (bswaphi2): New.
13131         (bswapsi2): New.
13132         (rothi3): New.
13133         (define_peephole2): New peephole to recognize mov that sets CC for
13134         subsequent test.
13136 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13138         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
13139         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
13140         wi::add.
13142 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
13144         PR c/86420
13145         * real.c (real_nextafter): Return true if result is denormal.
13147 2018-07-09  Martin Liska  <mliska@suse.cz>
13149         * common.opt: Add back wrongly removed attribute.
13151 2018-07-09  Richard Biener  <rguenther@suse.de>
13153         PR debug/86413
13154         * dwarf2out.c (gen_block_die): For an early generated DIE
13155         always output high/low PC attributes.
13157 2018-07-09  Tom de Vries  <tdevries@suse.de>
13159         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
13160         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
13161         onto VAR_DECL with abstract origin.
13163 2018-07-07  Jim Wilson  <jimw@sifive.com>
13165         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
13167 2018-07-07  Tom de Vries  <tdevries@suse.de>
13169         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
13171 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
13173         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
13174         overflow_type.
13175         (combine_bound): Use wide-int overflow calculation instead of
13176         rolling our own.
13177         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
13178         overflow_type.
13179         * fold-const.c (int_const_binop_2): Same.
13180         (extract_muldiv_1): Same.
13181         (fold_div_compare): Same.
13182         (fold_abs_const): Same.
13183         * match.pd: Same.
13184         * poly-int.h (add): Same.
13185         (sub): Same.
13186         (neg): Same.
13187         (mul): Same.
13188         * predict.c (predict_iv_comparison): Same.
13189         * profile-count.c (slow_safe_scale_64bit): Same.
13190         * simplify-rtx.c (simplify_const_binary_operation): Same.
13191         * tree-chrec.c (tree_fold_binomial): Same.
13192         * tree-data-ref.c (split_constant_offset_1): Same.
13193         * tree-if-conv.c (idx_within_array_bound): Same.
13194         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
13195         * tree-ssa-phiopt.c (minmax_replacement): Same.
13196         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
13197         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
13198         * vr-values.c (vr_values::adjust_range_with_scev): Same.
13199         * wide-int.cc (wi::add_large): Same.
13200         (wi::mul_internal): Same.
13201         (wi::sub_large): Same.
13202         (wi::divmod_internal): Same.
13203         * wide-int.h: Change overflow type to overflow_type for neg, add,
13204         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
13205         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
13206         mul_internal, divmod_internal.
13207         (overflow_type): New enum.
13208         (accumulate_overflow): New.
13210 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
13212         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
13213         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
13215 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
13217         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
13218         argument is checked for zero before entering loop, avoid checking again.
13220 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
13222         * gimplify.h (generic_expr_could_trap_p): Set as global function.
13223         * gimplify.h (generic_expr_could_trap_p): Likwise.
13224         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13226 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
13228         PR tree-optimization/86401
13229         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13230         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13231         (fold_bit_and_mask): ... here.  New helper function for match.pd.
13232         * fold-const.h (fold_bit_and_mask): Declare.
13233         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13235 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
13237         PR target/86324
13238         * target.def (translate_mode_attribute): New hook.
13239         * targhooks.h (default_translate_mode_attribute): Declare.
13240         * targhooks.c (default_translate_mode_attribute): New function.
13241         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13242         * doc/tm.texi: Regenerate.
13243         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13244         (rs6000_translate_mode_attribute): New function.
13246 2018-07-06  Paul Koning  <ni1d@arrl.net>
13248         * doc/md.texi (define_split): Document DONE and FAIL.
13249         (define_peephole2): Ditto.
13251 2018-07-05  Jeff Law  <law@redhat.com>
13253         PR tree-optimization/86010
13254         * tree-ssa-dse.c (compute_trims): More aggressively trim at
13255         both the head and tail of mem* and str* calls.
13257 2018-07-05  Jim Wilson  <jimw@sifive.com>
13259         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13261 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
13263         * config/aarch64/aarch64-simd.md: correct flags text for
13264         MIN_EXPR replacement.
13266 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
13268         * configure: Regenerated.
13270 2018-07-05  Carl Love  <cel@us.ibm.com>
13272         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13273         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13274         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13275         VSX_BUILTIN_DOUBLEL_V4SF.
13277 2018-07-05  Martin Sebor  <msebor@redhat.com>
13279         PR c++/86400
13280         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13281         than its domain to compute its the upper bound of a char array.
13283 2018-07-05  Nathan Sidwell  <nathan@acm.org>
13285         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13286         * doc/cpp.texi: Update comment.
13287         * doc/tm.texi: Rebuilt.
13288         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13289         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13290         * doc/extend.texi (Backwards Compatibility): Clarify it is system
13291         headers affected by extern "C".
13292         * system.h: Poison NO_IMPLICIT_EXTERN_C.
13293         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13294         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13295         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13296         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13297         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13298         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13299         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13300         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13301         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13302         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13303         config/sparc/sp64-elf.h, config/spu/spu.h,
13304         config/stormy16/stormy16.h, config/v850/v850.h,
13305         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13306         define NO_IMPLICIT_EXTERN_C.
13307         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13309 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
13311         PR target/84711
13312         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13313         instead of GET_MODE_SIZE when comparing Units.
13315 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
13317         PR target/84711
13318         * rtlanal.c (set_noop_p): Constrain on mode change,
13319         include hard-reg-set.h
13321 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
13323         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13325 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
13327         Revert
13328         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
13330         PR sanitizer/84250
13331         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13332         libasan.
13333         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13335 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
13337         PR sanitizer/84250
13338         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13339         libasan.
13340         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13342 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
13344         PR middle-end/86380
13345         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13347 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
13349         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13350         neg_*_op* variables.
13352 2018-07-04  Martin Liska  <mliska@suse.cz>
13354         * tree-switch-conversion.c: Define
13355         max_ratio_for_speed and max_ratio_for_size constants.
13357 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
13358             Martin Liska  <mliska@suse.cz>
13360         PR middle-end/66240
13361         PR target/45996
13362         PR c/84100
13363         * common.opt: Rename align options with 'str_' prefix.
13364         * common/config/i386/i386-common.c (set_malign_value): New
13365         function.
13366         (ix86_handle_option): Use it to set -falign-* options/
13367         * config/aarch64/aarch64-protos.h (struct tune_params): Change
13368         type from int to string.
13369         * config/aarch64/aarch64.c: Update default values from int
13370         to string.
13371         * config/alpha/alpha.c (alpha_override_options_after_change):
13372         Likewise.
13373         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13374         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13375         max skip conditionally.
13376         * config/i386/freebsd.h (SUBALIGN_LOG): New.
13377         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13378         max skip conditionally.
13379         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13380         max skip conditionally.
13381         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13382         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13383         max skip conditionally.
13384         * config/i386/i386.c (struct ptt): Change type from int to
13385         string.
13386         (ix86_default_align): Set default values.
13387         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13388         max skip conditionally.
13389         * config/i386/iamcu.h (SUBALIGN_LOG): New.
13390         (ASM_OUTPUT_MAX_SKIP_ALIGN):
13391         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13392         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13393         max skip conditionally.
13394         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13395         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13396         * config/i386/x86-64.h (SUBALIGN_LOG): New.
13397         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13398         max skip conditionally.
13399         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13400         * config/ia64/ia64.c (ia64_option_override): Set default values
13401         for alignment options.
13402         * config/m68k/m68k.c: Handle new str_align_* options.
13403         * config/mips/mips.c (mips_set_compression_mode): Change
13404         type of constants.
13405         (mips_option_override): Set default values for options.
13406         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13407         Likewise.
13408         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13409         Likewise.
13410         * config/rx/rx.c (rx_option_override): Likewise.
13411         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13412         (LABEL_ALIGN): Use align_labels_log.
13413         (LOOP_ALIGN): Use align_loops_align.
13414         * config/s390/s390.c (s390_asm_output_function_label): Use new
13415         macros.
13416         * config/sh/sh.c (sh_override_options_after_change):
13417         Change type of constants.
13418         * config/spu/spu.c (spu_sched_init): Likewise.
13419         * config/sparc/sparc.c (sparc_option_override): Set default
13420         values for options.
13421         * config/visium/visium.c (visium_option_override): Likewise.
13422         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13423         emit p2align format with last argument if it's not needed.
13424         * doc/invoke.texi: Document extended format of -falign-*.
13425         * final.c: Use align_labels alignment.
13426         * flags.h (struct target_flag_state): Change type to use
13427         align_flags.
13428         (struct align_flags_tuple): New.
13429         (struct align_flags): Likewise.
13430         (align_loops_log): Redefine macro to use new types.
13431         (align_loops_max_skip): Redefine macro to use new types.
13432         (align_jumps_log): Redefine macro to use new types.
13433         (align_jumps_max_skip): Redefine macro to use new types.
13434         (align_labels_log): Redefine macro to use new types.
13435         (align_labels_max_skip): Redefine macro to use new types.
13436         (align_functions_log): Redefine macro to use new types.
13437         (align_loops): Redefine macro to use new types.
13438         (align_jumps): Redefine macro to use new types.
13439         (align_labels): Redefine macro to use new types.
13440         (align_functions): Redefine macro to use new types.
13441         (align_functions_max_skip): Redefine macro to use new types.
13442         (align_loops_value): New macro.
13443         (align_jumps_value): New macro.
13444         (align_labels_value): New macro.
13445         (align_functions_value): New macro.
13446         * function.c (invoke_set_current_function_hook): Propagate
13447         alignment values from flags to global variables default in
13448         topleev.h.
13449         * ipa-icf.c (sem_function::equals_wpa): Use
13450         cl_optimization_option_eq instead of memcmp.
13451         * lto-streamer.h (cl_optimization_stream_out): Support streaming
13452         of string types.
13453         (cl_optimization_stream_in): Likewise.
13454         * optc-save-gen.awk: Support strings in cl_optimization.
13455         * opth-gen.awk: Likewise.
13456         * opts.c (finish_options): Remove error checking of invalid
13457         value ranges.
13458         (MAX_CODE_ALIGN): Remove.
13459         (MAX_CODE_ALIGN_VALUE): Likewise.
13460         (parse_and_check_align_values): New function.
13461         (check_alignment_argument): Likewise.
13462         (common_handle_option): Use check_alignment_argument.
13463         * opts.h (parse_and_check_align_values): Declare.
13464         * toplev.c (init_alignments): Remove.
13465         (read_log_maxskip): New.
13466         (parse_N_M): Likewise.
13467         (parse_alignment_opts): Likewise.
13468         (backend_init_target): Remove usage of init_alignments.
13469         * toplev.h (parse_alignment_opts): Declare.
13470         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13471         argument.
13472         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13473         * tree.c (cl_option_hasher::equal): New.
13474         * varasm.c: Use new global macros.
13476 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
13478         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13479         Use a simpler align directive also if MAXSKIP = ALIGN-1.
13480         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13481         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13482         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13483         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13484         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13485         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13486         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13487         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13488         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13489         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13490         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13492 2018-07-04  Martin Liska  <mliska@suse.cz>
13493             Jonathan Wakely  <jwakely@redhat.com>
13495         * coverage.c: Use correct type.
13496         * doc/invoke.texi: Language correction.
13498 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
13500         PR target/85620
13501         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13502         ENDBRANCH for non-tail call which may return via indirect branch.
13503         * doc/extend.texi: Document indirect_return attribute.
13505 2018-07-03  Martin Sebor  <msebor@redhat.com>
13507         PR tree-optimization/86274
13508         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13509         precondition.
13510         (format_floating): Correct handling of infinities and NaNs.
13512 2018-07-03  Martin Sebor  <msebor@redhat.com>
13514         * print-tree.c (print_real_cst): New function.
13515         (print_node_brief): Call it.
13516         (print_node): Ditto.
13518 2018-07-03  Jeff Law  <law@redhat.com>
13520         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13521         into a single pattern.
13523         * config/h8300/h8300.md (ors code_iterator): New.
13524         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13525         a single pattern and single splitter.
13526         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13527         (iorqi3_1, xorqi3_1): Likewise.
13528         (iorqi3, xorqi3 expanders): Similarly.
13530         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13531         (movmd_internal) into a single pattern using the P mode iterator.
13532         (movmd splitters): Similarly.
13533         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13534         (movsd splitters): Similarly.
13536         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13537         ADDB, ADDW and ADDL into a single ADD attribute which selects the
13538         right table based on the size of the operand.
13539         * config/h8300/h8300.md (length_table): Corresponding changes. All
13540         references to "addb", "addw" and "addl" changed to "add".
13541         (btst patterns): Merge two variants into a single pattern.
13542         (tstqi, tsthi): Likewise.
13543         (addhi3_incdec, addsi3_incdec): Likewise.
13544         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13545         (mulhi3, mulsi3): Likewise.
13546         (udivhi3, udivsi3): Likewise.
13547         (divhi3, divsi3): Likewise.
13548         (andorqi3, andorhi3, andorsi3): Likewise.
13550 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
13552         PR target/85694
13553         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13554         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13556 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13558         PR tree-optimization/85694
13559         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13560         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13561         UNSPEC_URHADD.
13562         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13563         (<u>avg<mode>3_ceil): New patterns.
13565 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
13567         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13568         scan-tree-dump directive.
13569         * gcc.dg/vect/slp-perm-2.c: Likewise.
13570         * gcc.dg/vect/slp-perm-3.c: Likewise.
13571         * gcc.dg/vect/slp-perm-5.c: Likewise.
13572         * gcc.dg/vect/slp-perm-6.c: Likewise.
13573         * gcc.dg/vect/slp-perm-7.c: Likewise.
13574         * gcc.dg/vect/slp-perm-8.c: Likewise.
13576 2018-07-03  Marek Polacek  <polacek@redhat.com>
13578         PR middle-end/86202
13579         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13581 2018-07-03  Richard Biener  <rguenther@suse.de>
13583         PR ipa/86389
13584         * tree-ssa-structalias.c (find_func_clobbers): Properly
13585         handle indirect calls.
13587 2018-07-03  Jeff Law  <law@redhat.com>
13589         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13590         (shifts): New code iterator.
13591         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13592         expander.  Fix HImode handling on H8/SX.
13593         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13594         (subqi3, subhi3, subsi3 expanders): Likewise.
13595         (andqi3, andhi3, andsi3 expanders): Likewise.
13596         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13597         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13598         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13599         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13600         (zero_extendqihi2, zero_extendqisi2): Likewise.
13601         (extendqihi2, extendqisi2): Likewise.
13602         (rotlqi3, rotlhi3, rotlsi3): Likewise.
13603         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13604         (rotlqi3_1, rotlhi3_1): Likewise.
13605         (logicalhi3_sn, logicalsi3_sn): Likewise.
13606         (logicalhi3, logicalsi3): Likewise.
13608 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13610         * tree-vect-patterns.c (vect_recog_rotate_pattern)
13611         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13612         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13613         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13614         type to append_pattern_def_seq instead of creating a stmt_vec_info
13615         directly.
13616         (build_mask_conversion): Likewise.  Remove vinfo argument.
13617         (vect_add_conversion_to_patterm): Likewise, renaming to...
13618         (vect_add_conversion_to_pattern): ...this.
13619         (vect_recog_mask_conversion_pattern): Update call to
13620         build_mask_conversion.  Pass the vector type to
13621         append_pattern_def_seq here too.
13622         (vect_recog_gather_scatter_pattern): Update call to
13623         vect_add_conversion_to_pattern.
13625 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13627         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13628         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13629         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13630         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13631         STMT_VINFO_PATTERN_DEF_SEQ to null here.
13632         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13633         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13634         append_pattern_def_seq instead of new_pattern_def_seq.
13635         (vect_recog_divmod_pattern): Do both of the above.
13636         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13637         is null.
13639 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13641         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13642         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13643         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13644         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13645         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13646         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13647         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13648         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13649         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13650         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13651         parameter with a single stmt_vec_info.
13652         (vect_recog_func_ptr): Likewise.
13653         (vect_recog_gather_scatter_pattern): Likewise, folding in...
13654         (vect_try_gather_scatter_pattern): ...this.
13655         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13656         the stmt_vec_info of the statement to be matched.  Don't clear
13657         STMT_VINFO_RELATED_STMT.
13658         (vect_pattern_recog): Update call accordingly.
13660 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13662         PR tree-optimization/85694
13663         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13664         (uavgM3_ceil): Document new optabs.
13665         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13666         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13667         functions.
13668         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13669         (savg_ceil_optab): New optabs.
13670         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13671         (vect_vect_recog_func_ptrs): Add it.
13672         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13673         constant directly from the associated lhs.
13675 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13677         * tree-vect-patterns.c (vect_split_statement): New function.
13678         (vect_convert_input): Use it to try to split an existing cast.
13680 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13682         * poly-int.h (print_hex): New function.
13683         * dumpfile.h (dump_dec, dump_hex): Declare.
13684         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13685         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13686         min_input_precision, operation_precision and operation_sign.
13687         * tree-vect-patterns.c (vect_get_range_info): New function.
13688         (vect_same_loop_or_bb_p, vect_single_imm_use)
13689         (vect_operation_fits_smaller_type): Delete.
13690         (vect_look_through_possible_promotion): Add an optional
13691         single_use_p parameter.
13692         (vect_recog_over_widening_pattern): Rewrite to use new
13693         stmt_vec_info infomration.  Handle one operation at a time.
13694         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13695         (vect_truncatable_operation_p, vect_set_operation_type)
13696         (vect_set_min_input_precision): New functions.
13697         (vect_determine_min_output_precision_1): Likewise.
13698         (vect_determine_min_output_precision): Likewise.
13699         (vect_determine_precisions_from_range): Likewise.
13700         (vect_determine_precisions_from_users): Likewise.
13701         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13702         (vect_vect_recog_func_ptrs): Put over_widening first.
13703         Add cast_forwprop.
13704         (vect_pattern_recog): Call vect_determine_precisions.
13706 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13708         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13709         statements that have been replaced by further pattern statements.
13710         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13712 2018-07-03  Richard Biener  <rguenther@suse.de>
13714         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13715         always set *dt.  Dump vectype in vectype overload.
13716         * dumpfile.h (dump_gimple_expr): New function.
13717         (dump_gimple_expr_loc): Likewise.
13718         * dumpfile.c (dump_gimple_expr): New function.
13719         (dump_gimple_expr_loc): Likewise.
13721 2018-07-02  Jeff Law  <law@redhat.com>
13723         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13724         the H8/300, H8/300H and H8/S variants into a single pattern.
13725         (movhi_h8300, movqi_h8300hs): Similarly.
13726         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13727         (QHI mode iterator): New.
13729         * config/h8300/h8300.md: Remove trailing whitespace.
13731 2018-07-02  Jim Wilson  <jimw@sifive.com>
13733         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13734         instead of emit_insn for interrupt returns.
13735         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13736         (riscv_sret, riscv_uret): Likewise.
13738 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
13740         * pretty-print.c (selftest::test_pp_format): Move save and restore
13741         of quotes to class auto_fix_quotes, and add an instance.
13742         * selftest.c: Include "intl.h".
13743         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13744         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13745         * selftest.h (selftest::auto_fix_quotes): New class.
13747 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
13749         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13750         (aarch64_sve_prepare_conditional_op): Remove.
13751         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13752         Allow aarch64_simd_reg_or_zero as select operand; remove
13753         the aarch64_sve_prepare_conditional_op call.
13754         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13755         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13756         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13757         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
13758         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
13759         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
13760         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
13761         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
13762         and a splitters to match all of the *_any patterns.
13763         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
13765         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
13766         (SVE_COND_FP_BINARY_REV): Remove.
13767         (sve_int_op_rev, sve_fp_op_rev): New.
13768         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
13769         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
13770         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
13771         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
13772         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
13773         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
13774         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
13775         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
13776         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
13778         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
13779         Remove match_dup 1 from the inner unspec.
13780         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13782         * config/aarch64/aarch64.md (movprfx): New attr.
13783         (length): Default movprfx to 8.
13784         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
13785         (*madd<SVE_I>, *msub<SVE_I): Likewise.
13786         (*<su>mul<SVE_I>3_highpart): Likewise.
13787         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
13788         (*v<ASHIFT><SVE_I>3): Likewise.
13789         (*<su><MAXMIN><SVE_I>3): Likewise.
13790         (*<su><MAXMIN><SVE_F>3): Likewise.
13791         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
13792         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
13793         (*div<SVE_F>4): Likewise.
13795 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
13797         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
13798         in dump string.
13800 2018-07-02  Richard Biener  <rguenther@suse.de>
13802         PR tree-optimization/86363
13803         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
13804         memset argument refers to a non-variable address.
13806 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
13808         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
13809         {PLUS,MINUS}_EXPR code to...
13810         (adjust_symbolic_bound): ...here,
13811         (combine_bound): ...here,
13812         (set_value_range_with_overflow): ...and here.
13814 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
13816         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
13817         code...
13818         (extract_range_from_abs_expr): ...here.
13820 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
13822         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
13823         -fno-omit-frame-pointer when not optimizing.
13825 2018-07-02  Martin Liska  <mliska@suse.cz>
13827         PR ipa/86279
13828         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
13829         (propagate_nothrow): Likewise.
13831 2018-07-02  Martin Liska  <mliska@suse.cz>
13833         PR ipa/86323
13834         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
13836 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
13838         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
13839         function in r262149, changing "loc" param from source_location to
13840         const dump_location_t &.
13841         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
13842         declaration, as above.
13844 2018-07-01  Paul Koning  <ni1d@arrl.net>
13846         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13847         -munit-asm, -mgnu-asm, -mdec-asm.
13848         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
13849         (pdp11_output_labelref): New.
13850         (pdp11_output_def): New.
13851         (pdp11_output_addr_vec_elt): New.
13852         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
13853         %# and %@ format codes.
13854         (pdp11_option_override): New.
13855         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
13856         (pdp11_output_ident): New.
13857         (pdp11_asm_named_section): New.
13858         (pdp11_asm_init_sections): New.
13859         (pdp11_file_start): New.
13860         (pdp11_file_end): New.
13861         (output_ascii): Use .ascii/.asciz for -mdec-asm.
13862         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
13863         %o, like %c but octal.
13864         (pdp11_option_override): New.
13865         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
13866         -mdec-asm.
13867         (DATA_SECTION_ASM_OP): Ditto.
13868         (READONLY_DATA_SECTION_ASM_OP): New.
13869         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
13870         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
13871         (ASM_OUTPUT_LABELREF): Ditto.
13872         (ASM_OUTPUT_DEF): Ditto.
13873         (ASM_OUTPUT_EXTERNAL): New.
13874         (ASM_OUTPUT_SOURCE_FILENAME): New.
13875         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
13876         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
13877         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
13878         %# and %@ format codes.
13879         * config/pdp11/pdp11.opt (mgnu-asm): New.
13880         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
13881         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
13882         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
13884 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
13886         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
13887         dereferencing path[] beyond its length.
13888         (debug_path): New.
13889         (debug_all_paths): New.
13890         (rewire_first_differing_edge): New.
13891         (adjust_paths_after_duplication): New.
13892         (duplicate_thread_path): Call adjust_paths_after_duplication.
13893         Add new argument.
13894         (thread_through_all_blocks): Add new argument to
13895         duplicate_thread_path.
13897 2018-06-30  Jim Wilson  <jimw@sifive.com>
13899         * config/riscv/predicates.md (p2m1_shift_operand): New.
13900         (high_mask_shift_operand): New.
13901         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
13902         pattern using p2m1_shift_operand.
13903         (lshsi3_zero_extend_3+2): New combiner pattern using
13904         high_mask_shift_operand.
13906 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13908         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
13909         split out from...
13910         (vect_recog_rotate_pattern): ...here.
13911         (vect_convert_input): Try to insert casts of invariants in the
13912         preheader.
13913         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
13914         preheader to be empty.
13916 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13918         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
13919         vector type.  If given, install it in the new statement's
13920         STMT_VINFO_VECTYPE.
13921         (vect_element_precision): New function.
13922         (vect_unpromoted_value): New struct.
13923         (vect_unpromoted_value::vect_unpromoted_value): New function.
13924         (vect_unpromoted_value::set_op): Likewise.
13925         (vect_look_through_possible_promotion): Likewise.
13926         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
13927         (vect_widened_op_tree, vect_convert_input): Likewise.
13928         (vect_convert_inputs, vect_convert_output): Likewise.
13929         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
13930         to handle the optional cast of the multiplication result and
13931         vect_widened_op_tree to detect the widened multiplication itself.
13932         Do not require the input and output of promotion casts to have
13933         the same sign, but base the signedness of the operation on the
13934         input rather than the result.  If the pattern includes two
13935         promotions, check that those promotions have the same sign.
13936         Do not restrict the MULT_EXPR handling to a double-width result;
13937         handle quadruple-width results and wider.  Use vect_convert_inputs
13938         to convert the inputs to the common type.
13939         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
13940         to handle the optional cast of the ABS result.  Also allow a sign
13941         change or a sign extension between the ABS and MINUS.
13942         Use vect_widened_op_tree to detect the widened subtraction and use
13943         vect_convert_inputs to convert the inputs to the common type.
13944         (vect_handle_widen_op_by_const): Delete.
13945         (vect_recog_widen_op_pattern): New function.
13946         (vect_recog_widen_mult_pattern): Use it.
13947         (vect_recog_widen_shift_pattern): Likewise.
13948         (vect_recog_widen_sum_pattern): Use
13949         vect_look_through_possible_promotion to handle the promoted
13950         PLUS_EXPR operand.
13952 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13954         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
13955         the containing gimple_seq *.
13956         * gimple-iterator.h (gsi_for_stmt): Declare it.
13957         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
13958         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
13959         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13960         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13961         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
13962         checks.
13963         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
13964         split out from...
13965         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
13966         statement being replaced is part of an existing pattern
13967         definition sequence, inserting the new pattern statements before
13968         the original one.
13969         (vect_pattern_recog_1): Don't return a bool.  If the statement
13970         is already part of a pattern, instead apply pattern matching
13971         to the pattern definition statements.  Don't clear the
13972         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
13973         (vect_pattern_recog): Don't break after the first match;
13974         continue processing the pattern definition statements instead.
13975         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
13977 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13979         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13980         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13981         (vect_recog_widen_sum_pattern): Use it.
13983 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13985         * tree-vect-loop.c (vectorizable_reduction): Assert that the
13986         phi is not a pattern statement and has not been replaced by
13987         a pattern statement.
13988         * tree-vect-patterns.c (type_conversion_p): Don't check
13989         STMT_VINFO_IN_PATTERN_P.
13990         (vect_recog_vector_vector_shift_pattern): Likewise.
13991         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
13992         the pattern statement rather than the original statement; check
13993         directly for a WIDEN_MULT_EXPR here.
13994         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
13995         vect_is_simple_use to return the pattern statement rather
13996         than the original statement; use is_pattern_stmt_p to check
13997         for such a pattern statement.
13998         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
13999         to return the pattern statement rather than the original statement;
14000         don't do the same transformation here.
14001         (vect_is_simple_use): If the defining statement has been replaced
14002         by a pattern statement, return the pattern statement instead.
14003         Remove the corresponding (local) transformation from the vectype
14004         overload.
14006 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
14008         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
14009         end and default to null.
14010         * tree-vect-loop.c (vect_create_epilog_for_reduction)
14011         (vectorizable_reduction): Update calls accordingly, dropping the
14012         gimple ** argument if the passed-back statement isn't needed.
14013         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
14014         (vect_recog_rotate_pattern): Likewise.
14015         (vect_recog_mask_conversion_pattern): Likewise.
14016         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
14017         (vect_mask_constant_operand_p): Likewise.
14018         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
14019         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
14020         (get_group_load_store_type, get_load_store_type): Likewise.
14021         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
14022         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
14023         (vectorizable_conversion, vectorizable_assignment): Likewise.
14024         (vectorizable_shift, vectorizable_operation): Likewise.
14025         (vectorizable_store, vect_is_simple_cond): Likewise.
14026         (vectorizable_condition, vectorizable_comparison): Likewise.
14027         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
14028         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
14029         and move it to the end.  Cope with null def_stmt_outs.
14031 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14033         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
14035 2018-06-29  Jeff Law  <law@redhat.com>
14037         * config/v850/v850.c (v850_legitimate_address_p): Handle large
14038         displacements for TARGET_V850E2V3 and newer.
14039         (TARGET_LRA_P): Remove.  Defaults to LRA now.
14040         * config/v850/v850.md (sign23byte_load): Remove.
14041         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
14042         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
14044 2018-06-29  Martin Liska  <mliska@suse.cz>
14046         PR lto/85759
14047         * coverage.c (coverage_init): Mangle full path name.
14048         * doc/invoke.texi: Document the change.
14049         * gcov-io.c (mangle_path): New.
14050         * gcov-io.h (mangle_path): Likewise.
14051         * gcov.c (mangle_name): Use mangle_path for path mangling.
14053 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14055         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
14056         if starting source register is not even.
14058 2018-06-29  Martin Liska  <mliska@suse.cz>
14060         PR tree-optimization/86263
14061         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
14062         Make edge redirection.
14064 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
14066         * dumpfile.c (dump_loc): Add indentation based on scope depth.
14067         (dump_scope_depth): New variable.
14068         (get_dump_scope_depth): New function.
14069         (dump_begin_scope): New function.
14070         (dump_end_scope): New function.
14071         * dumpfile.h (get_dump_scope_depth): New declaration.
14072         (dump_begin_scope): New declaration.
14073         (dump_end_scope): New declaration.
14074         (class auto_dump_scope): New class.
14075         (AUTO_DUMP_SCOPE): New macro.
14076         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14077         AUTO_DUMP_SCOPE.
14079 2018-06-29  Richard Biener  <rguenther@suse.de>
14081         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
14082         compute_all_dependences succeeds.
14083         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
14084         exceed --param loop-max-datarefs-for-datadeps.
14086 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
14088         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
14090 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
14092         PR target/86348
14093         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
14094         alternative 0 in preferred_for_speed attribute.
14096 2018-06-28  Paul Koning  <ni1d@arrl.net>
14098         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
14099         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
14100         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
14101         * config/pdp11/pdp11.md: Correct "length" attribute calculation
14102         for shift insn patterns.
14104 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
14106         * cgraph.c (cgraph_node::get_body): Replace assignments to
14107         "dump_file" with calls to set_dump_file.
14108         * dumpfile.c (alt_dump_file): Make static, and group with...
14109         (alt_flags): ...this definition.
14110         (dumps_are_enabled): New variable.
14111         (refresh_dumps_are_enabled): New function.
14112         (set_dump_file): New function.
14113         (set_alt_dump_file): New function.
14114         (gcc::dump_manager::dump_start): Replace assignments to
14115         "dump_file" and "alt_dump_file" with calls to set_dump_file and
14116         set_alt_dump_file.
14117         (gcc::dump_manager::dump_finish): Likewise.
14118         * dumpfile.h (alt_dump_file): Delete decl.
14119         (dumps_are_enabled): New variable decl.
14120         (set_dump_file): New function decl.
14121         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
14122         global.
14123         * tree-nested.c (lower_nested_functions): Replace assignments to
14124         "dump_file" with calls to set_dump_file.
14126 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
14128         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
14129         goto_locus of each outgoing edge of each basic block.
14131 2018-06-28  Richard Biener  <rguenther@suse.de>
14133         * dwarf2out.c (decl_scope_table): Remove.
14134         (push_decl_scope): Likewise.
14135         (pop_decl_scope): Likewise.
14136         (gen_type_die_for_member): Do not call push/pop_decl_scope.
14137         (gen_struct_or_union_type_die): Likewise.
14138         (gen_tagged_type_die): Likewise.
14139         (dwarf2out_init): Do not initialize decl_scope_table.
14140         (dwarf2out_c_finalize): Do not free it.
14142 2018-06-28  Richard Biener  <rguenther@suse.de>
14144         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
14145         deciding whether to not re-use a DIE.
14147 2018-06-28  Richard Biener  <rguenther@suse.de>
14149         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
14150         DW_AT_abstract_origin attribute.
14152 2018-06-28  Martin Liska  <mliska@suse.cz>
14154         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14155         Use newly introduced constants.
14156         * tree-switch-conversion.h (struct jump_table_cluster):
14157         Define max_ratio_for_size and max_ratio_for_speed.
14159 2018-06-28  Martin Liska  <mliska@suse.cz>
14161         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14162         Add new checking assert to catch invalid state.
14163         (jump_table_cluster::can_be_handled): Handle single case
14164         clusters.
14165         (jump_table_cluster::is_beneficial): Bail out for such case.
14166         (bit_test_cluster::find_bit_tests):
14167         Add new checking assert to catch invalid state.
14168         (bit_test_cluster::can_be_handled): Handle single case
14169         clusters.
14170         (bit_test_cluster::is_beneficial): Bail out for such case.
14171         (switch_decision_tree::analyze_switch_statement):
14172         Fix comment.
14174 2018-06-28  Martin Liska  <mliska@suse.cz>
14176         * common.opt: Introduce -completion option.
14177         * gcc.c (driver_handle_option): Handle it.
14178         (driver::main): Print completions if completion
14179         is set.
14180         * opt-suggestions.c (option_proposer::get_completions):
14181         New function.
14182         (option_proposer::suggest_completion): Likewise.
14183         (option_proposer::find_param_completions): Likewise.
14184         (verify_autocompletions): Likewise.
14185         (test_completion_valid_options): Likewise.
14186         (test_completion_valid_params): Likewise.
14187         (in_completion_p): Likewise.
14188         (empty_completion_p): Likewise.
14189         (test_completion_partial_match): Likewise.
14190         (test_completion_garbage): Likewise.
14191         (opt_proposer_c_tests): Likewise.
14192         * opt-suggestions.h: Declare new functions.
14193         * opts.c (common_handle_option): Handle OPT__completion_.
14194         * selftest-run-tests.c (selftest::run_tests): Add
14195         opt_proposer_c_tests.
14196         * selftest.c (assert_str_startswith): New.
14197         * selftest.h (assert_str_startswith): Likewise.
14198         (opt_proposer_c_tests): New.
14199         (ASSERT_STR_STARTSWITH): Likewise.
14201 2018-06-28  Martin Liska  <mliska@suse.cz>
14203         * Makefile.in: Add opt-suggestions.o.
14204         * gcc-main.c: Include opt-suggestions.h.
14205         * gcc.c (driver::driver): Likewise.
14206         (driver::~driver): Remove m_option_suggestions.
14207         (driver::build_option_suggestions): Moved to option_proposer.
14208         (driver::suggest_option): Likewise.
14209         (driver::handle_unrecognized_options): Use option_proposer.
14210         * gcc.h (class driver): Add new memver m_option_proposer.
14211         * opt-suggestions.c: New file.
14212         * opt-suggestions.h: New file.
14214 2018-06-28  Martin Liska  <mliska@suse.cz>
14216         * vec.h (class auto_string_vec): New (moved from auto_argvec).
14217         (auto_string_vec::~auto_string_vec): Likewise.
14219 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
14221         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14222         prevent_decl_creation_for_types fields up and add reset_location field.
14223         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14224         statement if id->reset_location is true.
14225         (copy_edges_for_bb): Do not set goto_locus on the new edges if
14226         id->reset_location is true.
14227         (copy_phis_for_bb): Force input_location on the arguments if
14228         id->reset_location is true.
14229         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14230         is set on the function to be inlined.
14232 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
14234         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14236 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
14238         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14239         registers for Pmode.
14240         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14241         hard registers for the clobbered pseudo.
14243 2018-06-27  Paul Koning  <ni1d@arrl.net>
14245         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14246         mutually exclusive options.
14247         * config/pdp11/constraints.md (h): New constraint.
14248         (O): Update definition to match shift code generation.
14249         (D): New constraint.
14250         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14251         (CCFP): Remove.
14252         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14253         function.
14254         (output_jump): Change arguments.
14255         (pdp11_fixed_cc_regs): New function.
14256         (pdp11_cc_mode): Ditto.
14257         (pdp11_expand_shift): Ditto.
14258         (pdp11_assemble_shift): Ditto.
14259         (pdp11_small_shift): Ditto.
14260         (pdp11_branch_cost): Remove.
14261         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14262         from output.
14263         (pdp11_register_move_cost): Update for CC registers.
14264         (pdp11_rtx_costs): Add case for LSHIFTRT.
14265         (pdp11_output_jump): Add CCNZ mode conditional branches.
14266         (notice_update_cc_on_set): Remove.
14267         (pdp11_cc_mode): New function.
14268         (simple_memory_operand): Correct pre/post decrement case.
14269         (no_side_effect_operand): New function.
14270         (pdp11_regno_reg_class): Add CC_REGS class.
14271         (pdp11_fixed_cc_regs): New function.
14272         (pdp11_small_shift): New function.
14273         (pdp11_expand_shift): New function to expand shift insns.
14274         (pdp11_assemble_shift): New function to output shifts.
14275         (pdp11_branch_cost): Remove.
14276         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14277         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14278         (WCHAR_TYPE): Ditto.
14279         (PTRDIFF_TYPE): Ditto.
14280         (ADJUST_INSN_LENGTH): New macro.
14281         (FIXED_REGISTERS): Add CC registers.
14282         (CALL_USED_REGISTERS): Ditto.
14283         (reg_class): Ditto.
14284         (REG_CLASS_NAMES): Ditto.
14285         (REG_CLASS_CONTENTS): Ditto.
14286         (SELECT_CC_MODE): Use new function.
14287         (TARGET_FLAGS_REGNUM): New macro.
14288         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14289         (cc0_reg_rtx): Remove.
14290         (CC_STATUS_MDEP): Remove.
14291         (CC_STATUS_MDEFP_INIT): Remove.
14292         (CC_IN_FPU): Remove.
14293         (NOTICE_UPDATE_CC): Remove.
14294         (REGISTER_NAMES): Add CC registers.
14295         (BRANCH_COST): Change to constant 1.
14296         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14297         handling.
14298         * config/pdp11/pdp11.opt (mbcopy): Remove.
14299         (mbcopy-builtin): Remove.
14300         (mbranch-cheap): Remove.
14301         (mbranch-expensive): Remove.
14302         * config/pdp11/predicates.md (expand_shift_operand): Update to
14303         match shift code generation.
14304         (ccnz_operator): New predicate.
14305         * doc/invoke.texi (PDP-11 Options): Remove deleted options
14306         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14307         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
14308         exclusive options.
14309         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
14310         description of O constraint.
14312 2018-06-27  Jeff Law  <law@redhat.com>
14313             Austin Law  <austinklaw@gmail.com>
14315         * config/v850/v850.md (addsi3_set_flags): New pattern.
14316         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14317         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14318         (zero_extendhisi2_v850_set_flags): Likewise.
14319         (zero_extendqisi2_v850_set_flags): Likewise.
14320         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14321         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14322         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14324         * config/v850/v850-protos.h (notice_update_cc): Remove.
14325         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14326         (v850_print_operand): Handle 'D' and "d".
14327         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14328         Add handling of arithmetic/logical operations compared against zero.
14329         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14330         Do not look at v850_compare_op, instead get mode from last argument.
14331         (v850_gen_compare): Remove
14332         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14333         after reload for prologue insns.
14334         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14335         patterns.
14336         (construct_save_jarl): Likewise.
14337         (TARGET_FLAGS_REGNUM): Define.
14338         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14339         (NOTICE_UPDATE_CC): Remove.
14340         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14341         than cc0.  Conditionalize on reload_completed.
14342         (cmpsi_insn, setfcc_insn): Likewise.
14343         (tst1 splitter): Turn into define_and_split which sets the flags
14344         after reload.
14345         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14346         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14347         (cstoresf4, cstoredf4): Clobber the flags.
14348         (cmpsi, cmpsf, cmpdf): Remove expanders.
14349         (setf_insn): Remove pattern.
14350         (addsi3): Turn into define_and_split which clobbers the flags after
14351         reload and a suitable pattern (addsi3_clobber_flags) for use after
14352         reload.
14353         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14354         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14355         (ashrsi3, ashrsi3_v850e2): Likewise.
14356         (bins): Clobber the flags.
14357         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14358         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14359         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14360         (call_value_internal_short, call_value_internal_long): Likewise.
14361         (callt_save_interrupt, callt_return_interrupt): Likewise.
14362         (save_interrupt, return_interrupt): Likewise.
14363         (callt_save_all_interrupt, save_all_interrupt): Likewise.
14364         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14365         (restore_all_interrupt, _restore_all_interrupt): Likewise.
14366         (All FP comparisons): Only allow after reload has completed.
14367         (trfsr): Likewise.
14368         (divh, divhu): Tweak output template.
14369         (branch_z_normal, branch_z_invert): Remove
14370         (branch_nz_normal, branch_nz_invert): Likewise.
14371         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14373         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14374         * config/v850/v850.c (notice_update_cc): Remove.
14375         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
14376         (CC_NO_CARRY): Likewise.
14377         (NOTICE_UPDATE_CC): Define to nothing.
14378         * config/v850/v850.md: Remove block comment on cc0 handling
14379         Remove "cc" attribute from all patterns.  Remove cc_status handling
14380         from all patterns.  Minor formatting fixes.
14382 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14384         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14385         (cortex-a76.cortex-a55): Likewise.
14386         * config/aarch64/aarch64-tune.md: Regenerate.
14387         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14388         cortex-a76.cortex-a55.
14390 2018-06-27  Jeff Law  <law@redhat.com>
14392         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14393         (MULTILIB_DIRNAMES): Similarly.
14395 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
14397         * gimple.h (gimple_return_retbnd): Delete.
14398         (gimple_return_set_retbnd): Likewise.
14399         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14400         gimple_return_set_retbnd.
14401         * gimple-pretty-print.c (dump_gimple_return): Remove call to
14402         gimple_return_retbnd and adjust.
14403         * tree-inline.h (struct copy_body_data): Remove retbnd field.
14404         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14405         Explicitly return NULL in a couple more cases.  Move assertion
14406         on debug statements and remove unreachable code.
14407         (reset_debug_binding): Do not test id->retbnd.
14408         (expand_call_inline): Do not set it.
14410 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
14412         * configure.ac: Add --disable-gcov option.
14413         * configure: Regenerate.
14414         * Makefile.in: Honour @enable_gcov@.
14415         * doc/install.texi: Document --disable-gcov.
14417 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14419         * config/arm/arm-cpus.in (cortex-a76): New entry.
14420         (cortex-a76.cortex-a55): Likewise.
14421         * config/arm/arm-tables.opt: Regenerate.
14422         * config/arm/arm-tune.md: Likewise.
14423         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14424         * doc/invoke.texi (ARM Options): Document cortex-a76 and
14425         cortex-a76.cortex-a55.
14427 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
14429         PR target/85769
14430         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14432 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
14434         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14435         comment.
14436         (EPILOGUE_USES): Likewise.
14438 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
14440         * tree-inline.c (remap_location): New function extracted from...
14441         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
14442         (copy_phis_for_bb): ...here.  Call remap_location.
14443         (copy_cfg_body): Adjust call to copy_edges_for_bb.
14445 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
14447         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14448         unaligned vsx for 16B memset.
14450 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
14452         PR target/86285
14453         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14454         ieee128_float_type_node to long_double_type_node unless
14455         TARGET_LONG_DOUBLE_128 is set.
14457 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
14459         * cfgloop.c (get_loop_location): Convert return type from
14460         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14461         by implicit construction from rtx_insn *, and using
14462         dump_user_location_t::from_function_decl for the fallback case.
14463         * cfgloop.h (get_loop_location): Convert return type from
14464         location_t to dump_user_location_t.
14465         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14466         dump_printf_loc to pass in a dump_location_t rather than a
14467         location_t, via the gimple stmt.
14468         * coverage.c (get_coverage_counts): Update calls to
14469         dump_printf_loc to pass in dump_location_t rather than a
14470         location_t.
14471         * doc/optinfo.texi (Dump types): Convert example of
14472         dump_printf_loc from taking "locus" to taking "insn".  Update
14473         description of the "_loc" calls to cover dump_location_t.
14474         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14475         "selftest.h".
14476         (dump_user_location_t::dump_user_location_t): New constructors,
14477         from gimple *stmt and rtx_insn *.
14478         (dump_user_location_t::from_function_decl): New function.
14479         (dump_loc): Make static.
14480         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14481         const dump_location_t &.
14482         (dump_generic_expr_loc): Delete.
14483         (dump_printf_loc): Convert param "loc" from location_t to
14484         const dump_location_t &.
14485         (selftest::test_impl_location): New function.
14486         (selftest::dumpfile_c_tests): New function.
14487         * dumpfile.h: Include "profile-count.h".
14488         (class dump_user_location_t): New class.
14489         (struct dump_impl_location_t): New struct.
14490         (class dump_location_t): New class.
14491         (dump_printf_loc): Convert 2nd param from source_location to
14492         const dump_location_t &.
14493         (dump_generic_expr_loc): Delete.
14494         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14495         const dump_location_t &.
14496         * gimple-fold.c (fold_gimple_assign): Update call to
14497         dump_printf_loc to pass in a dump_location_t rather than a
14498         location_t, via the gimple stmt.
14499         (gimple_fold_call): Likewise.
14500         * gimple-loop-interchange.cc
14501         (loop_cand::analyze_iloop_reduction_var): Update for change to
14502         check_reduction_path.
14503         (tree_loop_interchange::interchange): Update for change to
14504         find_loop_location.
14505         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14506         change in return-type of find_loop_location.
14507         (graphite_regenerate_ast_isl): Likewise.
14508         * graphite-optimize-isl.c (optimize_isl): Likewise.
14509         * graphite.c (graphite_transform_loops): Likewise.
14510         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14511         pass in a dump_location_t rather than a location_t, via the
14512         gimple stmt.
14513         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14514         * ipa.c (walk_polymorphic_call_targets): Likewise.
14515         * loop-unroll.c (report_unroll): Convert "locus" param from
14516         location_t to dump_location_t.
14517         (decide_unrolling): Update for change to get_loop_location's
14518         return type.
14519         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14520         location_t to dump_user_location_t.
14521         (grid_find_single_omp_among_assignments_1): Updates calls to
14522         dump_printf_loc to pass in a dump_location_t rather than a
14523         location_t, via the gimple stmt.
14524         (grid_parallel_clauses_gridifiable): Convert "tloc" from
14525         location_t to dump_location_t.  Updates calls to dump_printf_loc
14526         to pass in a dump_location_t rather than a location_t, via the
14527         gimple stmt.
14528         (grid_inner_loop_gridifiable_p): Likewise.
14529         (grid_dist_follows_simple_pattern): Likewise.
14530         (grid_gfor_follows_tiling_pattern): Likewise.
14531         (grid_target_follows_gridifiable_pattern): Likewise.
14532         (grid_attempt_target_gridification): Convert initialization
14533         of local "grid" from memset to zero-initialization; FIXME: does
14534         this require C++11?  Update call to dump_printf_loc to pass in a
14535         optinfo_location rather than a location_t, via the gimple stmt.
14536         * profile.c (read_profile_edge_counts): Updates call to
14537         dump_printf_loc to pass in a dump_location_t rather than a
14538         location_t
14539         (compute_branch_probabilities): Likewise.
14540         * selftest-run-tests.c (selftest::run_tests): Call
14541         dumpfile_c_tests.
14542         * selftest.h (dumpfile_c_tests): New decl.
14543         * tree-loop-distribution.c (pass_loop_distribution::execute):
14544         Update for change in return type of find_loop_location.
14545         * tree-parloops.c (parallelize_loops): Likewise.
14546         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14547         "locus" from location_t to dump_user_location_t.
14548         (canonicalize_loop_induction_variables): Likewise.
14549         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14550         for change in return type of find_loop_location.
14551         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14552         to dump_printf_loc to pass in a dump_location_t rather than a
14553         location_t, via the stmt.
14554         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14555         Likewise.
14556         * tree-vect-loop-manip.c (find_loop_location): Convert return
14557         type from source_location to dump_user_location_t.
14558         (vect_do_peeling): Update for above change.
14559         (vect_loop_versioning): Update for change in type of
14560         vect_location.
14561         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14562         from location_t to dump_user_location_t.
14563         (vect_estimate_min_profitable_iters): Update for change in type
14564         of vect_location.
14565         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14566         location_t to dump_location_t.
14567         (vect_slp_bb): Update for change in type of vect_location.
14568         * tree-vectorizer.c (vect_location): Convert from source_location
14569         to dump_user_location_t.
14570         (try_vectorize_loop_1): Update for change in vect_location's type.
14571         (vectorize_loops): Likewise.
14572         (increase_alignment): Likewise.
14573         * tree-vectorizer.h (vect_location): Convert from source_location
14574         to dump_user_location_t.
14575         (find_loop_location): Convert return type from source_location to
14576         dump_user_location_t.
14577         (check_reduction_path): Convert 1st param from location_t to
14578         dump_user_location_t.
14579         * value-prof.c (check_counter): Update call to dump_printf_loc to
14580         pass in a dump_user_location_t rather than a location_t; update
14581         call to error_at for change in type of "locus".
14582         (check_ic_target): Update call to dump_printf_loc to
14583         pass in a dump_user_location_t rather than a location_t, via the
14584         call_stmt.
14586 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
14588         * config/s390/s390.h (enum processor_flags): Do not use
14589         default tune parameter when -march was specified.
14591 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
14593         PR target/86314
14594         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14595         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14596         operands.
14598 2018-06-26  Richard Biener  <rguenther@suse.de>
14600         PR tree-optimization/86287
14601         PR bootstrap/86316
14602         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14603         (vect_analyze_loop): Initialize n_stmts.
14605 2018-06-26  Richard Biener  <rguenther@suse.de>
14607         PR middle-end/86271
14608         * fold-const.c (fold_convertible_p): Pointer extension
14609         isn't valid.
14611 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
14613         PR debug/86064
14614         * dwarf2out.c (loc_list_has_views): Adjust comments.
14615         (dw_loc_list): Split single cross-partition range with
14616         nonzero locview.
14618 2018-06-25  Jeff Law  <law@redhat.com>
14620         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14621         on -mbig-switch by default.
14623         * config/v850/predicates.md (const_float_1_operand): Fix match_code
14624         test.
14625         (const_float_0_operand): Remove unused predicate.
14626         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14627         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14628         (recipsf2): New expander.  Original pattern now called
14629         (recipsf2_insn).
14630         (recipdf2, recipdf2_insn): Similarly.
14631         (rsqrtsf2, rsqrtsf2_insn): Similarly
14632         (rsqrtdf2, rsqrtdf2_insn): Similarly
14634 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
14636         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14637         Simplify logic for FreeBSD (twice).
14639 2018-06-25  Martin Sebor  <msebor@redhat.com>
14641         PR tree-optimization/86204
14642         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14643         a strnlen result if it's less than the length of the string.
14645 2018-06-25  Martin Sebor  <msebor@redhat.com>
14647         PR tree-optimization/85700
14648         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14649         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14650         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14652 2018-06-25  Martin Sebor  <msebor@redhat.com>
14654         * doc/extend.texi (Zero-length arrays): Update and clarify.
14656 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
14658         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14659         added IEEE/IBM long double multilib support on PowerPC little
14660         endian Linux systems.
14661         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14662         (MULTILIB_DEFAULTS): Likewise.
14663         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14664         Likewise.
14665         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14666         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14667         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14669 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
14671         PR middle-end/86311
14672         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14673         (REORDER_45): Likewise.
14675 2018-06-25  Jeff Law  <law@redhat.com>
14677         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14678         dividend to 32 bits.  Adjust length.
14679         (udivmodhi4): Cleanup output template.  Fix length.
14681 2018-06-25  Carl Love  <cel@us.ibm.com>
14683         * config/rs6000/vsx.md: Change word selector to prefered location.
14685 2018-06-25  Richard Biener  <rguenther@suse.de>
14687         PR tree-optimization/86304
14688         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14689         epilogue-if-converted loops as well.
14691 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
14693         * lto-section-out.c (lto_begin_section): Do not print section
14694         name for noaddr and unnumbered dumps.
14696 2018-06-25  Richard Biener  <rguenther@suse.de>
14698         * tree-vectorizer.h (struct vec_info_shared): New structure
14699         with parts split out from struct vec_info and loop_nest from
14700         struct _loop_vec_info.
14701         (struct vec_info): Adjust accordingly.
14702         (struct _loop_vec_info): Likewise.
14703         (LOOP_VINFO_LOOP_NEST): Adjust.
14704         (LOOP_VINFO_DATAREFS): Likewise.
14705         (LOOP_VINFO_DDRS): Likewise.
14706         (struct _bb_vec_info): Likewise.
14707         (BB_VINFO_DATAREFS): Likewise.
14708         (BB_VINFO_DDRS): Likewise.
14709         (struct _stmt_vec_info): Add dr_aux member.
14710         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14711         (DR_MISALIGNMENT_UNINITIALIZED): New.
14712         (set_dr_misalignment): Adjust.
14713         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14714         (vect_analyze_loop): Adjust prototype.
14715         (vect_analyze_loop_form): Likewise.
14716         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14717         Compute dependences lazily.
14718         (vect_record_base_alignments): Use shared datarefs/ddrs.
14719         (vect_verify_datarefs_alignment): Likewise.
14720         (vect_analyze_data_refs_alignment): Likewise.
14721         (vect_analyze_data_ref_accesses): Likewise.
14722         (vect_analyze_data_refs): Likewise.
14723         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14724         constructor parameter for shared part.
14725         (vect_analyze_loop_form): Pass in shared part and adjust.
14726         (vect_analyze_loop_2): Pass in storage for the number of
14727         stmts.  Move loop nest finding to the caller.  Compute
14728         datarefs lazily.
14729         (vect_analyze_loop): Pass in shared part.
14730         (vect_transform_loop): Verify shared datarefs are unchanged.
14731         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14732         constructor parameter for shared part.
14733         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14734         (vect_slp_bb): Verify shared datarefs are unchanged before
14735         transform.
14736         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14737         change.
14738         (new_stmt_vec_info): Initialize DR_AUX misalignment to
14739         DR_MISALIGNMENT_UNINITIALIZED.
14740         * tree-vectorizer.c (vec_info::vec_info): Add constructor
14741         parameter for shared part.
14742         (vec_info::~vec_info): Adjust.
14743         (vec_info_shared::vec_info_shared): New.
14744         (vec_info_shared::~vec_info_shared): Likewise.
14745         (vec_info_shared::save_datarefs): Likewise.
14746         (vec_info_shared::check_datarefs): Likewise.
14747         (try_vectorize_loop_1): Construct shared part live for analyses
14748         of a single loop for multiple vector sizes.
14749         * tree-parloops.c (gather_scalar_reductions): Adjust.
14751 2018-06-25  Richard Biener  <rguenther@suse.de>
14753         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14754         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14755         (vect_analyze_data_refs): Remove similar code from here and
14756         simplify accordingly.
14758 2018-06-25  Richard Biener  <rguenther@suse.de>
14760         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
14761         for reverse storage order accesses rather than asserting
14762         they cannot happen here.
14764 2018-06-25  Tom de Vries  <tdevries@suse.de>
14766         PR debug/86257
14767         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
14768         Use data16 instead of .byte for insn prefix.
14770 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
14772         PR C++/86082
14773         * parser.c (make_char_string_pack): Pass this literal chars
14774         through cpp_interpret_string.
14775         (cp_parser_userdef_numeric_literal): Check the result of
14776         make_char_string_pack.
14778 2018-06-24  Maya Rashish  <coypu@sdf.org>
14780         * ginclude/stddef.h: Simplify conditions around avoiding
14781         re-definition of __size_t.
14783 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14785         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
14786         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
14788 2018-06-22  Maya Rashish  <coypu@sdf.org>
14790         * doc/invoke.texi (mno-fancy-math-387): Update for changes
14791         made to OpenBSD and NetBSD through the years.
14793 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14795         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14796         behavior of vec_pack (vector double, vector double) to match
14797         behavior of vec_float2 (vector double, vector double).
14799 2018-06-22  Olivier Hainque  <hainque@adacore.com>
14801         * gimplify.c (gimplify_function_tree): Prevent creation
14802         of a trampoline for the address of the current function
14803         passed to entry/exit instrumentation hooks.
14805 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
14807         PR target/86222
14808         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
14809         correctly.
14811 2018-06-22  Martin Liska  <mliska@suse.cz>
14813         PR tree-optimization/86263
14814         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14815         Bail out if is_enabled is false.
14816         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
14817         New declaration.
14818         (jump_table_cluster::is_enabled): New function.
14820 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14822         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14823         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
14824         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
14825         (lto_input_ts_binfo_tree_pointers): Likewise.
14826         * tree-streamer-out.c (streamer_write_tree_bitfields,
14827         write_ts_binfo_tree_pointers): Likewise.
14828         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
14830 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14832         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
14834 2018-06-22  Martin Liska  <mliska@suse.cz>
14836         * symbol-summary.h (get): Make it pure and inline move
14837         functionality from ::get function.
14838         (get): Remove and inline into ::get and ::get_create.
14839         (get_create): Move code from ::get function.
14841 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14843         PR target/85994
14844         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
14845         -x assembler-with-cpp.
14847 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14849         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
14850         _FILE_OFFSET_BITS=64 for C++.
14852 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
14854         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
14855         conversion insn that shows up when pr85657-3.c is compiled using
14856         IEEE 128-bit long double.
14857         (neg<mode>2_internal): Use the correct mode to check whether the
14858         mode is IBM extended.
14859         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
14860         multiply and divide external functions from being created more
14861         than once.
14863 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14865         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
14866         functions.
14867         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
14868         the edge can be forwarded.
14869         (cfg_layout_merge_blocks): Likewise.
14871 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14873         * except.c (finish_eh_generation): Commit edge insertions only after
14874         the EH edges have been redirected from post-landing to landing pads.
14876 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14878         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
14879         create_tmp_var_for to create the FRAME decl.
14880         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
14882 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14884         * tree-inline.c (copy_edges_for_bb): Minor tweak.
14885         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
14886         debug statement when resetting its value.
14887         (expand_call_inline): Copy the locus of the call onto the assignment
14888         of the return value, if any.  Use local variable in more cases.
14890 2018-06-21  Martin Liska  <mliska@suse.cz>
14892         * ipa-pure-const.c (propagate_nothrow): Use
14893         funct_state_summaries->get.
14894         (dump_malloc_lattice): Likewise.
14895         (propagate_malloc): Likewise.
14897 2018-06-21  Richard Biener  <rguenther@suse.de>
14899         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
14900         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
14901         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
14902         comment.
14903         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
14904         BLOCK_ABSTRACT_ORIGIN unconditionally.
14906 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
14908         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
14909         deleting it.
14910         * ipa-reference.c (ipa_reference_c_finalize): Delete
14911         ipa_ref_opt_sum_summaries and set it to NULL.
14913 2018-06-21  Tom de Vries  <tdevries@suse.de>
14915         PR tree-optimization/85859
14916         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
14917         test with comment from bb_no_side_effects_p.
14919 2018-06-21  Richard Biener  <rguenther@suse.de>
14921         PR tree-optimization/86232
14922         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
14923         max for constant niter.
14925 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14927         * config/aarch64/aarch64-simd.md
14928         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
14930 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14932         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
14933         Make opernads of the unspec commutative.
14935 2018-06-21  Richard Biener  <rguenther@suse.de>
14937         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
14938         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
14939         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
14940         (vect_analyze_data_ref_dependence): Re-order checks to deal with
14941         NULL DR_STEP.
14942         (vect_record_base_alignments): Do not record base alignment
14943         for gathers or scatters.
14944         (vect_compute_data_ref_alignment): Drop return value that is always
14945         true.  Bail out early for gathers or scatters.
14946         (vect_enhance_data_refs_alignment): Bail out early for gathers
14947         or scatters.
14948         (vect_find_same_alignment_drs): Likewise.
14949         (vect_analyze_data_refs_alignment): Remove dead code.
14950         (vect_slp_analyze_and_verify_node_alignment): Likewise.
14951         (vect_analyze_data_refs): For possible gathers or scatters do
14952         not create an alternate DR, just check their possible validity
14953         and mark them.  Adjust DECL_NONALIASED handling to not rely
14954         on DR_BASE_ADDRESS.
14955         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
14956         update inits of gathers or scatters.
14957         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
14958         Also copy gather/scatter flag to pattern vinfo.
14960 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14962         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14963         behavior of vec_packsu (vector unsigned long long, vector unsigned
14964         long long) to match behavior of vec_packs with same signature.
14966 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
14967             Thomas Schwinge <thomas@codesourcery.com>
14968             Cesar Philippidis  <cesar@codesourcery.com>
14970         * gimplify.c (gimplify_scan_omp_clauses): Add support for
14971         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14972         (gimplify_adjust_omp_clauses): Likewise.
14973         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
14974         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
14975         (gimplify_omp_target_update): Update handling of acc update and
14976         enter/exit data.
14977         * omp-low.c (install_var_field): Remove unused parameter
14978         base_pointers_restrict.
14979         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
14980         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
14981         FINALIZE}
14982         (omp_target_base_pointers_restrict_p): Delete.
14983         (scan_omp_target): Update call to scan_sharing_clauses.
14984         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
14985         FINALIZE}.
14986         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
14987         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14988         (convert_local_omp_clauses): Likewise.
14989         * tree-pretty-print.c (dump_omp_clause): Likewise.
14990         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
14991         FINALIZE}.
14992         (omp_clause_code_name): Likewise.
14994 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
14996         PR debug/86194
14997         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
14998         be narrowed.
15000         PR tree-optimization/86231
15001         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
15002         anti-range don't overwrite *vr0min before using it to compute *vr0max.
15004 2018-06-20  Tom de Vries  <tdevries@suse.de>
15006         PR tree-optimization/86097
15007         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
15008         iv type if signedness of iv type is not the same as that of *nit.
15010 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
15012         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
15013         EDGE_EH edges, verify they are all EDGE_EH.
15015 2018-06-20  Maya Rashish  <coypu@sdf.org>
15017         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
15019 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15021         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
15022         * config/aarch64/aarch64.c (xgene1_tunings): Add
15023         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
15024         (aarch64_mode_valid_for_sched_fusion_p):
15025         Allow 16-byte modes.
15026         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
15027         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
15028         128-bit modes.
15029         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
15030         New pattern.
15031         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
15032         * config/aarch64/iterators.md (VQ2): New mode iterator.
15034 2018-06-20  Martin Liska  <mliska@suse.cz>
15036         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15037         Change default ratio from 10 to 8.
15039 2018-06-20  Martin Liska  <mliska@suse.cz>
15041         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15042         New.
15043         (bit_test_cluster::find_bit_tests): Likewise.
15044         (switch_decision_tree::analyze_switch_statement): Find clusters.
15045         * tree-switch-conversion.h (struct jump_table_cluster): Document
15046         hierarchy.
15048 2018-06-20  Martin Liska  <mliska@suse.cz>
15050         * tree-switch-conversion.c (switch_conversion::collect):
15051         Record m_uniq property.
15052         (switch_conversion::expand): Bail out for special conditions.
15053         (group_cluster::~group_cluster): New.
15054         (group_cluster::group_cluster): Likewise.
15055         (group_cluster::dump): Likewise.
15056         (jump_table_cluster::emit): New.
15057         (switch_decision_tree::fix_phi_operands_for_edges): New.
15058         (struct case_node): Remove struct.
15059         (jump_table_cluster::can_be_handled): New.
15060         (case_values_threshold): Moved to header.
15061         (reset_out_edges_aux): Likewise.
15062         (jump_table_cluster::is_beneficial): New.
15063         (bit_test_cluster::can_be_handled): Likewise.
15064         (add_case_node): Remove.
15065         (bit_test_cluster::is_beneficial): New.
15066         (case_bit_test::cmp): New.
15067         (bit_test_cluster::emit): New.
15068         (expand_switch_as_decision_tree_p): Remove.
15069         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
15070         (fix_phi_operands_for_edge): Likewise.
15071         (switch_decision_tree::analyze_switch_statement): New.
15072         (compute_cases_per_edge): Move ...
15073         (switch_decision_tree::compute_cases_per_edge): ... here.
15074         (try_switch_expansion): Likewise.
15075         (switch_decision_tree::try_switch_expansion): Likewise.
15076         (record_phi_operand_mapping): Likewise.
15077         (switch_decision_tree::record_phi_operand_mapping): Likewise.
15078         (emit_case_decision_tree): Likewise.
15079         (switch_decision_tree::emit): Likewise.
15080         (balance_case_nodes): Likewise.
15081         (switch_decision_tree::balance_case_nodes): Likewise.
15082         (dump_case_nodes): Likewise.
15083         (switch_decision_tree::dump_case_nodes): Likewise.
15084         (emit_jump): Likewise.
15085         (switch_decision_tree::emit_jump): Likewise.
15086         (emit_cmp_and_jump_insns): Likewise.
15087         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
15088         (emit_case_nodes): Likewise.
15089         (switch_decision_tree::emit_case_nodes): Likewise.
15090         (conditional_probability): Remove.
15091         * tree-switch-conversion.h (enum cluster_type): New.
15092         (PRINT_CASE): New.
15093         (struct cluster): Likewise.
15094         (cluster::cluster): Likewise.
15095         (struct simple_cluster): Likewise.
15096         (simple_cluster::simple_cluster): Likewise.
15097         (struct group_cluster): Likewise.
15098         (struct jump_table_cluster): Likewise.
15099         (struct bit_test_cluster): Likewise.
15100         (struct min_cluster_item): Likewise.
15101         (struct case_tree_node): Likewise.
15102         (case_tree_node::case_tree_node): Likewise.
15103         (jump_table_cluster::case_values_threshold): Likewise.
15104         (struct case_bit_test): Likewise.
15105         (struct switch_decision_tree): Likewise.
15106         (struct switch_conversion): Likewise.
15107         (switch_decision_tree::reset_out_edges_aux): Likewise.
15109 2018-06-20  Martin Liska  <mliska@suse.cz>
15111         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
15112         (hoist_edge_and_branch_if_true): Likewise.
15113         (expand_switch_using_bit_tests_p): Likewise.
15114         (struct case_bit_test): Likewise.
15115         (case_bit_test_cmp): Likewise.
15116         (emit_case_bit_tests): Likewise.
15117         (switch_conversion::switch_conversion): New class.
15118         (struct switch_conv_info): Remove old struct.
15119         (collect_switch_conv_info): More to ...
15120         (switch_conversion::collect): ... this.
15121         (check_range): Likewise.
15122         (switch_conversion::check_range): Likewise.
15123         (check_all_empty_except_final): Likewise.
15124         (switch_conversion::check_all_empty_except_final): Likewise.
15125         (check_final_bb): Likewise.
15126         (switch_conversion::check_final_bb): Likewise.
15127         (create_temp_arrays): Likewise.
15128         (switch_conversion::create_temp_arrays): Likewise.
15129         (free_temp_arrays): Likewise.
15130         (gather_default_values): Likewise.
15131         (switch_conversion::gather_default_values): Likewise.
15132         (build_constructors): Likewise.
15133         (switch_conversion::build_constructors): Likewise.
15134         (constructor_contains_same_values_p): Likewise.
15135         (switch_conversion::contains_same_values_p): Likewise.
15136         (array_value_type): Likewise.
15137         (switch_conversion::array_value_type): Likewise.
15138         (build_one_array): Likewise.
15139         (switch_conversion::build_one_array): Likewise.
15140         (build_arrays): Likewise.
15141         (switch_conversion::build_arrays): Likewise.
15142         (gen_def_assigns): Likewise.
15143         (switch_conversion::gen_def_assigns): Likewise.
15144         (prune_bbs): Likewise.
15145         (switch_conversion::prune_bbs): Likewise.
15146         (fix_phi_nodes): Likewise.
15147         (switch_conversion::fix_phi_nodes): Likewise.
15148         (gen_inbound_check): Likewise.
15149         (switch_conversion::gen_inbound_check): Likewise.
15150         (process_switch): Use the newly created class.
15151         (switch_conversion::expand): New.
15152         (switch_conversion::~switch_conversion): New.
15153         * tree-switch-conversion.h: New file.
15155 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15157         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
15158         tree-vect-patterns.c.
15159         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
15160         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
15161         (vect_recog_sad_pattern): Likewise.
15162         (vect_recog_widen_sum_pattern): Likewise.
15163         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
15164         (vect_recog_widen_shift_pattern): Remove the type_in argument.
15165         (vect_recog_rotate_pattern): Likewise.
15166         (vect_recog_mult_pattern): Likewise.
15167         (vect_recog_vector_vector_shift_pattern): Likewise.
15168         (vect_recog_divmod_pattern): Likewise.
15169         (vect_recog_mixed_size_cond_pattern): Likewise.
15170         (vect_recog_bool_pattern): Likewise.
15171         (vect_recog_mask_conversion_pattern): Likewise.
15172         (vect_try_gather_scatter_pattern): Likewise.
15173         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
15174         (vect_recog_over_widening_pattern): Likewise.
15175         (vect_recog_gather_scatter_pattern): Likewise.
15176         (vect_recog_func_ptr): Move from tree-vectorizer.h
15177         (vect_vect_recog_func_ptrs): Move further down the file.
15178         (vect_recog_func): Likewise.  Remove the third argument.
15179         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
15180         (vect_pattern_recog_1): Expect the pattern function to do any
15181         necessary target tests.  Also expect it to provide a vector type.
15182         Remove the type_in handling.
15184 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15186         * tree-vect-patterns.c (vect_pattern_detected): New function.
15187         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
15188         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
15189         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
15190         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
15191         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15192         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15193         (vect_recog_mask_conversion_pattern)
15194         (vect_try_gather_scatter_pattern): Likewise.
15196 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15198         * tree-vect-patterns.c (vect_get_internal_def): New function.
15199         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15200         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
15201         (search_type_for_mask_1): Use it.
15203 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15205         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15206         redundant WIDEN_SUM_EXPR handling.
15207         (vect_recog_sad_pattern): Likewise.
15209 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15211         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15212         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
15213         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
15214         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
15215         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15217 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15219         * tree-vect-stmts.c (vectorizable_call): Make sure that we
15220         use the stmt_vec_info of the original bb statement for the
15221         new zero assignment, even if the call is part of a pattern.
15223 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15225         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15226         that the sequence is attached to the original statement rather
15227         than the pattern statement.
15228         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15229         PATTERN_DEF_SEQ from the original statement rather than
15230         the main pattern statement.
15231         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15232         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15233         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15235 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15237         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15238         definition statements before the early exit for statements that aren't
15239         live or relevant.
15240         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15241         split out from...
15242         (vect_transform_loop): ...here.  Process pattern definition
15243         statements without first checking whether the main pattern
15244         statement is live or relevant.
15246 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
15248         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15249         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15251 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
15253         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15254         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15255         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15256         (expand_block_compare): Change select_block_compare_mode call.
15257         (expand_strncmp_align_check): Use new functions, fix comment.
15258         (emit_final_str_compare_gpr): New function.
15259         (expand_strn_compare): Refactor and clean up code.
15260         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15262 2018-06-19  Tony Reix  <tony.reix@atos.com>
15263             Damien Bergamini  <damien.bergamini@atos.com>
15264             David Edelsohn  <dje.gcc@gmail.com>
15266         * collect2.c (static_obj): New variable.
15267         (static_libs): New variable.
15268         (is_in_list): Uncomment declaration.
15269         (main): Track AIX libraries linked statically.
15270         (is_in_list): Uncomment definition.
15271         (scan_prog_file): Don't add AIX shared libraries initializer
15272         to constructor list if linking statically.
15274 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
15276         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15277         constant.
15278         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15280 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
15282         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15283         blocks.
15285 2018-06-19  Martin Liska  <mliska@suse.cz>
15287         * config/i386/i386.c (ix86_can_inline_p): Do not use
15288         ipa_fn_summaries::get_create.
15289         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15290         get.
15291         (devirtualization_time_bonus): Likewise.
15292         (ipcp_propagate_stage): Likewise.
15293         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15294         (edge_set_predicate): Likewise.
15295         (evaluate_conditions_for_known_args): Likewise.
15296         (evaluate_properties_for_edge): Likewise.
15297         (ipa_call_summary::reset): Tranform to ...
15298         (ipa_call_summary::~ipa_call_summary): ... this.
15299         (ipa_fn_summary::reset): Transform to ...
15300         (ipa_fn_summary::~ipa_fn_summary): ... this.
15301         (ipa_fn_summary_t::remove): Rename to ...
15302         (ipa_fn_summary_t::remove_callees): ... this.
15303         (ipa_fn_summary_t::duplicate): Use placement new
15304         instead of memory copy.
15305         (ipa_call_summary_t::duplicate): Likewise.
15306         (ipa_call_summary_t::remove): Remove.
15307         (dump_ipa_call_summary): Change get_create to get.
15308         (ipa_dump_fn_summary): Dump only when summary exists.
15309         (analyze_function_body): Use symbol_summary::get instead
15310         of get_create.
15311         (compute_fn_summary): Likewise.
15312         (estimate_edge_devirt_benefit): Likewise.
15313         (estimate_edge_size_and_time): Likewise.
15314         (inline_update_callee_summaries): Likewise.
15315         (remap_edge_change_prob): Likewise.
15316         (remap_edge_summaries): Likewise.
15317         (ipa_merge_fn_summary_after_inlining): Likewise.
15318         (write_ipa_call_summary): Likewise.
15319         (ipa_fn_summary_write): Likewise.
15320         (ipa_free_fn_summary): Likewise.
15321         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15322         (struct ipa_call_summary): Likewise.
15323         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15324         of get_create.
15325         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15326         (estimate_size_after_inlining): Likewise.
15327         (estimate_growth): Likewise.
15328         (growth_likely_positive): Likewise.
15329         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15330         (inline_call): Likewise.
15331         * ipa-inline.c (caller_growth_limits): Likewise.
15332         (can_inline_edge_p): Likewise.
15333         (can_inline_edge_by_limits_p): Likewise.
15334         (compute_uninlined_call_time): Likewise.
15335         (compute_inlined_call_time): Likewise.
15336         (want_inline_small_function_p): Likewise.
15337         (edge_badness): Likewise.
15338         (update_caller_keys): Likewise.
15339         (update_callee_keys): Likewise.
15340         (inline_small_functions): Likewise.
15341         (inline_to_all_callers_1): Likewise.
15342         (dump_overall_stats): Likewise.
15343         (early_inline_small_functions): Likewise.
15344         (early_inliner): Likewise.
15345         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15346         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15347         * ipa-pure-const.c (malloc_candidate_p): Likewise.
15348         * ipa-split.c (execute_split_functions): Likewise.
15349         * symbol-summary.h: Likewise.
15350         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15352 2018-06-19  Richard Biener  <rguenther@suse.de>
15354         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15355         (vectorize_loops): ... here.  Fix dbgcnt handling.
15356         (try_vectorize_loop): Wrap try_vectorize_loop_1.
15358 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
15360         PR target/86197
15361         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15362         ieee128 argument takes up only one (vector) register, not two (floating
15363         point) registers.
15365 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
15367         * gimplify.c (gimplify_init_constructor): Really never clear for an
15368         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15370 2018-06-19  Richard Biener  <rguenther@suse.de>
15372         PR tree-optimization/86179
15373         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15374         after failed recognition.
15376 2018-06-18  Martin Sebor  <msebor@redhat.com>
15378         PR middle-end/85602
15379         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15380         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15381         Handle integer subtraction.
15382         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15383         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15385 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
15387         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15388         param from rtx to rtx_insn *.
15389         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15390         param.
15391         (frv_ifcvt_modify_insn): Likwise.
15392         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15393         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
15394         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15395         as_a <rtx_insn *> cast to local "unprotected_region" once
15396         it's been established that it's not NULL or pc_rtx.
15397         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15398         param "sethi" from rtx to rtx_insn *.
15399         (nds32_group_float_insns): Likewise for param "insn".
15400         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15401         param.
15402         (vax_output_int_subtract): Likewise.
15403         * config/vax/vax.c (vax_output_int_add): Likewise for param
15404         "insn".
15405         (vax_output_int_subtract): Likewise.
15406         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15407         (emit_pattern_after): Likewise for param "after".
15408         (emit_insn_after): Likewise.
15409         (emit_jump_insn_after): Likewise.
15410         (emit_call_insn_after): Likewise.
15411         (emit_debug_insn_after): Likewise.
15412         (emit_pattern_before): Likewise for param "before".
15413         (emit_insn_before): Likewise.
15414         (emit_jump_insn_before): Likewise.
15415         * final.c (get_insn_template): Likewise for param "insn", removing
15416         a cast.
15417         * output.h (get_insn_template): Likewise for 2nd param.
15418         * rtl.h (emit_insn_before): Likewise.
15419         (emit_jump_insn_before): Likewise.
15420         (emit_debug_insn_before_noloc): Likewise.
15421         (emit_insn_after): Likewise.
15422         (emit_jump_insn_after): Likewise.
15423         (emit_call_insn_after): Likewise.
15424         (emit_debug_insn_after): Likewise.
15425         (set_insn_deleted): Likewise for param.
15427 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
15429         PR target/85358
15430         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15431         floating point modes, so that IFmode is numerically greater than
15432         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15433         to declare the ordering.  This prevents IFmode from being
15434         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15435         machine.  Include rs6000-modes.h to share the fractional values
15436         between genmodes* and the rest of the compiler.
15437         (IFmode): Likewise.
15438         (KFmode): Likewise.
15439         (TFmode): Likewise.
15440         * config/rs6000/rs6000-modes.h: New file.
15441         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15442         meaning of rs6000_long_double_size so that 126..128 selects an
15443         appropriate 128-bit floating point type.
15444         (rs6000_option_override_internal): Likewise.
15445         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15446         (TARGET_LONG_DOUBLE_128): Change the meaning of
15447         rs6000_long_double_size so that 126..128 selects an appropriate
15448         128-bit floating point type.
15449         (LONG_DOUBLE_TYPE_SIZE): Update comment.
15450         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15451         source and destination to match the standard usage.
15452         (truncifkf2): Likewise.
15453         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15454         ISA 2.07 to use an explicit clobber, instead of passing in a
15455         temporary.
15456         (copysign<mode>3_soft): Likewise.
15458 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
15460         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15461         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15462         (vect_slp_analyze_instance_dependence): Likewise.
15463         (vect_enhance_data_refs_alignment): Likewise.
15464         (vect_analyze_data_refs_alignment): Likewise.
15465         (vect_slp_analyze_and_verify_instance_alignment
15466         (vect_analyze_data_ref_accesses): Likewise.
15467         (vect_prune_runtime_alias_test_list): Likewise.
15468         (vect_analyze_data_refs): Likewise.
15469         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15470         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15471         (vect_analyze_scalar_cycles_1): Likewise.
15472         (vect_get_loop_niters): Likewise.
15473         (vect_analyze_loop_form_1): Likewise.
15474         (vect_update_vf_for_slp): Likewise.
15475         (vect_analyze_loop_operations): Likewise.
15476         (vect_analyze_loop): Likewise.
15477         (vectorizable_induction): Likewise.
15478         (vect_transform_loop): Likewise.
15479         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15480         * tree-vect-slp.c (vect_analyze_slp): Likewise.
15481         (vect_make_slp_decision): Likewise.
15482         (vect_detect_hybrid_slp): Likewise.
15483         (vect_slp_analyze_operations): Likewise.
15484         (vect_slp_bb): Likewise.
15485         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15486         (vectorizable_bswap): Likewise.
15487         (vectorizable_call): Likewise.
15488         (vectorizable_simd_clone_call): Likewise.
15489         (vectorizable_conversion): Likewise.
15490         (vectorizable_assignment): Likewise.
15491         (vectorizable_shift): Likewise.
15492         (vectorizable_operation): Likewise.
15493         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15495 2018-06-18  Martin Sebor  <msebor@redhat.com>
15497         PR tree-optimization/81384
15498         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15499         * builtins.c (expand_builtin_strnlen): New function.
15500         (expand_builtin): Call it.
15501         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15502         * builtins.def (BUILT_IN_STRNLEN): New.
15503         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15504         Warn for bounds in excess of maximum object size.
15505         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15506         single-value ranges.  Handle strnlen.
15507         (handle_builtin_strlen): Handle strnlen.
15508         (strlen_check_and_optimize_stmt): Same.
15509         * doc/extend.texi (Other Builtins): Document strnlen.
15511 2018-06-18  Maya Rashish  <coypu@sdf.org>
15513         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15514         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15515         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15517         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15518         here to ...
15519         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15521 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15523         * tree.c (escaped_string::escape): Replace cast to char * by
15524         const_cast<char *> (unescaped).
15526 2018-06-18  Nick Clifton  <nickc@redhat.com>
15528         PR 84195
15529         * tree.c (escaped_string): New class.  Converts an unescaped
15530         string into its escaped equivalent.
15531         (warn_deprecated_use): Use the new class to convert the
15532         deprecation message, if present.
15533         (test_escaped_strings): New self test.
15534         (test_c_tests): Add test_escaped_strings.
15535         * doc/extend.texi (deprecated): Add a note that the
15536         deprecation message is affected by the -fmessage-length
15537         option, and that control characters will be escaped.
15538         (#pragma GCC error): Document this pragma.
15539         (#pragma GCC warning): Likewise.
15540         * doc/invoke.texi (-fmessage-length): Document this option's
15541         effect on the #warning and #error preprocessor directives and
15542         the deprecated attribute.
15544 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15546         * tree.c (decl_value_expr_lookup): Revert latest change.
15547         (decl_value_expr_insert): Likewise.
15549 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
15551         * gimplify.c (nonlocal_vlas): Delete.
15552         (nonlocal_vla_vars): Likewise.
15553         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15554         referenced VLAs.
15555         (gimplify_body): Do not create and destroy nonlocal_vlas.
15556         * tree-nested.c: Include diagnostic.h.
15557         (use_pointer_in_frame): Tweak.
15558         (lookup_field_for_decl): Add assertion and declare the transformation.
15559         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15560         internal error when the reference is in a wrong context.  Do not
15561         create a debug decl by default.
15562         (note_nonlocal_block_vlas): Delete.
15563         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15564         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
15565         create a debug decl by default.
15566         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15567         call is in a wrong context.
15568         (fixup_vla_decls): New function.
15569         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
15570         debug variables were created.
15571         * tree.c (decl_value_expr_lookup): Add checking assertion.
15572         (decl_value_expr_insert): Likewise.
15574 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
15576         PR middle-end/82479
15577         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15578         * tree-scalar-evolution.c (interpret_expr): Likewise.
15579         (expression_expensive_p): Likewise.
15580         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15581         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15582         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15583         (ssa_defined_by_minus_one_stmt_p): New.
15585 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
15587         PR middle-end/64946
15588         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15589         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15590         * dojump.c (do_jump): Likewise.
15591         * expr.c (expand_expr_real_2): Check operand type's sign.
15592         * fold-const.c (const_unop): Handle ABSU_EXPR.
15593         (fold_abs_const): Likewise.
15594         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15595         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15596         (strip_sign_op_1): Likesise.
15597         * match.pd: Add new pattern to generate ABSU_EXPR.
15598         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15599         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15600         * tree-eh.c (operation_could_trap_helper_p): Likewise.
15601         * tree-inline.c (estimate_operator_cost): Likewise.
15602         * tree-pretty-print.c (dump_generic_node): Likewise.
15603         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15604         * tree.def (ABSU_EXPR): New.
15606 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
15608         PR middle-end/86095
15609         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15610         documented as preserved for backward compatibility only.
15611         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15613         PR rtl-optimization/86108
15614         * bb-reorder.c (create_forwarder_block): Renamed to ...
15615         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
15616         jump from new landing pad to the second part.
15617         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15618         Adjust callers.
15620 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
15622         PR middle-end/85878
15623         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15624         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15625         Only call store_expr for halves if the mode is the same.
15627         PR middle-end/86123
15628         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15629         Fix up comment formatting.
15631 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15633         * typed-splay-tree.h (typed_splay_tree::remove): New function.
15634         (typed_splay_tree::closure,
15635         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15636         (typed_splay_tree::typed_splay_tree,
15637         typed_splay_tree::operator =): Declared private.
15638         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15639         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15640         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15641         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15642         typed_splay_tree::splay_tree_splay,
15643         typed_splay_tree::splay_tree_foreach_helper,
15644         typed_splay_tree::splay_tree_insert,
15645         typed_splay_tree::splay_tree_remove,
15646         typed_splay_tree::splay_tree_lookup,
15647         typed_splay_tree::splay_tree_predecessor,
15648         typed_splay_tree::splay_tree_successor,
15649         typed_splay_tree::splay_tree_min,
15650         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15651         (typed_splay_tree::root, typed_splay_tree::comp,
15652         typed_splay_tree::delete_key,
15653         typed_splay_tree::delete_value): New data members.
15654         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15655         typed_splay_tree::remove.
15657 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
15659         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15660         -mginv and -mno-ginv to the assembler.
15661         * config/mips/mips.opt (-mcrc): New option.
15662         (-mginv): Likewise.
15663         * doc/invoke.text (-mcrc): Document.
15664         (-mginv): Likewise.
15666 2018-06-15  Nick Clifton  <nickc@redhat.com>
15668         PR 84195
15669         * tree.c (escaped_string): New class.  Converts an unescaped
15670         string into its escaped equivalent.
15671         (warn_deprecated_use): Use the new class to convert the
15672         deprecation message, if present.
15673         (test_escaped_strings): New self test.
15674         (test_c_tests): Add test_escaped_strings.
15675         * doc/extend.texi (deprecated): Add a note that the
15676         deprecation message is affected by the -fmessage-length
15677         option, and that control characters will be escaped.
15678         (#pragma GCC error): Document this pragma.
15679         (#pragma GCC warning): Likewise.
15680         * doc/invoke.texi (-fmessage-length): Document this option's
15681         effect on the #warning and #error preprocessor directives and
15682         the deprecated attribute.
15684 2018-06-15  Richard Biener  <rguenther@suse.de>
15686         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15687         here, also noting vector size used.
15688         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
15689         size used in MSG_OPTIMIZED_LOCATIONS dump.
15690         (pass_slp_vectorize::execute): Adjust.
15692 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
15694         PR target/85968
15695         * config/arc/arc.c (arc_return_address_register): Fix
15696         if-condition.
15698 2018-06-15  Richard Biener  <rguenther@suse.de>
15700         PR middle-end/86159
15701         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15702         leave useless conversion stripping to force_gimple_operand_gsi.
15703         (gimplify_build2): Likewise.
15704         (gimplify_build1): Likewise.
15706 2018-06-15  Richard Biener  <rguenther@suse.de>
15708         PR middle-end/86076
15709         * tree-cfg.c (move_stmt_op): unshare invariant addresses
15710         before adjusting their block.
15712 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15714         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15715         multilibs for *-*-rtems*.
15716         * config/riscv/t-rtems: New file.
15718 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
15720         PR middle-end/86122
15721         * match.pd ((A +- CST1) +- CST2): Punt if last resort
15722         unsigned_type_for returns NULL.
15724         PR target/85945
15725         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15726         subregs of multi-word pseudos unless the float mode has word size.
15728 2018-06-14  Richard Biener  <rguenther@suse.de>
15730         PR middle-end/86139
15731         * tree-vect-generic.c (build_word_mode_vector_type): Remove
15732         duplicate and harmful type_hash_canon.
15733         * tree.c (type_hash_canon): Assert we didn't find ourselves.
15735 2018-06-14  Richard Biener  <rguenther@suse.de>
15737         PR ipa/86124
15738         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15739         NULL cgraph_node.
15741 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15743         * config/rtems.h (STDINT_LONG32): Define.
15745 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
15746             Prachi Godbole  <prachi.godbole@imgtec.com>
15748         * config/mips/mips-cpus.def: Define P6600.
15749         * config/mips/mips-tables.opt: Regenerate.
15750         * config/mips/mips.c (mips_ucbranch_type): New enum.
15751         (mips_rtx_cost_data): Add support for P6600.
15752         (mips_issue_rate): Likewise.
15753         (mips_multipass_dfa_lookahead): Likewise.
15754         (mips_avoid_hazard): Likewise.
15755         (mips_reorg_process_insns): Likewise.
15756         (mips_classify_branch_p6600): New function.
15757         * config/mips/mips.h (TUNE_P6600): New define.
15758         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
15759         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
15760         * config/mips/mips.md: Include p6600.md.
15761         (processor): Add p6600.
15762         * config/mips/p6600.md: New file.
15763         * doc/invoke.texi: Add p6600 to supported architectures.
15765 2018-06-13  Martin Sebor  <msebor@redhat.com>
15767         PR tree-optimization/86114
15768         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
15769         of integer types.
15770         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
15772 2018-06-13  Richard Biener  <rguenther@suse.de>
15774         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
15775         Properly set vector type of the intermediate stmt.
15776         * tree-vect-stmts.c (vectorizable_operation): The destination
15777         var always has vectype_out type.
15779 2018-06-13  Jeff Law  <law@redhat.com>
15781         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
15782         integer 0 for argument to print_rtl_with_bb.
15783         (rl78_reorg): Likewise.
15785 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
15787         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
15788         from rtx to rtx_insn *.
15789         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
15790         "label".
15791         (add_sched_insns_for_speculation): Likewise for local "target",
15792         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15793         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
15794         from rtx_insn ** to rtx_code_label **.
15795         (reorg_emit_nops): Likewise.
15796         (c6x_reorg): Likewise for local "call_labels".
15797         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
15798         rtx to rtx_insn *.
15799         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
15800         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
15801         the loops over LABEL_REFS.
15802         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
15803         braf_label.
15804         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15805         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
15806         (split_branches): Strengthen local "olabel" from rtx to
15807         rtx_insn *, adding a safe_as_a cast.
15808         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
15809         to "rtx_insn *".
15810         (add_insn_after): Likewise for first two params.
15811         (add_insn_before): Likewise.
15812         (remove_insn): Likewise for param.
15813         (emit_pattern_before_noloc): Likewise for second and third params.
15814         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
15815         (emit_call_insn_before_noloc): Likewise.
15816         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
15817         to "rtx_insn *".
15818         (emit_barrier_before): Likewise.
15819         (emit_label_before): Strengthen "label" param from "rtx" to
15820         "rtx_code_label *".  Strengthen "before" param from "rtx" to
15821         "rtx_insn *".
15822         (emit_insn_after_1): Strengthen "after" param from "rtx" to
15823         "rtx_insn *".
15824         (emit_pattern_after_noloc): Likewise.
15825         (emit_insn_after_noloc): Likewise.
15826         (emit_jump_insn_after_noloc): Likewise.
15827         (emit_call_insn_after_noloc): Likewise.
15828         (emit_debug_insn_after_noloc): Likewise.
15829         (emit_barrier_after): Likewise.
15830         (emit_label_after): Likewise for both params.
15831         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
15832         "loc" param from "int" to "location_t".
15833         (emit_insn_after_setloc): Likewise.
15834         (emit_jump_insn_after_setloc): Likewise.
15835         (emit_call_insn_after_setloc): Likewise.
15836         (emit_debug_insn_after_setloc): Likewise.
15837         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
15838         "loc" param from "int" to "location_t".
15839         (emit_pattern_before): Convert NULL_RTX to NULL.
15840         (emit_insn_before_setloc): Convert "loc" param from "int" to
15841         "location_t".
15842         (emit_jump_insn_before_setloc): Likewise.
15843         (emit_call_insn_before_setloc): Likewise.
15844         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
15845         rtx_insn *.  Convert "loc" param from "int" to "location_t".
15846         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
15847         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
15848         Convert 3rd param from "int" to "location_t".
15849         (emit_barrier_before, emit_barrier_after, next_real_insn):
15850         Strengthen param from rtx to rtx_insn *.
15851         (emit_label_before): Strengthen 1st param from "rtx" to
15852         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
15853         "rtx_insn *".
15854         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
15855         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
15856         Strengthen 2nd param from "rtx" to "rtx_insn *".
15857         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
15858         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
15859         Likewise. Convert 3rd param from "int" to "location_t".
15860         (emit_label_after): Strengthen 1st param from "rtx" to
15861         "rtx_code_label *".
15862         (next_real_insn, remove_insn): Strengthen param from "rtx" to
15863         "rtx_insn *".
15864         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
15865         from "rtx" to "rtx_insn *".
15867 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
15869         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
15870         bodies streamed in with -Q.
15871         * dumpfile.c (dump_files): Add lto-stream-out dump file.
15872         * dumpfile.h (tree_dump_index): Add lto_stream_out.
15873         * gimple-streamer-out.c: Include gimple-pretty-print.h
15874         (output_bb): Dump stmts streamed.
15875         * lto-section-out.c: Include print-tree.h
15876         (lto_begin_section): Dump sections created.
15877         (lto_output_decl_index): Dump decl encoded.
15878         * lto-streamer-out.c: Include print-tree.h
15879         (create_output_block): Dump output block created.
15880         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
15881         (output_function): Dump function output.
15882         (output_constructor): Dump constructor streamed.
15883         (write_global_stream): Output indexes encoded.
15884         (produce_asm_for_decls): Dump streams encoded.
15885         * lto-streamer.c (streamer_dump_file): New global var.
15886         * lto-streamer.h (streamer_dump_file): Declare.
15887         * passes.c (ipa_write_summaries): Initialize streamer dump.
15888         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
15889         in.
15891 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
15893         PR target/86048
15894         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
15895         offsets for register save directives.  Emit a second batch of save
15896         directives, if need be, when the function accesses prior frames.
15898 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15900         * config/arc/fpu.md (fmasf4): Force operand to register.
15901         (fnmasf4): Likewise.
15903 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15905         * config/arc/arc-protos.h (arc_pad_return): Remove.
15906         * config/arc/arc.c (machine_function): Remove force_short_suffix
15907         and size_reason.
15908         (arc_print_operand): Adjust printing of '&'.
15909         (arc_verify_short): Remove conditional printing of short suffix.
15910         (arc_final_prescan_insn): Remove reference to size_reason.
15911         (pad_return): New function.
15912         (arc_reorg): Call pad_return.
15913         (arc_pad_return): Remove.
15914         (arc_init_machine_status): Remove reference to force_short_suffix.
15915         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
15916         (attr length): When attribute iscompact is true force to 2
15917         regardless; in the case of maybe check if we want to force the
15918         instruction to have 4 bytes length.
15919         (nopv): Change it to generate 4 byte long nop as well.
15920         (blockage): New pattern.
15921         (simple_return): Remove call to arc_pad_return.
15922         (p_return_i): Likewise.
15924 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15926         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
15928 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15930         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
15931         ARC cores.
15933 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15935         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
15936         for ARC700 and ARCv2.
15938 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
15940         PR target/86076
15941         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
15942         operands[2] instead of operands[1].
15945 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
15947         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
15948         case, check whether the outer register overlaps an unallocatable
15949         register, not just whether it fits the required class.
15951 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
15953         * poly-int.h (can_div_trunc_p): Add new overload in which all values
15954         are poly_ints.
15955         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
15956         (memrefs_conflict_p): Likewise.
15957         (init_alias_analysis): Likewise.
15958         * cfgexpand.c (expand_debug_expr): Likewise.
15959         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
15960         * cse.c (fold_rtx): Likewise.
15961         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
15962         * expr.c (emit_block_move_hints): Likewise.
15963         (clear_storage_hints, push_block, emit_push_insn): Likewise.
15964         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
15965         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
15966         (emit_group_store): Likewise.
15967         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
15968         to read the PRE/POST_MODIFY increment.
15969         * calls.c (store_one_arg): Use strip_offset.
15970         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
15971         poly_int_rtx_p.
15972         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
15973         by a VEC_SELECT.
15974         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
15975         (simplify_binary_operation_1): Extend CONST_INT handling to
15976         poly_int_rtx_p.
15977         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
15978         than a HOST_WIDE_INT.
15979         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
15980         poly_int64.
15981         (adjust_mems, add_stores): Update accodingly.
15982         (vt_canonicalize_addr): Track polynomial offsets.
15983         (emit_note_insn_var_location): Likewise.
15984         (vt_add_function_parameter): Likewise.
15985         (vt_initialize): Likewise.
15987 2018-06-12  Jeff Law  <law@redhat.com>
15989         * config.gcc (alpha*-*-freebsd*): Remove.
15990         * config/alpha/freebsd.h: Remove.
15992 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
15994         PR other/69968
15995         * spellcheck-tree.c (levenshtein_distance): Rename to...
15996         (get_edit_distance): ...this, and update for underlying renaming.
15997         * spellcheck-tree.h (levenshtein_distance): Rename to...
15998         (get_edit_distance): ...this.
15999         * spellcheck.c (levenshtein_distance): Rename to...
16000         (get_edit_distance): ...this.  Convert from Levenshtein distance
16001         to Damerau-Levenshtein distance by supporting transpositions of
16002         adjacent characters.  Rename "v1" to "v_next" and "v0" to
16003         "v_one_ago".
16004         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
16005         (selftest::test_edit_distance_unit_test_oneway): ...this, and
16006         update for underlying renaming.
16007         (selftest::levenshtein_distance_unit_test): Rename to...
16008         (selftest::test_get_edit_distance_unit): ...this, and update for
16009         underlying renaming.
16010         (selftest::test_find_closest_string): Add example from PR 69968
16011         where transposition helps
16012         (selftest::test_metric_conditions): Update for renaming.
16013         (selftest::test_metric_conditions): Likewise.
16014         (selftest::spellcheck_c_tests): Likewise.
16015         * spellcheck.h (levenshtein_distance): Rename both overloads to...
16016         (get_edit_distance): ...this.
16017         (best_match::consider): Update for renaming.
16019 2018-06-12  Martin Sebor  <msebor@redhat.com>
16021         PR tree-optimization/85259
16022         * builtins.c (compute_objsize): Handle constant offsets.
16023         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
16024         true iff a warning has been issued.
16025         * gimple.h (gimple_nonartificial_location): New function.
16026         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
16027         gimple_nonartificial_location and handle -Wno-system-headers.
16028         (handle_builtin_stxncpy): Same.
16030 2018-06-12  Martin Sebor  <msebor@redhat.com>
16032         PR c/85931
16033         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
16035 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
16037         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16038         BUILTIN_VEC_XST entries for pointer to double and long long.
16040 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
16042         PR target/85990
16043         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16044         Update comments.
16045         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16046         Likewise.
16048 2018-06-12  Martin Liska  <mliska@suse.cz>
16050         * doc/options.texi: Document IntegerRange.
16052 2018-06-12  Martin Liska  <mliska@suse.cz>
16054         * config/i386/i386.opt: Make MPX-related options as Deprecated.
16055         * opt-functions.awk: Handle Deprecated flag.
16056         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
16057         and report error.
16058         (read_cmdline_option): Report warning for a deprecated option.
16059         * opts.h (struct cl_option): Add new field cl_deprecated.
16060         (CL_ERR_DEPRECATED): New.
16062 2018-06-12  Martin Liska  <mliska@suse.cz>
16064         * doc/options.texi: Document Deprecated option flag.
16066 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16068         * config/arc/arc-arch.h (arc_extras): New enum.
16069         (arc_cpu_t):Add field extra.
16070         (arc_cpu_types): Consider the extras.
16071         * config/arc/arc-cpus.def: Add extras info.
16072         * config/arc/arc-opts.h (processor_type): Consider extra field.
16073         * config/arc/arc.c (arc_override_options): Handle extra field.
16075 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16077         * config/arc/arc-arch.h: Update ARC_OPTX macro.
16078         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
16079         field.
16080         * config/arc/arc.c (arc_init): Update pic warning.
16081         (irq_range): Update irq range parsing warnings.
16082         (arc_override_options): Update various warning messages.
16083         (arc_handle_aux_attribute): Likewise.
16085 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
16087         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
16089 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16091         * doc/sourcebuild.texi: Document usage of line number 0 in verify
16092         compiler messages directives.
16094 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
16096         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
16097         * config/mips/mips-tables.opt: Regenerate.
16098         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
16099         mips64r6.
16100         * doc/invoke.texi: Document -march=i6500.
16102 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
16104         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
16105         (i6400_gpmul): Add cpu_unit.
16106         (i6400_gpdiv): Likewise.
16107         (i6400_msa_add_d): Update reservations.
16108         (i6400_msa_int_add) Likewise.
16109         (i6400_msa_short_logic3) Likewise.
16110         (i6400_msa_short_logic2) Likewise.
16111         (i6400_msa_short_logic) Likewise.
16112         (i6400_msa_move) Likewise.
16113         (i6400_msa_cmp) Likewise.
16114         (i6400_msa_short_float2) Likewise.
16115         (i6400_msa_div_d) Likewise.
16116         (i6400_msa_long_logic1) Likewise.
16117         (i6400_msa_long_logic2) Likewise.
16118         (i6400_msa_mult) Likewise.
16119         (i6400_msa_long_float2) Likewise.
16120         (i6400_msa_long_float4) Likewise.
16121         (i6400_msa_long_float5) Likewise.
16122         (i6400_msa_long_float8) Likewise.
16123         (i6400_fpu_fadd): Include frint type.
16124         (i6400_fpu_store): New define_insn_reservation.
16125         (i6400_fpu_load): Likewise.
16126         (i6400_fpu_move): Likewise.
16127         (i6400_fpu_fcmp): Likewise.
16128         (i6400_fpu_fmadd): Likewise.
16129         (i6400_int_mult): Include imul3nc type and update reservation.
16130         (i6400_int_div): Include idiv3 type and update reservation.
16131         (i6400_int_load): Update to check type not move_type.
16132         (i6400_int_store): Likewise.
16133         (i6400_int_prefetch): Set zero latency.
16135 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
16137         * gcc.c: Document new %@{...} sequence.
16138         (LINK_COMMAND_SPEC): Use it for the -L switches.
16139         (cpp_unique_options): Use it for the -I switches.
16140         (at_file_argbuf): New global variable.
16141         (in_at_file): Likewise.
16142         (alloc_args): Create at_file_argbuf.
16143         (clear_args): Truncate at_file_argbuf.
16144         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
16145         (open_at_file): New function.
16146         (close_at_file): Likewise.
16147         (create_at_file): Delete.
16148         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
16149         <'o'>: Likewise.
16150         <'@'>: New case.
16151         (validate_switches_from_spec): Deal with %@{...} sequence.
16152         (validate_switches): Likewise.
16153         (driver::finalize): Call clear_args.
16155 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
16157         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
16159 2018-06-11  Martin Sebor  <msebor@redhat.com>
16161         * doc/invoke.texi (-Wall): List -Wc++17-compat.
16162         (Wno-class-memaccess): Add @opindex.
16163         (Wno-templates, Wno-multiple-inheritance): Same.
16164         (Wno-virtual-inheritance, Wno-namespaces): Same.
16165         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
16166         (Wno-format-overflow, Wno-format-truncation): Same.
16167         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
16168         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
16169         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
16170         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
16171         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
16172         (Wno-misspelled-isr): Same.
16174 2018-06-11  Martin Sebor  <msebor@redhat.com>
16176         * PR tree-optimization/86083
16177         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
16179 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
16181         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
16183 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
16185         PR target/85755
16186         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
16187         on the correct operand.
16188         (*movdi_internal64): Ditto.
16190 2018-06-11  Martin Liska  <mliska@suse.cz>
16192         PR tree-optimization/86089
16193         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
16195 2018-06-11  Julia Koval  <julia.koval@intel.com>
16197         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
16198         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
16199         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
16201 2018-06-11  Olivier Hainque  <hainque@adacore.com>
16203         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
16204         for Ada with strict dwarf2.
16206 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
16208         PR target/85755
16209         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
16210         addresses.
16212 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
16214         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
16216 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
16218         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16219         TARGET_ELF.
16221 2018-06-08  Martin Liska  <mliska@suse.cz>
16223         * tree-cfg.h (debug_function): Fix argument type to match
16224         implementation.
16226 2018-06-08  Martin Liska  <mliska@suse.cz>
16228         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16229         Remove usage of MPX-related (and removed) fields.
16230         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16232 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
16234         * cfg.c (debug): Use TDF_NONE rather than 0.
16235         * cfghooks.c (debug): Likewise.
16236         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16237         (struct dump_option_value_info): Convert to...
16238         (struct kv_pair): ...this template type.
16239         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16240         rather than 0.
16241         (optinfo_verbosity_options): Likewise.
16242         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16243         OPTGROUP_NONE.
16244         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16245         than int for "optgroup_flags" param.
16246         (dump_generic_expr_loc): Use dump_flags_t rather than int for
16247         "dump_kind" param.
16248         (dump_dec): Likewise.
16249         (dump_finish): Use TDF_NONE rather than 0.
16250         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16251         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
16252         than 0.  Update for change to option_ptr.
16253         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16254         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
16255         0.  Update for changes to optinfo_verbosity_options and
16256         optgroup_options.
16257         (opt_info_switch_p): Convert optgroup_flags from int to
16258         optgroup_flags_t.
16259         (dump_basic_block): Use dump_flags_t rather than int
16260         for "dump_kind" param.
16261         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16262         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16263         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16264         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16265         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16266         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16267         TDF_NONE): Convert from macros to...
16268         (enum dump_flag): ...this new enum.
16269         (dump_flags_t): Update to use enum.
16270         (operator|, operator&, operator~, operator|=, operator&=):
16271         Implement for dump_flags_t.
16272         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16273         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16274         Convert from macros to...
16275         (enum optgroup_flag): ...this new enum.
16276         (optgroup_flags_t): New typedef.
16277         (operator|, operator|=): Implement for optgroup_flags_t.
16278         (struct dump_file_info): Convert field "alt_flags" to
16279         dump_flags_t.  Convert field "optgroup_flags" to
16280         optgroup_flags_t.
16281         (dump_basic_block): Use dump_flags_t rather than int for param.
16282         (dump_generic_expr_loc): Likewise.
16283         (dump_dec): Likewise.
16284         (dump_register): Convert param "optgroup_flags" to
16285         optgroup_flags_t.
16286         (opt_info_enable_passes): Likewise.
16287         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16288         than 0.
16289         * gimple-pretty-print.c (debug): Likewise.
16290         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16291         (merged_store_group::apply_stores): Likewise.
16292         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16293         * gimple.c (verify_gimple_pp): Likewise.
16294         * graphite-poly.c (print_pbb_body): Likewise.
16295         * passes.c (pass_manager::register_one_dump_file): Convert
16296         local "optgroup_flags" to optgroup_flags_t.
16297         * print-tree.c (print_node): Use TDF_NONE rather than 0.
16298         (debug): Likewise.
16299         (debug_body): Likewise.
16300         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16301         to optgroup_flags_t.
16302         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16303         than 0.
16304         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16305         (convert_mult_to_fma): Likewise.
16306         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16307         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16308         * tree-vect-data-refs.c (dump_lower_bound): Convert param
16309         "dump_kind" to dump_flags_t.
16311 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
16313         * config/rs6000/rs6000.c (min, max): Delete.
16315 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
16317         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16318         -mabi=spe and -mabi=no-spe.
16320 2018-06-08  Martin Liska  <mliska@suse.cz>
16322         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16323         where we expect an existing summary.
16325 2018-06-08  Martin Liska  <mliska@suse.cz>
16327         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16328         * ipa-inline.h (estimate_edge_growth): Likewise.
16330 2018-06-08  Martin Liska  <mliska@suse.cz>
16332         * cgraph.c (function_version_hasher::hash): Use
16333         cgraph_node::get_uid ().
16334         (function_version_hasher::equal):
16335         * cgraph.h (cgraph_node::get_uid): New method.
16336         * ipa-inline.c (update_caller_keys): Use
16337         cgraph_node::get_uid ().
16338         (update_callee_keys): Likewise.
16339         * ipa-utils.c (searchc): Likewise.
16340         (ipa_reduced_postorder): Likewise.
16341         * lto-cgraph.c (input_node): Likewise.
16342         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16343         * symbol-summary.h (symtab_insertion): Likewise.
16344         (symtab_removal): Likewise.
16345         (symtab_duplication): Likewise.
16346         * tree-pretty-print.c (dump_function_header): Likewise.
16347         * tree-sra.c (convert_callers_for_node): Likewise.
16349 2018-06-08  Martin Liska  <mliska@suse.cz>
16351         * cgraph.c (symbol_table::create_edge): Always assign a new
16352         unique number.
16353         (symbol_table::free_edge): Do not recycle numbers.
16354         * cgraph.h (cgraph_edge::get): New method.
16355         * symbol-summary.h (symtab_removal): Use it.
16356         (symtab_duplication): Likewise.
16357         (call_summary::hashable_uid): Remove.
16359 2018-06-08  Martin Liska  <mliska@suse.cz>
16361         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16362         (initialize_growth_caches): Remove.
16363         (free_growth_caches): Likewise.
16364         (do_estimate_edge_time): Use edge_growth_cache.
16365         (do_estimate_edge_size): Likewise.
16366         (do_estimate_edge_hints): Likewise.
16367         * ipa-inline.c (reset_edge_caches): Likewise.
16368         (recursive_inlining): Likewise.
16369         (inline_small_functions): Likewise.
16370         * ipa-inline.h (initialize_growth_caches): Remove.
16371         (estimate_edge_size): Likewise.
16372         (estimate_edge_time): Likewise.
16373         (estimate_edge_hints): Likewise.
16374         (reset_edge_growth_cache): Likewise.
16375         * symbol-summary.h (call_summary::remove): New method.
16377 2018-06-08  Martin Liska  <mliska@suse.cz>
16379         * ipa-cp.c (class edge_clone_summary): New summary.
16380         (grow_edge_clone_vectors): Remove.
16381         (ipcp_edge_duplication_hook): Remove.
16382         (class edge_clone_summary_t): New call_summary class.
16383         (ipcp_edge_removal_hook): Remove.
16384         (edge_clone_summary_t::duplicate): New function.
16385         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16386         (create_specialized_node): Likewise.
16387         (ipcp_driver): Initialize edge_clone_summaries and do not
16388         register hooks.
16390 2018-06-08  Martin Liska  <mliska@suse.cz>
16392         * symbol-summary.h (get): New function.
16393         (call_summary::m_initialize_when_cloning): New class member.
16395 2018-06-08  Martin Liska  <mliska@suse.cz>
16397         * cgraph.c (cgraph_node::remove): Do not recycle uid.
16398         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16399         (symbol_table::allocate_cgraph_symbol): Do not set uid.
16400         * passes.c (uid_hash_t): Record removed_nodes by their uids.
16401         (remove_cgraph_node_from_order): Use the removed_nodes set.
16402         (do_per_function_toporder): Likwise.
16403         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16404         instead of summary_uid.
16405         (symtab_removal): Likewise.
16406         (symtab_duplication): Likewise.
16408 2018-06-08  Martin Liska  <mliska@suse.cz>
16410         * ipa-cp.c (ipcp_store_bits_results): Use
16411         ipcp_transformation_sum.
16412         (ipcp_store_vr_results): Likewise.
16413         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16414         to ...
16415         (ipcp_transformation_initialize): ... this.
16416         (ipa_set_node_agg_value_chain):
16417         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16418         (write_ipcp_transformation_info): Likewise.
16419         (read_ipcp_transformation_info): Likewise.
16420         (ipcp_update_bits): Likewise.
16421         (ipcp_update_vr): Likewise.
16422         (ipcp_transform_function): Likewise.
16423         * ipa-prop.h: Rename ipcp_transformation_summary to
16424         ipcp_transformation.
16425         (class ipcp_transformation_t): New function summary.
16426         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16427         (ipa_get_agg_replacements_for_node): Likewise.
16429 2018-06-08  Martin Liska  <mliska@suse.cz>
16431         * ipa-pure-const.c (struct funct_state_d): Do it class instead
16432         of struct.
16433         (class funct_state_summary_t): New function_summary class.
16434         (has_function_state): Remove.
16435         (get_function_state): Likewise.
16436         (set_function_state): Likewise.
16437         (add_new_function): Likewise.
16438         (funct_state_summary_t::insert): New function.
16439         (duplicate_node_data): Remove.
16440         (remove_node_data): Remove.
16441         (funct_state_summary_t::duplicate): New function.
16442         (register_hooks): Create new funct_state_summaries.
16443         (pure_const_generate_summary): Use it.
16444         (pure_const_write_summary): Likewise.
16445         (pure_const_read_summary): Likewise.
16446         (propagate_pure_const): Likewise.
16447         (propagate_nothrow): Likewise.
16448         (dump_malloc_lattice): Likewise.
16449         (propagate_malloc): Likewise.
16450         (execute): Do not register hooks, just remove summary
16451         instead.
16452         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16453         constructor.
16455 2018-06-08  Martin Liska  <mliska@suse.cz>
16457         * ipa-reference.c (remove_node_data): Remove.
16458         (duplicate_node_data): Likewise.
16459         (class ipa_ref_var_info_summary_t): New class.
16460         (class ipa_ref_opt_summary_t): Likewise.
16461         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16462         (get_reference_optimization_summary): Use
16463         ipa_ref_opt_sum_summaries.
16464         (set_reference_vars_info): Remove.
16465         (set_reference_optimization_summary): Likewise.
16466         (ipa_init): Create summaries.
16467         (init_function_info): Use function summary.
16468         (ipa_ref_opt_summary_t::duplicate): New function.
16469         (ipa_ref_opt_summary_t::remove): New function.
16470         (get_read_write_all_from_node): Fix GNU coding style.
16471         (propagate): Use function summary.
16472         (write_node_summary_p): Fix GNU coding style.
16473         (stream_out_bitmap): Likewise.
16474         (ipa_reference_read_optimization_summary): Use function summary.
16475         (ipa_reference_c_finalize): Do not release hooks.
16477 2018-06-08  Martin Liska  <mliska@suse.cz>
16479         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16480         (analyze_function_body): Extract multiple calls of get_create.
16481         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16482         * ipa-inline.c (recursive_inlining): Use ::get method.
16483         * ipa-inline.h (estimate_edge_growth): Likewise.
16485 2018-06-08  Martin Liska  <mliska@suse.cz>
16487         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16488         HSA_INVALID.
16489         (hsa_function_summary::hsa_function_summary): Use the new enum
16490         value.
16491         (hsa_gpu_implementation_p): Use hsa_summaries::get.
16492         * hsa-gen.c (hsa_get_host_function): Likewise.
16493         (get_brig_function_name): Likewise.
16494         * ipa-hsa.c (process_hsa_functions): Likewise.
16495         (ipa_hsa_write_summary): Likewise.
16496         * symbol-summary.h (symtab_duplication): Use ::get function/
16497         (get): New function.
16499 2018-06-08  Martin Liska  <mliska@suse.cz>
16501         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16502         of get.
16503         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16504         (hsa_register_kernel): Likewise.
16505         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16506         * hsa-gen.c (hsa_get_host_function): Likewise.
16507         (get_brig_function_name): Likewise.
16508         (generate_hsa): Likewise.
16509         (pass_gen_hsail::execute): Likewise.
16510         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16511         (devirtualization_time_bonus): Likewise.
16512         (ipcp_propagate_stage): Likewise.
16513         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16514         (edge_set_predicate): Likewise.
16515         (evaluate_conditions_for_known_args): Likewise.
16516         (evaluate_properties_for_edge): Likewise.
16517         (ipa_fn_summary::reset): Likewise.
16518         (ipa_fn_summary_t::duplicate): Likewise.
16519         (dump_ipa_call_summary): Likewise.
16520         (ipa_dump_fn_summary): Likewise.
16521         (analyze_function_body): Likewise.
16522         (compute_fn_summary): Likewise.
16523         (estimate_edge_devirt_benefit): Likewise.
16524         (estimate_edge_size_and_time): Likewise.
16525         (estimate_calls_size_and_time): Likewise.
16526         (estimate_node_size_and_time): Likewise.
16527         (inline_update_callee_summaries): Likewise.
16528         (remap_edge_change_prob): Likewise.
16529         (remap_edge_summaries): Likewise.
16530         (ipa_merge_fn_summary_after_inlining): Likewise.
16531         (ipa_update_overall_fn_summary): Likewise.
16532         (read_ipa_call_summary): Likewise.
16533         (inline_read_section): Likewise.
16534         (write_ipa_call_summary): Likewise.
16535         (ipa_fn_summary_write): Likewise.
16536         (ipa_free_fn_summary): Likewise.
16537         * ipa-hsa.c (process_hsa_functions): Likewise.
16538         (ipa_hsa_write_summary): Likewise.
16539         (ipa_hsa_read_section): Likewise.
16540         * ipa-icf.c (sem_function::merge): Likewise.
16541         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16542         (do_estimate_edge_time): Likewise.
16543         (estimate_size_after_inlining): Likewise.
16544         (estimate_growth): Likewise.
16545         (growth_likely_positive): Likewise.
16546         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16547         (inline_call): Likewise.
16548         * ipa-inline.c (caller_growth_limits): Likewise.
16549         (can_inline_edge_p): Likewise.
16550         (can_inline_edge_by_limits_p): Likewise.
16551         (compute_uninlined_call_time): Likewise.
16552         (compute_inlined_call_time): Likewise.
16553         (want_inline_small_function_p): Likewise.
16554         (edge_badness): Likewise.
16555         (update_caller_keys): Likewise.
16556         (update_callee_keys): Likewise.
16557         (recursive_inlining): Likewise.
16558         (inline_small_functions): Likewise.
16559         (inline_to_all_callers_1): Likewise.
16560         (dump_overall_stats): Likewise.
16561         (early_inline_small_functions): Likewise.
16562         (early_inliner): Likewise.
16563         * ipa-inline.h (estimate_edge_growth): Likewise.
16564         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16565         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16566         * ipa-prop.h (IPA_NODE_REF): Likewise.
16567         (IPA_EDGE_REF): Likewise.
16568         * ipa-pure-const.c (malloc_candidate_p): Likewise.
16569         (propagate_malloc): Likewise.
16570         * ipa-split.c (execute_split_functions): Likewise.
16571         * symbol-summary.h: Rename get to get_create.
16572         (get): Likewise.
16573         (get_create): Likewise.
16574         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16576 2018-06-08  Martin Liska  <mliska@suse.cz>
16578         * symbol-summary.h (release): Move definition out of class
16579         declaration.
16580         (symtab_removal): Likewise.
16581         (symtab_duplication): Likewise.
16583 2018-06-08  Martin Liska  <mliska@suse.cz>
16585         * symbol-summary.h (function_summary): Move constructor
16586         implementation out of class declaration.
16587         (release): Likewise.
16588         (symtab_insertion): Likewise.
16589         (symtab_removal): Likewise.
16590         (symtab_duplication): Likewise.
16591         (get): Likewise.
16593 2018-06-08  Martin Liska  <mliska@suse.cz>
16595         * Makefile.in: Remove support for MPX (macros, related functions,
16596         fields in cgraph_node, ...).
16597         * builtin-types.def (BT_BND): Likewise.
16598         (BT_FN_BND_CONST_PTR): Likewise.
16599         (BT_FN_CONST_PTR_BND): Likewise.
16600         (BT_FN_VOID_PTR_BND): Likewise.
16601         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16602         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16603         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16604         (expand_builtin_mempcpy_with_bounds): Likewise.
16605         (expand_builtin_memset_with_bounds): Likewise.
16606         (expand_builtin_memset_args): Likewise.
16607         (std_expand_builtin_va_start): Likewise.
16608         (expand_builtin): Likewise.
16609         (expand_builtin_with_bounds): Likewise.
16610         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16611         (DEF_LIB_BUILTIN_CHKP): Likewise.
16612         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16613         (DEF_CHKP_BUILTIN): Likewise.
16614         (BUILT_IN_MEMCPY): Likewise.
16615         (BUILT_IN_MEMMOVE): Likewise.
16616         (BUILT_IN_MEMPCPY): Likewise.
16617         (BUILT_IN_MEMSET): Likewise.
16618         (BUILT_IN_STPCPY): Likewise.
16619         (BUILT_IN_STRCAT): Likewise.
16620         (BUILT_IN_STRCHR): Likewise.
16621         (BUILT_IN_STRCPY): Likewise.
16622         (BUILT_IN_STRLEN): Likewise.
16623         (BUILT_IN_MEMCPY_CHK): Likewise.
16624         (BUILT_IN_MEMMOVE_CHK): Likewise.
16625         (BUILT_IN_MEMPCPY_CHK): Likewise.
16626         (BUILT_IN_MEMSET_CHK): Likewise.
16627         (BUILT_IN_STPCPY_CHK): Likewise.
16628         (BUILT_IN_STRCAT_CHK): Likewise.
16629         (BUILT_IN_STRCPY_CHK): Likewise.
16630         * calls.c (store_bounds): Likewise.
16631         (emit_call_1): Likewise.
16632         (special_function_p): Likewise.
16633         (maybe_warn_nonstring_arg): Likewise.
16634         (initialize_argument_information): Likewise.
16635         (finalize_must_preallocate): Likewise.
16636         (compute_argument_addresses): Likewise.
16637         (expand_call): Likewise.
16638         * cfgexpand.c (expand_call_stmt): Likewise.
16639         (expand_return): Likewise.
16640         (expand_gimple_stmt_1): Likewise.
16641         (pass_expand::execute): Likewise.
16642         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16643         (cgraph_node::remove): Likewise.
16644         (cgraph_node::dump): Likewise.
16645         (cgraph_node::verify_node): Likewise.
16646         * cgraph.h (chkp_function_instrumented_p): Likewise.
16647         (symtab_node::get_alias_target): Likewise.
16648         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16649         (cgraph_local_p): Likewise.
16650         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16651         (cgraph_edge::rebuild_references): Likewise.
16652         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16653         (walk_polymorphic_call_targets): Likewise.
16654         (cgraph_node::expand_thunk): Likewise.
16655         (symbol_table::output_weakrefs): Likewise.
16656         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16657         (ix86_handle_option): Likewise.
16658         * config/i386/constraints.md: Likewise.
16659         * config/i386/i386-builtin-types.def (BND): Likewise.
16660         (VOID): Likewise.
16661         (PVOID): Likewise.
16662         (ULONG): Likewise.
16663         * config/i386/i386-builtin.def (BDESC_END): Likewise.
16664         (BDESC_FIRST): Likewise.
16665         (BDESC): Likewise.
16666         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16667         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16668         * config/i386/i386.c (enum reg_class): Likewise.
16669         (ix86_target_string): Likewise.
16670         (ix86_option_override_internal): Likewise.
16671         (ix86_conditional_register_usage): Likewise.
16672         (ix86_valid_target_attribute_inner_p): Likewise.
16673         (ix86_set_indirect_branch_type): Likewise.
16674         (ix86_set_current_function): Likewise.
16675         (ix86_function_arg_regno_p): Likewise.
16676         (init_cumulative_args): Likewise.
16677         (ix86_function_arg_advance): Likewise.
16678         (ix86_function_arg): Likewise.
16679         (ix86_pass_by_reference): Likewise.
16680         (ix86_function_value_regno_p): Likewise.
16681         (ix86_function_value_1): Likewise.
16682         (ix86_function_value_bounds): Likewise.
16683         (ix86_return_in_memory): Likewise.
16684         (ix86_setup_incoming_vararg_bounds): Likewise.
16685         (ix86_va_start): Likewise.
16686         (indirect_thunk_need_prefix): Likewise.
16687         (print_reg): Likewise.
16688         (ix86_print_operand): Likewise.
16689         (ix86_expand_call): Likewise.
16690         (ix86_output_function_return): Likewise.
16691         (reg_encoded_number): Likewise.
16692         (BDESC_VERIFYS): Likewise.
16693         (ix86_init_mpx_builtins): Likewise.
16694         (ix86_init_builtins): Likewise.
16695         (ix86_emit_cmove): Likewise.
16696         (ix86_emit_move_max): Likewise.
16697         (ix86_expand_builtin): Likewise.
16698         (ix86_builtin_mpx_function): Likewise.
16699         (ix86_get_arg_address_for_bt): Likewise.
16700         (ix86_load_bounds): Likewise.
16701         (ix86_store_bounds): Likewise.
16702         (ix86_load_returned_bounds): Likewise.
16703         (ix86_store_returned_bounds): Likewise.
16704         (ix86_class_likely_spilled_p): Likewise.
16705         (ix86_hard_regno_mode_ok): Likewise.
16706         (x86_order_regs_for_local_alloc): Likewise.
16707         (ix86_mitigate_rop): Likewise.
16708         (ix86_bnd_prefixed_insn_p): Likewise.
16709         (ix86_mpx_bound_mode): Likewise.
16710         (ix86_make_bounds_constant): Likewise.
16711         (ix86_initialize_bounds): Likewise.
16712         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16713         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16714         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16715         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16716         (TARGET_CHKP_BOUND_MODE): Likewise.
16717         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16718         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16719         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16720         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16721         * config/i386/i386.h (TARGET_MPX): Likewise.
16722         (TARGET_MPX_P): Likewise.
16723         (VALID_BND_REG_MODE): Likewise.
16724         (FIRST_BND_REG): Likewise.
16725         (LAST_BND_REG): Likewise.
16726         (enum reg_class): Likewise.
16727         (BND_REG_P): Likewise.
16728         (BND_REGNO_P): Likewise.
16729         (BNDmode): Likewise.
16730         (ADJUST_INSN_LENGTH): Likewise.
16731         * config/i386/i386.md: Likewise.
16732         * config/i386/i386.opt: Likewise.
16733         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16734         (defined): Likewise.
16735         (LINK_MPX): Likewise.
16736         (MPX_SPEC): Likewise.
16737         (LIBMPX_SPEC): Likewise.
16738         (LIBMPXWRAPPERS_SPEC): Likewise.
16739         (CHKP_SPEC): Likewise.
16740         * config/i386/predicates.md: Likewise.
16741         * dbxout.c (dbxout_type): Likewise.
16742         * doc/extend.texi: Likewise.
16743         * doc/invoke.texi: Likewise.
16744         * doc/md.texi: Likewise.
16745         * doc/tm.texi: Likewise.
16746         * doc/tm.texi.in: Likewise.
16747         * dwarf2out.c (is_base_type): Likewise.
16748         (gen_formal_types_die): Likewise.
16749         (gen_subprogram_die): Likewise.
16750         (gen_type_die_with_usage): Likewise.
16751         (gen_decl_die): Likewise.
16752         (dwarf2out_late_global_decl): Likewise.
16753         * expr.c (expand_assignment): Likewise.
16754         (emit_storent_insn): Likewise.
16755         (store_expr_with_bounds): Likewise.
16756         (store_expr): Likewise.
16757         (expand_expr_real_1): Likewise.
16758         * expr.h (store_expr_with_bounds): Likewise.
16759         * function.c (use_register_for_decl): Likewise.
16760         (struct bounds_parm_data): Likewise.
16761         (assign_parms_augmented_arg_list): Likewise.
16762         (assign_parm_find_entry_rtl): Likewise.
16763         (assign_parm_is_stack_parm): Likewise.
16764         (assign_parm_load_bounds): Likewise.
16765         (assign_bounds): Likewise.
16766         (assign_parms): Likewise.
16767         (expand_function_start): Likewise.
16768         * gcc.c (CHKP_SPEC): Likewise.
16769         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
16770         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
16771         (wrestrict_dom_walker::check_call): Likewise.
16772         * gimple.c (gimple_build_call_from_tree): Likewise.
16773         * gimple.h (enum gf_mask): Likewise.
16774         (gimple_call_with_bounds_p): Likewise.
16775         (gimple_call_set_with_bounds): Likewise.
16776         * gimplify.c (gimplify_init_constructor): Likewise.
16777         * ipa-cp.c (initialize_node_lattices): Likewise.
16778         (propagate_constants_across_call): Likewise.
16779         (find_more_scalar_values_for_callers_subset): Likewise.
16780         * ipa-hsa.c (process_hsa_functions): Likewise.
16781         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
16782         * ipa-icf.c (sem_function::merge): Likewise.
16783         * ipa-inline.c (early_inliner): Likewise.
16784         * ipa-pure-const.c (warn_function_noreturn): Likewise.
16785         (warn_function_cold): Likewise.
16786         (propagate_pure_const): Likewise.
16787         * ipa-ref.h (enum GTY): Likewise.
16788         * ipa-split.c (find_retbnd): Likewise.
16789         (consider_split): Likewise.
16790         (split_function): Likewise.
16791         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
16792         * ipa.c (walk_polymorphic_call_targets): Likewise.
16793         (symbol_table::remove_unreachable_nodes): Likewise.
16794         (process_references): Likewise.
16795         (cgraph_build_static_cdtor_1): Likewise.
16796         * lto-cgraph.c (lto_output_node): Likewise.
16797         (output_refs): Likewise.
16798         (compute_ltrans_boundary): Likewise.
16799         (input_overwrite_node): Likewise.
16800         (input_node): Likewise.
16801         (input_cgraph_1): Likewise.
16802         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
16803         * passes.c (pass_manager::execute_early_local_passes): Likewise.
16804         (class pass_chkp_instrumentation_passes): Likewise.
16805         (make_pass_chkp_instrumentation_passes): Likewise.
16806         * passes.def: Likewise.
16807         * rtl.h (struct GTY): Likewise.
16808         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
16809         * stor-layout.c (layout_type): Likewise.
16810         * symtab.c: Likewise.
16811         * target.def: Likewise.
16812         * targhooks.c (default_chkp_bound_type): Likewise.
16813         (default_chkp_bound_mode): Likewise.
16814         (default_builtin_chkp_function): Likewise.
16815         (default_chkp_function_value_bounds): Likewise.
16816         (default_chkp_make_bounds_constant): Likewise.
16817         (default_chkp_initialize_bounds): Likewise.
16818         * targhooks.h (default_chkp_bound_type): Likewise.
16819         (default_chkp_bound_mode): Likewise.
16820         (default_builtin_chkp_function): Likewise.
16821         (default_chkp_function_value_bounds): Likewise.
16822         (default_chkp_make_bounds_constant): Likewise.
16823         (default_chkp_initialize_bounds): Likewise.
16824         * toplev.c (compile_file): Likewise.
16825         (process_options): Likewise.
16826         * tree-core.h (DEF_BUILTIN): Likewise.
16827         (DEF_BUILTIN_CHKP): Likewise.
16828         * tree-inline.c (declare_return_variable): Likewise.
16829         (remap_gimple_stmt): Likewise.
16830         (copy_bb): Likewise.
16831         (initialize_inlined_parameters): Likewise.
16832         (expand_call_inline): Likewise.
16833         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
16834         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
16835         (make_pass_ipa_chkp_produce_thunks): Likewise.
16836         (make_pass_chkp): Likewise.
16837         (make_pass_chkp_opt): Likewise.
16838         (make_pass_chkp_instrumentation_passes): Likewise.
16839         * tree-pretty-print.c (dump_generic_node): Likewise.
16840         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
16841         * tree-ssa-dce.c (propagate_necessity): Likewise.
16842         (eliminate_unnecessary_stmts): Likewise.
16843         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
16844         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
16845         * tree-ssa-sccvn.h: Likewise.
16846         * tree-ssa-strlen.c (get_string_length): Likewise.
16847         (valid_builtin_call): Likewise.
16848         (adjust_last_stmt): Likewise.
16849         (handle_builtin_strchr): Likewise.
16850         (handle_builtin_strcpy): Likewise.
16851         (handle_builtin_stxncpy): Likewise.
16852         (handle_builtin_memcpy): Likewise.
16853         (handle_builtin_strcat): Likewise.
16854         (strlen_check_and_optimize_stmt): Likewise.
16855         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
16856         * tree-streamer-in.c: Likewise.
16857         * tree-streamer.c (record_common_node): Likewise.
16858         * tree.c (tree_code_size): Likewise.
16859         (wide_int_to_tree_1): Likewise.
16860         (type_contains_placeholder_1): Likewise.
16861         (build_common_tree_nodes): Likewise.
16862         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
16863         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
16864         (POINTER_BOUNDS_P): Likewise.
16865         (BOUNDED_TYPE_P): Likewise.
16866         (BOUNDED_P): Likewise.
16867         (CALL_WITH_BOUNDS_P): Likewise.
16868         (pointer_bounds_type_node): Likewise.
16869         * value-prof.c (gimple_ic): Likewise.
16870         * var-tracking.c (vt_add_function_parameters): Likewise.
16871         * varasm.c (make_decl_rtl): Likewise.
16872         (assemble_start_function): Likewise.
16873         (output_constant): Likewise.
16874         (maybe_assemble_visibility): Likewise.
16875         * varpool.c (ctor_for_folding): Likewise.
16876         * chkp-builtins.def: Remove.
16877         * ipa-chkp.c: Remove.
16878         * ipa-chkp.h: Remove.
16879         * rtl-chkp.c: Remove.
16880         * rtl-chkp.h: Remove.
16881         * tree-chkp-opt.c: Remove.
16882         * tree-chkp.c: Remove.
16883         * tree-chkp.h: Remove.
16885 2018-06-07  Carl Love  <cel@us.ibm.com>
16887         * config/rs6000/vsx.md (vextract_fp_from_shorth,
16888         vextract_fp_from_shortl): Add BE support.
16890 2018-06-07  Paul Koning  <ni1d@arrl.net>
16892         * compare-elim.c (try_merge_compare): Don't merge compare if
16893         address contains a side effect.
16894         (try_eliminate_compare): Likewise.
16896 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
16898         * config.gcc: Support "tremont".
16899         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
16900         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16901         PROCESSOR_TREMONT.
16902         * config/i386/i386.c (m_TREMONT): Define.
16903         (processor_target_table): Add "tremont".
16904         (PTA_TREMONT): Define.
16905         (ix86_lea_outperforms): Add TARGET_TREMONT.
16906         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
16907         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
16908         and M_INTEL_GOLDMONT_PLUS.
16909         (fold_builtin_cpu): Add "tremont".
16910         (ix86_add_stmt_cost): Add TARGET_TREMONT.
16911         (ix86_option_override_internal): Add "tremont".
16912         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
16913         (processor_type): Add PROCESSOR_TREMONT.
16914         * config/i386/x86-tune.def: Add m_TREMONT.
16915         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
16917 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16919         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
16920         symbol defined for msp430i* devices to be lower case.
16922 2018-06-07  Richard Biener  <rguenther@suse.de>
16924         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
16925         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
16926         Properly wrap signed arithmetic if overflow wraps.
16928 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
16930         PR tree-optimization/69615
16931         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
16932         of a cast from a same precision integral SSA_NAME in a bb dominated
16933         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
16934         cast to utype if rhs2 has already a compatible type.
16936 2018-06-07  Richard Biener  <rguenther@suse.de>
16938         PR tree-optimization/85935
16939         * graphite-scop-detection.c (find_params_in_bb): Analyze
16940         condition operands with respect to the correct loop.  Assert
16941         the analysis doesn't fail.
16943 2018-06-04  Carl Love  <cel@us.ibm.com>
16945         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
16946         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
16947         as it is slightly cheaper.
16948         (first_match_or_eos_index_<mode>):
16949         Calculate index using natural element order.
16950         (first_match_index_<mode>):
16951         Calculate index using natural element order.
16952         (first_match_or_eos_index_<mode>):
16953         Calculate index using natural order.
16954         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
16955         for BE and LE modes.
16956         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
16957         P9V_BUILTIN_VCLZLSBB_V16QI.
16958         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
16959         specific.
16961 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16963         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
16964         indentation and line wrap for many prototypes.  Add missing
16965         @smallexample directives around block of prototypes for vec_xl and
16966         vec_xst.
16968 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
16970         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
16971         track if we pass or return IEEE 128-bit floating point.
16972         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
16973         C++ mangling that is compatible with GCC 8.1.
16974         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
16975         (init_cumulative_args): Note if we pass or return IEEE 128-bit
16976         floating point types.
16977         (rs6000_function_arg_advance_1): Likewise.
16978         (rs6000_mangle_type): Optionally generate mangled names that match
16979         what GCC 8.1 generated for IEEE 128-bit floating point types.
16980         (rs6000_globalize_decl_name): If we have an external function that
16981         passes or returns IEEE 128-bit types, generate a weak reference
16982         from the mangled name used in GCC 8.1 to the current mangled
16983         name.
16984         (rs6000_init_builtins): Make __ibm128 use the long double type if
16985         long double is IBM extended double.  Make __float128 use the long
16986         double type if long double is IEEE 128-bit.
16988         PR target/85657
16989         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
16990         macro for __ibm128 built-in functions.
16991         (PACK_IF): Add __ibm128 pack/unpack functions.
16992         (UNPACK_IF): Likewise.
16993         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
16994         enable long double built-in functions if long double is IEEE
16995         128-bit floating point.
16996         (rs6000_invalid_builtin): Update long double built-in function
16997         error message.
16998         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
16999         functions, adjust the built-in function to use the long double
17000         built-in function if __ibm128 and long double are the same type.
17001         * doc/extend.texi (PowerPC builtins): Update documention for
17002         __builtin_{,un}pack_longdouble.  Add documentation for
17003         __builtin_{,un}pack_ibm128.
17005 2018-06-06  Jim Wilson  <jimw@sifive.com>
17007         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
17008         (struct machine_function): New field interrupt_mode.
17009         (riscv_handle_type_attribute): New function.  Add forward declaration.
17010         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
17011         (riscv_expand_epilogue): Check interrupt_mode field.
17012         (riscv_set_current_function): Check interrupt attribute args and
17013         set interrupt_mode field.
17014         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
17015         (riscv_sret, riscv_uret): New.
17016         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
17017         new arguments to interrupt attribute.
17019 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
17021         PR target/63177
17022         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
17023         Don't handle -mcpu=power8 if -mpower9-vector is also used.
17025 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17027         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
17028         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
17029         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17030         several redundant entries.
17032 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
17034         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
17035         type from "rtx" to "rtx_insn *".
17036         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
17037         for local "call_insn", removing cast.
17038         (ix86_expand_call): Likewise, introducing a "call_insn" local.
17040 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17042         PR tree-optimization/86066
17043         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
17044         for BIT_INSERT_EXPR stores.
17046 2018-06-06  Richard Biener  <rguenther@suse.de>
17048         PR tree-optimization/86062
17049         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17050         component refs ontop
17051         of to be offsetted base.
17053 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17055         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
17056         to be static and remove check on interrupt attribute name.
17058 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17060         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17061         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
17063 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
17065         PR target/79924
17066         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
17067         second argument.
17068         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
17069         Remove second argument, change how error is called.
17070         (aarch64_layout_arg): Remove second argument from
17071         aarch64_err_no_fpadvsimd call.
17072         (aarch64_init_cumulative_args): Ditto.
17073         (aarch64_gimplify_va_arg_expr): Ditto.
17074         * config/aarch64/aarch64.md (mov<mode>): Ditto.
17076 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
17078         * config/i386/i386.md (simple_return_indirect_internal): New expander.
17079         (*simple_return_indirect_internal<mode>): Rename from
17080         simple_return_indirect_internal.  Use W mode iterator.
17081         (rstorssp): New expander.
17082         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
17083         (clrssbsy): New expander.
17084         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
17086 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17088         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
17089         __typeof__.
17090         (cmse_check_pointed_object): Likewise.
17092 2018-06-05  Martin Liska  <mliska@suse.cz>
17094         PR gcov-profile/47618
17095         * doc/invoke.texi: Document how -fprofile-dir format
17096         is extended.
17098 2018-06-05  Richard Biener  <rguenther@suse.de>
17100         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
17101         removal pretend DOM info isn't available so we do not update
17102         it and only remove edges, not dominated blocks.  Actually free
17103         DOM info in case we removed something.  Remove unreachable blocks.
17104         (mfb_keep_latches): Work with either DOM info or marked backedges.
17105         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
17106         first.  Mark backedges if DOM info isn't available.
17107         (Re-)compute DOM info after cleanup_control_flow_pre.
17109 2018-06-05  Richard Biener  <rguenther@suse.de>
17111         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
17112         (locus_discrim_hasher::hash): Adjust.
17113         (locus_discrim_hasher::equal): Likewise.
17114         (next_discriminator_for_locus): Work on line directly.
17115         (same_line_p): Pass in expanded locus1 as well.
17116         (assign_discriminators): Avoid redundant location expansions.
17118 2018-06-05  Richard Biener  <rguenther@suse.de>
17120         PR tree-optimization/86046
17121         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
17122         if required after clearing TREE_ADDRESSABLE.
17124 2018-06-05  Richard Biener  <rguenther@suse.de>
17126         PR tree-optimization/86047
17127         * tree-ssa-loop.c (for_each_index): Glob handling of all
17128         decls and constants and really handle all of them.
17130 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17132         PR target/81497
17133         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
17134         qualifier_void_pointer and qualifier_const_void_pointer.
17135         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
17136         (arm_init_builtins): Handle the above.
17137         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
17138         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
17139         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
17140         void intrinsics.
17142 2018-06-05  Martin Liska  <mliska@suse.cz>
17144         * auto-profile.c (read_autofdo_file): Do not use
17145         gcov_ctr_summary struct.
17146         (afdo_callsite_hot_enough_for_early_inline): Likewise.
17147         * coverage.c (struct counts_entry): Likewise.
17148         (read_counts_file): Read just single summary entry.
17149         (get_coverage_counts): Use gcov_summary struct.
17150         * coverage.h (get_coverage_counts): Likewise.
17151         * gcov-dump.c (dump_working_sets): Likewise.
17152         (tag_summary): Dump just single summary.
17153         * gcov-io.c (gcov_write_summary): Write just histogram
17154         summary.
17155         (gcov_read_summary): Read just single summary.
17156         (compute_working_sets): Use gcov_summary struct.
17157         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
17158         of GCOV_COUNTERS_SUMMABLE.
17159         (GCOV_COUNTERS_SUMMABLE): Remove.
17160         (GCOV_FIRST_VALUE_COUNTER): Replace with
17161         GCOV_COUNTER_V_INTERVAL.
17162         (struct gcov_ctr_summary): Remove.
17163         (struct gcov_summary): Directly use fields of former
17164         gcov_ctr_summary.
17165         (compute_working_sets): Use gcov_summary struct.
17166         * gcov.c (read_count_file): Do not use ctrs fields.
17167         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
17168         struct.
17169         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
17170         struct.
17171         * profile.c: Likewise.
17172         * profile.h: Likewise.
17174 2018-06-05  Martin Liska  <mliska@suse.cz>
17176         PR gcov-profile/84846
17177         * gcov.c (output_lines): Print working directory only
17178         in intermediate format.
17180 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
17182         * config/s390/s390-builtin-types.def: Add void function type.
17183         * config/s390/s390-builtins.def: Use the function type for the
17184         tbeginc builtin.
17186 2018-06-04  Jim Wilson  <jimw@sifive.com>
17188         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
17189         to int.
17190         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
17191         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
17192         handle EH_RETURN_DATA_REGNO registers properly.
17193         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
17194         (riscv_expand_epilogue): Update comment.  Change argument name and
17195         type.  Update code to use new name and type.  Pass new args to
17196         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
17197         EXCEPTION_RETURN.
17198         * config/riscv/riscv.md (NORMAL_RETURN): New.
17199         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
17200         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
17201         (eh_return): Call gen_eh_return_internal and emit barrier.
17202         (eh_return_internal): Call riscv_expand_epilogue.
17204 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
17206         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
17207         bit_insertion field and declare can_be_merged_into method.
17208         (merged_store_group::can_be_merged_into): New method.
17209         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
17210         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
17211         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
17213 2018-06-04  Richard Biener  <rguenther@suse.de>
17215         PR tree-optimization/85955
17216         * builtins.c (fold_builtin_sincos): Convert pointers to
17217         destination to appropriate type before dereferencing.
17219 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
17221         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17223 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
17225         * expr.c (expand_expr_real_1): Force the operand into memory if
17226         its TYPE_MODE is BLKmode and if there is no integer mode for
17227         the number of bits being extracted.
17229 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
17231         PR target/85832
17232         PR target/86036
17233         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17234         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17236 2018-06-04  Richard Biener  <rguenther@suse.de>
17238         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17239         (cleanup_tree_cfg_noloop): ... single caller.  Do
17240         start_recording_case_labels later.
17242 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
17244         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17245         to _IMMINTRIN_H_INCLUDED.
17246         * config/i386/pconfigintrin.h: Ditto.
17247         * config/i386/waitpkgintrin.h: Ditto.
17248         * config/i386/immintrin.h: Add includes for sgxintrin.h,
17249         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17250         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17251         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17252         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17253         waitpkgintrin.h and cldemoteintrin.h.
17255 2018-06-04  Richard Biener  <rguenther@suse.de>
17257         PR tree-optimization/86038
17258         * tracer.c (find_best_successor): Check probability for
17259         being initialized, bail out if not.
17261 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
17263         PR target/86003
17264         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17265         of bits to ignore when comparing architectures.
17267 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
17269         PR tree-optimization/69615
17270         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17271         maximum or minimum of the type, try to merge it also as if
17272         range1 is + [-, x - 1] or + [x + 1, -].
17274         PR c++/86025
17275         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17277 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
17279         PR tree-optimization/86034
17280         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17281         the unsigned bitfield type in a bit insertion sequence if it does not
17282         have a larger precision than the bitfield size.
17283         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17285 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
17287         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17289 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17291         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17292         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17293         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17294         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17296 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17298         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17299         Disable -fdelete-null-pointer-checks for ELF toolchain.
17301 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
17302             Kito Cheng  <kito.cheng@gmail.com>
17304         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17305         (nds32le-*-*, nds32be-*-*): Integrate checking process.
17306         (nds32*-*-*): Add glibc and uclibc conditions.
17307         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17308         (TARGET_EXCEPT_UNWIND_INFO): Define.
17309         * config/nds32/elf.h: New file.
17310         * config/nds32/linux.h: New file.
17311         * config/nds32/nds32-elf.opt: New file.
17312         * config/nds32/nds32-linux.opt: New file.
17313         * config/nds32/nds32-fp-as-gp.c
17314         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17315         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17316         TARGET_LINUX_ABI.
17317         (nds32_asm_file_end): Ditto.
17318         (nds32_print_operand): Ditto.
17319         (nds32_insert_attributes): Ditto.
17320         (nds32_init_libfuncs): New function.
17321         (TARGET_HAVE_TLS): Define.
17322         (TARGET_INIT_LIBFUNCS): Define.
17323         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17324         spec content.
17325         (TARGET_ELF): Apply different mcmodel setting.
17326         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17327         been migrated into elf.h and linux.h files.
17328         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17329         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17330         (mcmodel): The content has been migrated into nds32-elf.opt and
17331         nds32-linux.opt files.
17332         * config/nds32/t-elf: New file.
17333         * config/nds32/t-linux: New file.
17335 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
17336             Shiva Chen  <shiva0217@gmail.com>
17338         * config/nds32/constants.md (unspec_volatile_element): Add
17339         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17340         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17341         optimization.
17342         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17343         (make_pass_nds32_fp_as_gp): Declare.
17344         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17345         optmization pass.
17346         (nds32_asm_function_end_prologue): Remove unused asm output.
17347         (nds32_asm_function_begin_epilogue): Remove unused asm output.
17348         (nds32_asm_file_start): Output necessary fp_as_gp information.
17349         (nds32_option_override): Adjust register usage.
17350         (nds32_expand_prologue): Consider fp_as_gp situation.
17351         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17352         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17353         (epilogue): Ditto.
17354         (return): Ditto.
17355         (simple_return): Ditto.
17356         (omit_fp_begin): Output special directive for fp_as_gp.
17357         (omit_fp_end): Output special directive for fp_as_gp.
17358         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17359         mforbid-fp-as-gp): New options.
17361 2018-06-01  Mark Wielaard  <mark@klomp.org>
17363         * dwarf2out.c (dwarf2out_finish): Remove generation of
17364         DW_AT_loclists_base.
17366 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
17368         * gimple-ssa-store-merging.c: Include gimple-fold.h.
17369         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17370         (struct merged_store_group): Add bit_insertion field.
17371         (dump_char_array): Use standard hexadecimal format.
17372         (merged_store_group::merged_store_group): Set bit_insertion to false.
17373         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
17374         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
17375         also print the mask in the dump file.
17376         (pass_store_merging::gate): Minor tweak.
17377         (imm_store_chain_info::coalesce_immediate): Fix wrong association
17378         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
17379         stores with INTEGER_CST stores.
17380         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17381         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17382         and use it throughout.  Generate bit insertion sequences if need be.
17383         (pass_store_merging::process_store): Remove redundant condition.
17384         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17386 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
17388         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17389         the 128-bit floating point types.  Fix function comment.
17391 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17393         * config/aarch64/aarch64-simd.md
17394         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17395         mnemonics.
17396         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17397         mnemonics.
17399 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
17401         PR tree-optimization/85989
17402         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17403         variable.
17404         (backprop::intersect_uses): Check it when deciding whether this
17405         is a backedge reference.
17406         (backprop::process_block): Add each phi to m_visited_phis
17407         after visiting it, then clear it at the end.
17409 2018-06-01  Richard Biener  <rguenther@suse.de>
17411         * tree-vectorizer.h (vect_dr_stmt): New function.
17412         (vect_get_load_cost): Adjust.
17413         (vect_get_store_cost): Likewise.
17414         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17415         Use vect_dr_stmt instead of DR_SMTT.
17416         (vect_record_base_alignments): Likewise.
17417         (vect_calculate_target_alignment): Likewise.
17418         (vect_compute_data_ref_alignment): Likewise and make static.
17419         (vect_update_misalignment_for_peel): Likewise.
17420         (vect_verify_datarefs_alignment): Likewise.
17421         (vector_alignment_reachable_p): Likewise.
17422         (vect_get_data_access_cost): Likewise.  Pass down
17423         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17424         (vect_get_peeling_costs_all_drs): Likewise.
17425         (vect_peeling_hash_get_lowest_cost): Likewise.
17426         (vect_enhance_data_refs_alignment): Likewise.
17427         (vect_find_same_alignment_drs): Likewise.
17428         (vect_analyze_data_refs_alignment): Likewise.
17429         (vect_analyze_group_access_1): Likewise.
17430         (vect_analyze_group_access): Likewise.
17431         (vect_analyze_data_ref_access): Likewise.
17432         (vect_analyze_data_ref_accesses): Likewise.
17433         (vect_vfa_segment_size): Likewise.
17434         (vect_small_gap_p): Likewise.
17435         (vectorizable_with_step_bound_p): Likewise.
17436         (vect_prune_runtime_alias_test_list): Likewise.
17437         (vect_analyze_data_refs): Likewise.
17438         (vect_supportable_dr_alignment): Likewise.
17439         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17440         (vect_gen_prolog_loop_niters): Likewise.
17441         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17442         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17443         modify DR_STMT.
17444         (vect_recog_mask_conversion_pattern): Likewise.
17445         (vect_try_gather_scatter_pattern): Likewise.
17446         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17447         to vect_get_store_cost.
17448         (vect_get_store_cost): Get stmt_info instead of DR.
17449         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17450         (vect_get_load_cost): Get stmt_info instead of DR.
17452 2018-06-01  Richard Biener  <rguenther@suse.de>
17454         PR middle-end/86017
17455         * gimple-fold.c (var_decl_component_p): Also allow offsetted
17456         vars wrapped in MEM_REFs.
17458 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
17460         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17461         Fix subreg tests so that we only return a choice between
17462         GENERAL_REGS and FP_REGS if the original classes included both.
17464 2018-06-01  Richard Biener  <rguenther@suse.de>
17466         PR ipa/85960
17467         * tree-ssa-structalias.c (get_function_part_constraint):
17468         Handle NULL fi->decl.
17469         (find_func_aliases_for_call): Properly handle indirect
17470         fi from direct call.
17471         (find_func_clobbers): Likewise.
17472         (ipa_pta_execute): Likewise.
17473         (create_variable_info_for): For functions that are ifunc_resolver
17474         resolve to a varinfo that contains the result of the resolver call.
17475         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17476         aliases.
17478 2018-05-31  Michael Collison  <michael.collison@arm.com>
17480         * config/aarch64/aarch64.md:
17481         (*fix_to_zero_extenddfdi2): New pattern.
17482         * gcc.target/aarch64/fix_extend1.c: New testcase.
17484 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
17486         PR middle-end/78809
17487         PR middle-end/83026
17488         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17489         and BUILT_IN_STRNCMP_EQ.
17490         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17491         BUILT_IN_STRNCMP_EQ.
17492         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17493         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17494         (gimple_fold_builtin): Likewise.
17495         * tree-ssa-strlen.c (compute_string_length): New function.
17496         (determine_min_obsize): New function.
17497         (handle_builtin_string_cmp): New function to handle calls to
17498         string compare functions.
17499         (strlen_optimize_stmt): Add handling to builtin string compare
17500         calls.
17501         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17502         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17503         * tree.c (build_common_builtin_nodes): Add new defines of
17504         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17506 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
17508         PR target/85984
17509         * bb-reorder.c (pass_partition_blocks::gate): Return false for
17510         functions with naked attribute.
17512 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
17514         * config/i386/sse.md (avx_vec_concat<mode>):
17515         Substitute concat_tg_mode mode attribute with xtg_mode.
17516         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17517         (concat_tg_mode): Remove mode attribute.
17519 2018-05-31  Martin Sebor  <msebor@redhat.com>
17521         PR c/82063
17522         * calls.c (alloc_max_size): Correct a logic error/typo.
17523         Treat excessive arguments as infinite.  Warn for invalid arguments.
17524         * doc/invoke.texi (-Walloc-size-larger-than): Update.
17526 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
17528         PR target/85829
17529         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17530         and movx for Haswell.
17532 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
17533             Cesar Philippidis  <cesar@codesourcery.com>
17535         PR middle-end/85879
17536         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17537         when emitting error on private/firstprivate reductions.
17538         * omp-low.c (lower_omp_target): Avoid reference-type processing
17539         on pointers for firstprivate clause.
17541 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
17543         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17544         (st1x2): Likewise.
17545         (st1x3): Likewise.
17546         * config/aarch64/aarch64-simd.md
17547         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17548         (aarch64_ld1_x3_<mode>): Likewise
17549         (aarch64_st1x2<VALLDIF:mode>): Likewise
17550         (aarch64_st1_x2_<mode>): Likewise
17551         (aarch64_st1x3<VALLDIF:mode>): Likewise
17552         (aarch64_st1_x3_<mode>): Likewise
17553         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17554         (vld1_s8_x3): Likewise.
17555         (vld1_u16_x3): Likewise.
17556         (vld1_s16_x3): Likewise.
17557         (vld1_u32_x3): Likewise.
17558         (vld1_s32_x3): Likewise.
17559         (vld1_u64_x3): Likewise.
17560         (vld1_s64_x3): Likewise.
17561         (vld1_f16_x3): Likewise.
17562         (vld1_f32_x3): Likewise.
17563         (vld1_f64_x3): Likewise.
17564         (vld1_p8_x3): Likewise.
17565         (vld1_p16_x3): Likewise.
17566         (vld1_p64_x3): Likewise.
17567         (vld1q_u8_x3): Likewise.
17568         (vld1q_s8_x3): Likewise.
17569         (vld1q_u16_x3): Likewise.
17570         (vld1q_s16_x3): Likewise.
17571         (vld1q_u32_x3): Likewise.
17572         (vld1q_s32_x3): Likewise.
17573         (vld1q_u64_x3): Likewise.
17574         (vld1q_s64_x3): Likewise.
17575         (vld1q_f16_x3): Likewise.
17576         (vld1q_f32_x3): Likewise.
17577         (vld1q_f64_x3): Likewise.
17578         (vld1q_p8_x3): Likewise.
17579         (vld1q_p16_x3): Likewise.
17580         (vld1q_p64_x3): Likewise.
17581         (vst1_s64_x2): Likewise.
17582         (vst1_u64_x2): Likewise.
17583         (vst1_f64_x2): Likewise.
17584         (vst1_s8_x2): Likewise.
17585         (vst1_p8_x2): Likewise.
17586         (vst1_s16_x2): Likewise.
17587         (vst1_p16_x2): Likewise.
17588         (vst1_s32_x2): Likewise.
17589         (vst1_u8_x2): Likewise.
17590         (vst1_u16_x2): Likewise.
17591         (vst1_u32_x2): Likewise.
17592         (vst1_f16_x2): Likewise.
17593         (vst1_f32_x2): Likewise.
17594         (vst1_p64_x2): Likewise.
17595         (vst1q_s8_x2): Likewise.
17596         (vst1q_p8_x2): Likewise.
17597         (vst1q_s16_x2): Likewise.
17598         (vst1q_p16_x2): Likewise.
17599         (vst1q_s32_x2): Likewise.
17600         (vst1q_s64_x2): Likewise.
17601         (vst1q_u8_x2): Likewise.
17602         (vst1q_u16_x2): Likewise.
17603         (vst1q_u32_x2): Likewise.
17604         (vst1q_u64_x2): Likewise.
17605         (vst1q_f16_x2): Likewise.
17606         (vst1q_f32_x2): Likewise.
17607         (vst1q_f64_x2): Likewise.
17608         (vst1q_p64_x2): Likewise.
17609         (vst1_s64_x3): Likewise.
17610         (vst1_u64_x3): Likewise.
17611         (vst1_f64_x3): Likewise.
17612         (vst1_s8_x3): Likewise.
17613         (vst1_p8_x3): Likewise.
17614         (vst1_s16_x3): Likewise.
17615         (vst1_p16_x3): Likewise.
17616         (vst1_s32_x3): Likewise.
17617         (vst1_u8_x3): Likewise.
17618         (vst1_u16_x3): Likewise.
17619         (vst1_u32_x3): Likewise.
17620         (vst1_f16_x3): Likewise.
17621         (vst1_f32_x3): Likewise.
17622         (vst1_p64_x3): Likewise.
17623         (vst1q_s8_x3): Likewise.
17624         (vst1q_p8_x3): Likewise.
17625         (vst1q_s16_x3): Likewise.
17626         (vst1q_p16_x3): Likewise.
17627         (vst1q_s32_x3): Likewise.
17628         (vst1q_s64_x3): Likewise.
17629         (vst1q_u8_x3): Likewise.
17630         (vst1q_u16_x3): Likewise.
17631         (vst1q_u32_x3): Likewise.
17632         (vst1q_u64_x3): Likewise.
17633         (vst1q_f16_x3): Likewise.
17634         (vst1q_f32_x3): Likewise.
17635         (vst1q_f64_x3): Likewise.
17636         (vst1q_p64_x3): Likewise.
17638 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17640         * config/msp430/msp430.c (msp430_output_labelref): Prepend
17641         user_label_prefix to name.
17643         * tree-core.h: Update comment about the format of NAME string
17644         passed to handler in attribute_spec.
17646         * config/msp430/msp430.md: Remove erroneous subreg expression from
17647         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17648         zero_extend{q,h}isi2.
17650 2018-05-30  Borislav Petkov  <bp@suse.de>
17652         * doc/extend.texi: Document some architecture specific
17653         constraints and sort entries.
17655 2018-05-30  Martin Sebor  <msebor@redhat.com>
17657         PR middle-end/85369
17658         * builtins.c (expand_builtin_stpcpy_1): New function.
17659         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17660         only if the former succeeds.
17662 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
17664         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17665         in saphira.
17667 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17669         * doc/invoke.texi (-flinker-output): Document
17671 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17673         * passes.c (ipa_write_summaries): Only modify statements if body
17674         is in memory.
17675         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17676         incrementally linking.
17677         (ipa_passes): Likewise.
17678         * lto-cgraph.c (lto_output_node): When incrementally linking do not
17679         pass down resolution info.
17680         * common.opt (flag_incremental_link): Update info.
17681         * gcc.c (plugin specs): Turn flinker-output=* to
17682         -plugin-opt=-linker-output-known
17683         * toplev.c (compile_file): Also cut compilation when doing incremental
17684         link.
17685         * flag-types. (enum lto_partition_model): Add
17686         LTO_LINKER_OUTPUT_NOLTOREL.
17687         (invoke.texi): Add -flinker-output docs.
17688         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17689         link same way as WPA; do not stream in dead initializers.
17691         * dwarf2out.c (dwarf2out_die_ref_for_decl,
17692         darf2out_register_external_decl): Support incremental link.
17694 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17696         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17698 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17700         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17701         it down to simple_object_copy_lto_debug_sections.
17702         (run_gcc): Determine incremental LTO link time and configure
17703         lto1 into non-wpa mode, disable renaming of debug sections.
17705 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17707         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17708         descriptions of various incorrectly documented functions.
17710 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17712         Revert:
17713         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17714         address check not strict.
17716 2018-05-30  Richard Biener  <rguenther@suse.de>
17718         PR tree-optimization/85964
17719         * tracer.c (better_p): Drop initialized count check, we only
17720         call the function with initialized counts now.
17721         (find_best_successor): Do find a best edge if one
17722         has uninitialized count.
17723         (find_best_predecessor): Likewise.  Do BB frequency check only
17724         if count is initialized.
17726 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
17728         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17729         (aarch64_ldrstr_offset_compare): New.
17730         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17731         load/store orderings.
17732         (aarch64_gen_adjusted_ldpstp): Likewise.
17734 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
17736         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17737         Check for subset of GENERAL_REGS and FP_REGS.
17738         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17739         r=w alternative.
17741 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
17743         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17744         and wi::to_poly_offset.  Add the current offset and then check
17745         whether the sum fits, rather than using an unchecked addition of
17746         a checked term.  Check for a shwi rather than a uhwi.
17747         * expr.c (get_bit_range): Use tree_to_poly_uint64.
17748         (store_constructor): Use poly_int_tree_p.
17749         (expand_expr_real_1): Likewise.
17750         * function.c (assign_temp): Likewise.
17751         * fold-const.c (const_binop): Use poly_int_tree_p and
17752         wi::to_poly_offset.
17753         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
17754         division.
17755         * ipa-icf-gimple.c (func_checker::compare_operand): Use
17756         to_poly_offset for MEM offsets.
17757         * ipa-icf.c (sem_variable::equals): Likewise.
17758         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
17759         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
17760         wi::to_poly_offset for BIT_FIELD_REF offsets.
17761         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
17762         wi::to_poly_offset.
17763         * var-tracking.c (emit_note_insn_var_location): Use
17764         tree_to_poly_uint64.
17766 2018-05-29  Jim Wilson  <jimw@sifive.com>
17768         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
17770 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
17772         PR target/85950
17773         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
17774         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
17775         sequence.
17776         (sse4_1_round<mode>2): Use nonimmediate_operand
17777         for operand 1 predicate.
17779 2018-05-29  Martin Sebor  <msebor@redhat.com>
17780             Richard Biener  <rguenther@suse.de>
17782         PR testsuite/85888
17783         * calls.c (get_size_range): Call determine_value_range instead
17784         of get_value_range..
17785         * tree-vrp.h (determine_value_range): Declared new function.
17786         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
17788 2018-05-29  Richard Biener  <rguenther@suse.de>
17790         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
17791         sure to use non-pattern stmts for get_earlier_stmt arguments.
17792         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
17793         called on pattern stmts.
17794         (get_later_stmt): Likewise.
17796 2018-05-29  Martin Liska  <mliska@suse.cz>
17798         PR gcov-profile/85759
17799         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
17800         env variables.
17802 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
17804         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
17805         VEC_UNPACK_*_EXPR.
17806         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
17807         VEC_PACK_*_EXPR.
17809         PR target/85918
17810         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17811         VEC_PACK_FLOAT_EXPR): New tree codes.
17812         * tree-pretty-print.c (op_code_prio): Handle
17813         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17814         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17815         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17816         * tree-inline.c (estimate_operator_cost): Likewise.
17817         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
17818         * fold-const.c (const_binop): Likewise.
17819         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
17820         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17821         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17822         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
17823         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17824         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17825         * expr.c (expand_expr_real_2): Likewise.
17826         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
17827         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
17828         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
17829         optabs.
17830         * optabs.c (expand_widen_pattern_expr): For
17831         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
17832         sign from result type rather than operand's type.
17833         (expand_binop_directly): For vec_packu_float_optab and
17834         vec_packs_float_optab allow result type to be different from operand's
17835         type.
17836         * optabs-tree.c (optab_for_tree_code): Handle
17837         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17838         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
17839         * tree-vect-generic.c (expand_vector_operations_1):  Handle
17840         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17841         VEC_PACK_FLOAT_EXPR.
17842         * tree-vect-stmts.c (supportable_widening_operation): Handle
17843         FIX_TRUNC_EXPR.
17844         (supportable_narrowing_operation): Handle FLOAT_EXPR.
17845         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
17846         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
17847         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
17848         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
17849         mode attributes.
17850         (vec_pack<floatprefix>_float_<mode>): New expander.
17851         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
17852         attributes.
17853         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
17854         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
17855         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
17856         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
17857         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
17858         Document.
17859         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
17860         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
17861         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17862         VEC_PACK_FLOAT_EXPR): Document.
17864 2018-05-29  Richard Biener  <rguenther@suse.de>
17866         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
17867         member.
17868         (stmt_vec_info_vec): Make pointer.
17869         (init_stmt_vec_info_vec): Remove.
17870         (free_stmt_vec_info_vec): Likewise.
17871         (set_stmt_vec_info_vec): New function.
17872         (free_stmt_vec_infos): Likewise.
17873         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
17874         (set_vinfo_for_stmt): Likewise.
17875         (get_earlier_stmt): Likewise.
17876         (get_later_stmt): Likewise.
17877         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
17878         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
17879         (vec_info::~vec_info): Free stmt_vec_infos.
17880         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
17881         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
17882         (pass_slp_vectorize::execute): Likewise.
17883         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
17884         (free_stmt_vec_info_vec): Likewise.
17885         (set_stmt_vec_info_vec): New function.
17886         (free_stmt_vec_infos): Likewise.
17887         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
17888         the global stmt_vec_info_vec.
17889         * tree-parloops.c (gather_scalar_reductions): Use
17890         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
17891         vector.
17893 2018-05-29  Richard Biener  <rguenther@suse.de>
17895         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
17897 2018-05-29  Martin Liska  <mliska@suse.cz>
17898             David Malcolm  <dmalcolm@redhat.com>
17900         * vec.c (test_reverse): New.
17901         (vec_c_tests): Add new test.
17902         * vec.h (vl_ptr>::reverse): New function.
17904 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
17906         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
17908         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
17909         and later.
17911 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17913         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
17915 2018-05-28  Richard Biener  <rguenther@suse.de>
17917         PR tree-optimization/85933
17918         * tree-vect-data-refs.c (vect_record_base_alignments): Only
17919         look at stmts marked as vectorizable.
17921 2018-05-28  Richard Biener  <rguenther@suse.de>
17923         PR tree-optimization/85934
17924         * tree-vect-generic.c (expand_vector_operations_1): Hoist
17925         vector boolean check before scalar optimization.
17927 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
17929         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
17930         for armv5te.
17932 2018-05-28  Mark Wielaard  <mark@klomp.org>
17934         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
17935         if it is an expression containing a minus sign.
17937 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
17939         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
17941 2018-05-27  Paul Koning  <ni1d@arrl.net>
17943         * config/pdp11/pdp11.md (truncsihi2): Remove.
17945 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
17946             Chung-Ju Wu  <jasonwucj@gmail.com>
17948         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
17949         implementation.
17950         (unaligned_store_dw): Ditto.
17951         * config/nds32/nds32-memory-manipulation.c
17952         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
17953         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
17954         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
17955         (emit_setmem_word_loop): Rename to ...
17956         (emit_setmem_doubleword_loop): ... this.
17957         (nds32_gen_dup_4_byte_to_word_value): New function.
17958         (nds32_gen_dup_8_byte_to_double_word_value): New function.
17959         (nds32_expand_setmem_loop): Refine implementation.
17960         (nds32_expand_setmem_loop_v3m): Ditto.
17961         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
17962         pattern.
17964 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17966         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
17968 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17970         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
17971         (nds32_init_machine_status): Initialize machine->attr_naked_p and
17972         machine->attr_no_prologue_p.
17973         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
17974         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
17975         (nds32_expand_epilogue): Consider attr_naked_p.
17976         (nds32_expand_epilogue_v3pop): Likewise.
17977         (nds32_can_use_return_insn): Likewise.
17978         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
17979         attr_no_prologue_p fields.
17980         * config/nds32/nds32.opt (mret-in-naked-func): New option.
17982 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
17984         PR target/85918
17985         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
17986         attributes.
17987         * config/i386/sse.md
17988         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
17989         Rename to ...
17990         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
17991         ... this.
17992         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
17993         Rename to ...
17994         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
17995         ... this.
17996         (*<floatsuffix>floatv2div2sf2): Rename to ...
17997         (*float<floatunssuffix>v2div2sf2): ... this.
17998         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
17999         (float<floatunssuffix>v2div2sf2_mask): ... this.
18000         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
18001         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
18002         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
18003         to ...
18004         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
18005         ... this.
18006         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18007         Rename to ...
18008         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18009         ... this.
18010         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18011         Rename to ...
18012         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18013         ... this.
18014         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
18015         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
18016         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
18017         gen_ufix_truncv8dfv8si2.
18018         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
18019         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
18020         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
18021         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
18022         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
18023         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
18024         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
18025         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
18027 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
18029         PR target/85900
18030         PR target/85345
18031         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
18033 2018-05-25  Jim Wilson  <jimw@sifive.com>
18035         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
18036         * config/riscv/riscv.c (struct machine_function): Add
18037         interrupt_handler_p and attribute_checked_p fields.
18038         (riscv_attribute_table): Add interrupt.
18039         (riscv_interrupt_type_p): New.
18040         (riscv_save_reg_p): Save extra regs for interrupt handler.
18041         (riscv_use_save_libcall): Return false  for interrupt handler.
18042         (riscv_first_stack_step): Add forward declaration.
18043         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
18044         for interrupt handler with large frame.  Use it for saved reg list.
18045         (riscv_expand_prologue): Move flag_stack_usage_info support to
18046         eliminate duplication.
18047         (riscv_expand_epilogue): Generate mret for interrupt handler.
18048         (riscv_epilogue_uses): New.
18049         (riscv_can_use_return_insn): Return false for interrupt handler.
18050         (riscv_function_ok_for_sibcall): Likewise.
18051         (riscv_set_current_function): Add interrupt handler support.
18052         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
18053         * config/riscv/riscv.md (UNSPECV_MRET): New.
18054         (GP_REGNUM): New.
18055         (riscv_frflags, riscv_fsflags): Use tab after opcode.
18056         (riscv_mret): New.
18057         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
18059 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
18061         PR tree-optimization/85712
18062         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
18063         this candidate has already been replaced in-situ by a copy.
18065 2018-05-25  Jason Merrill  <jason@redhat.com>
18067         PR c++/80485 - inline function non-zero address.
18068         * symtab.c (nonzero_address): Check DECL_COMDAT.
18070 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
18072         PR target/83628
18073         * config/alpha/alpha.md (ashlsi3): New insn pattern.
18074         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
18075         extension of SImode operation.  Use const123_operand predicate.
18076         (*saddsi_1): Remove.
18077         (*saddl_se_1): Ditto.
18078         (*ssubsi_1): Ditto.
18079         (*ssubl_se_1): Ditto.
18080         * config/alpha/predicates.md (const123_operand): New predicate.
18081         * config/alpha/constraints.md (P): Use IN_RANGE.
18083 2018-05-25  Richard Biener  <rguenther@suse.de>
18085         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
18086         defaulted to true.
18087         (ref_maybe_used_by_stmt_p): Likewise.
18088         (stmt_may_clobber_ref_p): Likewise.
18089         (stmt_may_clobber_ref_p_1): Likewise.
18090         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
18091         and pass it along.
18092         (ref_maybe_used_by_stmt_p): Likewise.
18093         (stmt_may_clobber_ref_p): Likewise.
18094         (stmt_may_clobber_ref_p_1): Likewise.
18095         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
18096         the alias oracle to disambiguate DRs with stmts DR analysis
18097         couldn't handle.
18098         (vect_analyze_data_refs): Do not give up on not analyzable
18099         DRs for BB vectorization.  Remove code truncating the dataref
18100         vector.
18102 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
18104         PR target/85832
18105         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18106         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
18107         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
18109 2018-05-25  Richard Biener  <rguenther@suse.de>
18111         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
18112         function, combining stmt data ref gathering and fatal analysis
18113         parts.
18114         (vect_analyze_data_refs): Remove now redudnant code and simplify.
18115         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
18116         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
18117         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
18118         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
18120 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
18122         PR tree-optimization/85720
18123         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
18124         SCC if all partitions are builtins.
18125         (version_loop_by_alias_check): New parameter.  Generate cancelable
18126         runtime alias check if all partitions are builtins.
18127         (distribute_loop): Update call to above function.
18129 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
18131         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
18132         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
18133         (parm_default_def_partition_arg): Ditto.
18134         (set_parm_default_def_partition): Ditto.
18135         (get_parm_default_def_partitions): Ditto and make it static.
18136         (get_undefined_value_partitions): Ditto and make it static.
18137         (remove_ssa_form): Refactor call to init_var_map here.
18138         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
18139         computation for loop region.
18140         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
18141         (register_default_def): Delete.
18142         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
18143         (parm_default_def_partition_arg): Ditto.
18144         (set_parm_default_def_partition): Ditto.
18145         (get_parm_default_def_partitions): Ditto and make it static.
18146         (get_undefined_value_partitions): Ditto and make it static.
18147         (coalesce_with_default, coalesce_with_default): Update comment.
18148         (create_coalesce_list_for_region): New func factored out from
18149         create_outofssa_var_map.
18150         (populate_coalesce_list_for_outofssa): New func factored out from
18151         create_outofssa_var_map and coalesce_ssa_name.
18152         (create_outofssa_var_map): Delete.
18153         (coalesce_ssa_name): Refactor to support live range computation.
18154         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
18155         (get_parm_default_def_partitions): Delete.
18156         (get_undefined_value_partitions): Ditto.
18157         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
18158         computation for loop region.
18159         (new_tree_live_info, loe_visit_block): Ditto.
18160         (live_worklist, set_var_live_on_entry): Ditto.
18161         (calculate_live_on_exit, verify_live_on_entry): Ditto.
18162         * tree-ssa-live.h (struct _var_map): New fields.
18163         (init_var_map): Change decl.
18164         (region_contains_p): New.
18166 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
18168         * tree-ssa-live.h (live_merge_and_clear): Delete.
18170 2018-05-25  Richard Biener  <rguenther@suse.de>
18172         PR c++/85912
18173         * tree-dump.c (dequeue_and_dump): Remove access to removed
18174         operand 2 of a SWITCH_EXPR.
18176 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18178         * doc/sourcebuild.texi (vect_double_cond_arith): Include
18179         multiplication and division.
18180         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
18181         (cond_udiv@var{m}, cond_umod@var{m}): Document.
18182         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
18183         (cond_udiv_optab, cond_umod_optab): New optabs.
18184         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
18185         (IFN_COND_RDIV): New internal functions.
18186         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
18187         TRUNC_MOD_EXPR and RDIV_EXPR.
18188         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
18189         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
18190         New unspecs.
18191         (SVE_INT_BINARY): Include mult.
18192         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
18193         (optab, sve_int_op): Handle mult.
18194         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
18195         UNSPEC_COND_DIV.
18196         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
18197         for SVE_INT_BINARY_SD.
18199 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18201         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
18202         (optab, sve_int_op): Handle div and udiv.
18203         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
18204         for SVE_INT_BINARY_SD.
18205         (*<optab><mode>3): New insn for the same.
18207 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18209         * tree-vect-patterns.c: Include predict.h.
18210         (vect_recog_divmod_pattern): Restrict check for division support
18211         to when optimizing for size.
18213 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18215         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18216         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
18217         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
18218         (gimple_match_op::set_op): Likewise.
18219         (gimple_resimplify4): Declare.
18220         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18221         (expr::gen_transform): Likewise.
18222         (decision_tree::gen): Generate a simplification routine for 4 operands.
18223         * gimple-match-head.c (gimple_simplify): Add an overload for
18224         4 operands.  In the top-level function, handle up to 4 call
18225         arguments and call gimple_resimplify4.
18226         (gimple_resimplify4): New function.
18227         (build_call_internal): Pass a fourth operand.
18228         (maybe_push_to_seq): Likewise.
18229         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18230         Fold VEC_COND_EXPRs of an operation and a default value into
18231         an IFN_COND_* function if possible.
18232         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18233         New unspecs.
18234         (SVE_COND_FP_BINARY): Include them.
18235         (optab, sve_fp_op): Handle them.
18236         (SVE_INT_BINARY_REV): New code iterator.
18237         (SVE_COND_FP_BINARY_REV): New int iterator.
18238         (commutative): New int attribute.
18239         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18240         Declare.
18241         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18242         function.
18243         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18244         (*cond_<optab><mode>): New patterns for reversed operands.
18246 2018-05-25  Richard Biener  <rguenther@suse.de>
18248         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18249         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18250         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18251         (STMT_VINFO_GROUPED_ACCESS): Adjust.
18252         * tree-vect-data-refs.c (everywhere): Adjust users.
18253         * tree-vect-loop.c (everywhere): Likewise.
18254         * tree-vect-slp.c (everywhere): Likewise.
18255         * tree-vect-stmts.c (everywhere): Likewise.
18256         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18258 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18260         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18261         Rename to...
18262         (gcc_cv_as_section_exclude): ... this.
18263         Try Solaris as #exclude syntax.
18264         * configure: Regenerate.
18265         * config.in: Regenerate.
18266         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18267         SECTION_EXCLUDE.
18268         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18269         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18271         * varasm.c (default_elf_asm_named_section): Don't check if
18272         HAVE_GAS_SECTION_EXCLUDE is defined.
18274 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18276         * doc/md.texi: Update the documentation of the cond_* optabs
18277         to mention the new final operand.  Fix GET_MODE_NUNITS call.
18278         Describe the scalar case too.
18279         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18280         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18281         instead of 2.
18282         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18283         (get_conditional_internal_fn): Update comment.
18284         * tree-vect-loop.c (vectorizable_reduction): Pass the original
18285         accumulator value as a final argument to conditional functions.
18286         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18287         a define_expand and add an "else" operand.  Assert for now that
18288         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
18289         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18290         (*cond_<optab><mode>): New patterns.
18291         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18292         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18293         (UNSPEC_COND_EOR): Delete.
18294         (optab): Remove associated mappings.
18295         (SVE_INT_BINARY): New code iterator.
18296         (sve_int_op): Remove int attribute and add "minus" to the code
18297         attribute.
18298         (SVE_COND_INT_OP): Delete.
18299         (SVE_COND_FP_OP): Rename to...
18300         (SVE_COND_FP_BINARY): ...this.
18302 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18304         * optabs.c (can_reuse_operands_p): New function.
18305         (maybe_legitimize_operands): Try to reuse the results for
18306         earlier operands.
18308 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
18310         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18311         Add {q} suffix to insn mnemonic.
18313 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18315         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18316         (msp430_warn_func_return): New.
18318 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
18320         * fold-const.c (tree_nonzero_bits): New function.
18321         * fold-const.h (tree_nonzero_bits): Likewise.
18322         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18323         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18325 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
18327         PR target/85900
18328         PR target/85345
18329         * varasm.c (assemble_alias): Check ifunc_resolver only on
18330         FUNCTION_DECL.
18332 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
18334         PR target/85903
18335         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18336         when memory input operand is handled.
18338 2018-05-24  Luis Machado  <luis.machado@linaro.org>
18340         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18341         global.
18342         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18344 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
18346         * match.pd: Delay FMA folds until after vectorization.
18348 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18350         PR target/83009
18351         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18352         address check not strict.
18354 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
18356         * gimple-match.h (gimple_match_op): New class.
18357         (mprts_hook): Replace parameters with a gimple_match_op *.
18358         (maybe_build_generic_op): Likewise.
18359         (gimple_simplified_result_is_gimple_val): Replace parameters with
18360         a const gimple_match_op *.
18361         (gimple_simplify): Replace code_helper * and tree * parameters with
18362         a gimple_match_op * parameter.
18363         (gimple_resimplify1): Replace code_helper *, tree and tree *
18364         parameters with a gimple_match_op * parameter.
18365         (gimple_resimplify2): Likewise.
18366         (gimple_resimplify3): Likewise.
18367         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18368         parameters with a gimple_match_op * parameter.
18369         * gimple-match-head.c (gimple_simplify): Change prototypes of
18370         auto-generated functions to take a gimple_match_op * instead of
18371         separate code_helper * and tree * parameters.  Make the same
18372         change in the top-level overload and update calls to the
18373         gimple_resimplify routines.  Update calls to the auto-generated
18374         functions and to maybe_push_res_to_seq in the publicly-facing
18375         operation-specific gimple_simplify overloads.
18376         (gimple_match_op::MAX_NUM_OPS): Define.
18377         (gimple_resimplify1): Replace rcode and ops with a single res_op
18378         parameter.  Update call to gimple_simplify.
18379         (gimple_resimplify2): Likewise.
18380         (gimple_resimplify3): Likewise.
18381         (mprts_hook): Replace parameters with a gimple_match_op *.
18382         (maybe_build_generic_op): Likewise.
18383         (build_call_internal): Replace type, nargs and ops with
18384         a gimple_match_op *.
18385         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18386         with a single gimple_match_op *.  Update calls to mprts_hook,
18387         build_call_internal and gimple_simplified_result_is_gimple_val.
18388         Factor out code that is common to the tree_code and combined_fn cases.
18389         * genmatch.c (expr::gen_transform): Replace tem_code and
18390         tem_ops with a gimple_match_op called tem_op.  Update calls
18391         to the gimple_resimplify functions and maybe_push_res_to_seq.
18392         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18393         res_ops.  Update call to the gimple_resimplify functions.
18394         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18395         (decision_tree::gen): Make the functions take a gimple_match_op *
18396         called res_op instead of separate res_code and res_ops parameters.
18397         Update call accordingly.
18398         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18399         and ops with a single res_op parameter.  Update calls to
18400         maybe_build_generic_op and maybe_push_res_to_seq.
18401         (fold_stmt_1): Update calls to gimple_simplify and
18402         replace_stmt_with_simplification.
18403         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18404         and gimple_simplified_result_is_gimple_val.
18405         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18406         gimple_simplify.
18407         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18408         with a gimple_match_op *.
18409         (vn_nary_build_or_lookup): Likewise.  Update call to
18410         vn_nary_build_or_lookup_1.
18411         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18412         gimple_match_op *.  Update calls to the gimple_resimplify routines
18413         and to gimple_simplified_result_is_gimple_val.
18414         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18415         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18416         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18417         (visit_nary_op): Likewise.
18418         (visit_reference_op_load): Likewise.
18420 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18422         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18423         modifier for printing the step amount.
18425 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
18427         PR target/78849
18428         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18429         types.
18431 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
18433         * doc/sourcebuild.texi (Endianness): New subsubsection.
18435 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18437         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18438         <prefetch_dynamic_strides>: New const bool field.
18439         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18440         prefetch_dynamic_strides.
18441         (exynosm1_prefetch_tune): Likewise.
18442         (thunderxt88_prefetch_tune): Likewise.
18443         (thunderx_prefetch_tune): Likewise.
18444         (thunderx2t99_prefetch_tune): Likewise.
18445         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18446         false.
18447         (aarch64_override_options_internal): Update to set
18448         PARAM_PREFETCH_DYNAMIC_STRIDES.
18449         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18450         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18451         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18452         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18453         prefetch-dynamic-strides setting.
18455 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18457         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18458         <minimum_stride>: New const int field.
18459         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18460         minimum_stride field defaulting to -1.
18461         (exynosm1_prefetch_tune): Likewise.
18462         (thunderxt88_prefetch_tune): Likewise.
18463         (thunderx_prefetch_tune): Likewise.
18464         (thunderx2t99_prefetch_tune): Likewise.
18465         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18466         <default_opt_level>: Set to 3.
18467         (aarch64_override_options_internal): Update to set
18468         PARAM_PREFETCH_MINIMUM_STRIDE.
18469         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18470         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18471         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18472         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18473         stride is constant and is below the minimum stride threshold.
18475 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18477         * config/arm/arm-cpus.in (mode26): Delete.
18478         (armv4): Delete mode26 reference.
18479         * config/arm/arm.c (arm_configure_build_target): Delete use of
18480         isa_bit_mode26.
18482 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
18484         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18485         New insn pattern.
18486         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18487         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
18488         for non-SSE modes.
18489         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
18490         (floatunsdidf2): Ditto.
18492 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
18494         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18495         (fixuns_trunc<mode>si2_avx512f): Ditto.
18496         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18497         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18498         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18500 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
18502         PR rtl-optimization/79985
18503         * df-scan.c (df_insn_refs_collect): Remove special case for
18504         global registers and asm statements.
18506 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
18508         * extend.texi (Global Register Variables): Rewrite the bullet list.
18509         Note that the register is available for allocation. Note that access
18510         via inline asm must use constraints. Add note about async-signal
18511         handlers. Remove paragraph about automagic register selection.
18513 2018-05-23  Richard Biener  <rguenther@suse.de>
18515         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18516         of fixed offset from memset VN.
18518 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
18520         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18521         first_interp field.
18522         (alloc_cand_and_find_basis): Initialize first_interp field.
18523         (slsr_process_mul): Modify first_interp field.
18524         (slsr_process_add): Likewise.
18525         (slsr_process_cast): Modify first_interp field for each new
18526         interpretation.
18527         (slsr_process_copy): Likewise.
18528         (dump_candidate): Dump first_interp field.
18529         (replace_mult_candidate): Process all interpretations, not just
18530         subsequent ones.
18531         (replace_rhs_if_not_dup): Likewise.
18532         (replace_one_candidate): Likewise.
18534 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
18536         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18537         Add new boolean.
18538         (aarch64_needs_frame_chain): New function.
18539         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18541 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
18543         PR target/84882
18544         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18545         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18546         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18547         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18548         as true for strict-align.
18549         (aarch64_can_inline_p): Perform checks even when callee has no
18550         attributes to check for strict alignment.
18551         * doc/extend.texi (AArch64 Function Attributes): Document
18552         no-strict-align.
18553         * doc/invoke.texi: (AArch64 Options): Likewise.
18555 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
18557         PR tree-optimization/85853
18558         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18559         the handling of the root of the node to...
18560         (vect_slp_analyze_node_operations_1): ...this new function,
18561         and run the whole thing with the child nodes' def types
18562         set according to their SLP node's def type.
18564 2018-05-23  Richard Biener  <rguenther@suse.de>
18566         PR middle-end/85874
18567         * tree-data-ref.c (create_runtime_alias_checks): Defer
18568         and ignore overflow warnings.
18570 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
18572         PR tree-optimization/85822
18573         * tree-vrp.c (is_masked_range_test): Fix handling of negative
18574         constants.
18576 2018-05-23  Richard Biener  <rguenther@suse.de>
18578         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18579         memset constants via native_interpret_expr.
18581 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
18583         PR target/85345
18584         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18585         attribute.
18586         (cgraph_node::create_alias): Likewise.
18587         (cgraph_node::get_availability): Check ifunc_resolver instead
18588         of looking up ifunc attribute.
18589         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18590         * varasm.c (do_assemble_alias): Likewise.
18591         (assemble_alias): Likewise.
18592         (default_binds_local_p_3): Likewise.
18593         * cgraph.h (cgraph_node): Add ifunc_resolver.
18594         (cgraph_node::only_called_directly_or_aliased_p): Return false
18595         for IFUNC resolver.
18596         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18597         attribute.
18598         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18599         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18600         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18601         instead of looking up ifunc attribute.
18603 2018-05-22  Luis Machado  <luis.machado@linaro.org>
18605         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18607 2018-05-22  Martin Sebor  <msebor@redhat.com>
18609         PR middle-end/85359
18610         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18611         only when expasion succeeds.
18612         (expand_builtin_strcmp): Same.
18613         (expand_builtin_strncmp): Same.
18615 2018-05-22  Martin Sebor  <msebor@redhat.com>
18617         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18619 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
18620             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18622         * config/aarch64/aarch64-ldpstp.md: Replace uses of
18623         aarch64_mem_pair_operand with memory_operand and delete operand swapping
18624         code.
18625         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18626         Add check for legitimate_address.
18627         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18628         (aarch64_swap_ldrstr_operands): New.
18629         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18630         Define prototype.
18632 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
18633             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18635         * config/aarch64/aarch64.md: New patterns to generate stp
18636         and ldp.
18637         (store_pair_sw, store_pair_dw): New patterns to generate stp for
18638         single words and double words.
18639         (load_pair_sw, load_pair_dw): Likewise.
18640         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18641         Delete.
18642         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18643         Delete.
18644         * config/aarch64/aarch64-ldpstp.md: Modify peephole
18645         for different mode ldpstp and add peephole for merged zero stores.
18646         Likewise for loads.
18647         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18648         Add size check.
18649         (aarch64_gen_store_pair): Rename calls to match new patterns.
18650         (aarch64_gen_load_pair): Rename calls to match new patterns.
18651         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18652         (load_pair<DREG:mode><DREG2:mode>): ... This.
18653         (store_pair<mode>): Rename to...
18654         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18655         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18656         New mode iterators.
18657         (V_INT_EQUIV): Handle SImode.
18658         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18659         New predicate.
18661 2018-05-22  Martin Sebor  <msebor@redhat.com>
18663         PR c/85623
18664         * calls.c (maybe_warn_nonstring_arg): Use string length to set
18665         or ajust the presumed bound on an operation to avoid unnecessary
18666         warnings.
18668 2018-05-22  Martin Sebor  <msebor@redhat.com>
18670         PR tree-optimization/85826
18671         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18672         assuming that a DECL necesarily has a constant size.
18674 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
18676         PR middle-end/85862
18677         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18679 2018-05-22  Richard Biener  <rguenther@suse.de>
18681         PR tree-optimization/85834
18682         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18683         non-constant and non-zero memset arguments.
18685 2018-05-22  Martin Liska  <mliska@suse.cz>
18687         PR ipa/85607
18688         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18690 2018-05-22  Richard Biener  <rguenther@suse.de>
18692         PR tree-optimization/85863
18693         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18694         comparisons when vectype is specified.
18695         (vectorizable_condition): Do not specify vectype for
18696         vect_is_simple_cond when SLP vectorizing.
18698 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
18700         PR target/85657
18701         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18702         define __ibm128 as long double.
18703         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18704         as a distinct type when IEEE 128-bit support is enabled.
18705         (init_float128_ieee): Fix up conversions between IFmode and IEEE
18706         128-bit types to use the correct functions.
18707         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18708         convert between 128-bit floating point types that have different
18709         modes but the same representation, instead of using gen_lowpart to
18710         makean alias.
18711         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18712         KFmode.
18713         (IFKF_reg): New attributes to give the register constraints for
18714         IFmode and KFmode.
18715         (extend<mode>tf2_internal): New insns to mark an explicit
18716         conversion between 128-bit floating point types that have a
18717         different mode but share the same representation.
18719 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
18721         PR tree-optimization/85814
18722         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18723         a null return from get_strinfo when unsharing the next
18724         strinfo in the chain.
18726 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
18728         PR gcc/84923
18729         * varasm.c (weak_finish): Clean up weak_decls.
18731 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18733         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18734         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18735         UNSPEC_UADALP values.
18736         * config/aarch64/iterators.md (ABAL): New int iterator.
18737         (ABDL2): Likewise.
18738         (ADALP): Likewise.
18739         (sur): Add mappings for the above.
18740         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18741         New define_insn.
18742         (aarch64_<sur>abal<mode>_4): Likewise.
18743         (aarch64_<sur>adalp<mode>_3): Likewise.
18744         (<sur>sadv16qi): New define_expand.
18746 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
18748         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18749         (*movdf_internal): Ditto.
18750         (*rcpsf2_sse): Ditto.
18751         (*rsqrtsf2_sse): Ditto.
18752         (*sqrt<mode>2_sse): Ditto.
18754 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
18756         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
18757         eor3q<mode>4.
18758         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
18759         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
18760         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
18761         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
18762         vbcaxq_s64): New.
18763         * config/aarch64/arm_neon.h: Likewise.
18764         * config/aarch64/iterators.md (VQ_I): New.
18766 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
18768         * config.gcc: Add arc/t-multilib-linux to tmake_file for
18769         arc*-*-linux*.
18770         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
18771         MULTILIB_DIRNAMES
18773 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
18775         * config/nds32/constraints.md (S): New constraint.
18776         * config/nds32/nds32.md (call_internal): Use constraint S.
18777         (call_value_internal): Likewise.
18778         (sibcall_internal): Likewise.
18779         (sibcall_value_internal): Likewise.
18781 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
18782             Chung-Ju Wu  <jasonwucj@gmail.com>
18784         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
18785         into consideration.
18787 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
18788             Chung-Ju Wu  <jasonwucj@gmail.com>
18790         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
18791         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
18792         (nds32_rtx_costs_impl): Simplify.
18793         (nds32_address_cost_impl): Simplify.
18794         (nds32_init_rtx_costs): New function.
18795         (nds32_rtx_costs_speed_prefer): Likewise.
18796         (nds32_rtx_costs_size_prefer): Likewise.
18797         (nds32_address_cost_speed_prefer): Likewise.
18798         (nds32_address_cost_speed_fwprop): Likewise.
18799         (nds32_address_cost_size_prefer): Likewise.
18800         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
18801         * config/nds32/nds32.c (nds32_option_override): Use
18802         nds32_init_rtx_costs function.
18804 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
18806         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
18807         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
18808         (TARGET_PIPELINE_N8): Likewise.
18809         (TARGET_PIPELINE_N10): Likewise.
18810         (TARGET_PIPELINE_N13): Likewise.
18811         (TARGET_PIPELINE_GRAYWOLF): Likewise.
18813 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
18815         * config/nds32/nds32-fpu.md: Update copyright year.
18817 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18819         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
18821 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18823         * config/nds32/nds32.c
18824         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
18825         * config/nds32/nds32.opt (minline-asm-r15): New option.
18827 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18829         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
18830         MASK_HW_ABS.
18831         * config/nds32/nds32.md (abssi2): New pattern.
18833 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
18835         * config/i386/i386.md (rex64namesuffix): New mode attribute.
18836         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
18837         Merge insn pattern from sse_cvtsi2ss<round_name> and
18838         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
18839         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
18840         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
18841         using SWI48 mode iterator.
18842         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
18843         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
18844         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
18845         pattern from sse_cvttss2si<round_saeonly_name>
18846         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
18847         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
18848         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
18849         using SWI48 mode iterator.
18850         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
18851         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
18852         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
18853         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
18854         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
18855         using SWI48 mode iterator.
18856         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
18857         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
18858         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
18859         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
18860         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
18861         SWI48 mode iterator.
18862         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
18863         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
18864         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
18865         pattern from sse_cvttsd2si<round_saeonly_name>
18866         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
18868 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18870         * config/nds32/nds32-md-auxiliary.c
18871         (nds32_valid_smw_lwm_base_p): Refine.
18872         (nds32_output_smw_single_word): Refine.
18873         (nds32_output_smw_double_word): New.
18874         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
18876 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18878         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
18879         (nds32_output_stack_pop): Refine.
18880         (nds32_expand_unaligned_load): Refine.
18881         (nds32_expand_unaligned_store): Refine.
18883 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
18884             Chung-Ju Wu  <jasonwucj@gmail.com>
18886         * config/nds32/constants.md: Add TP_REGNUM constant.
18887         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
18888         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
18889         UNSPEC_ADD32.
18890         * config/nds32/nds32-doubleword.md: Consider flag_pic.
18891         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
18892         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
18893         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
18894         and PIC code generation.
18895         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
18896         code generation.
18897         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
18898         optimization.
18899         * config/nds32/nds32.md: Support TLS and PIC.
18900         * config/nds32/nds32.c: Support TLS and PIC.
18901         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
18902         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
18903         predicate.
18905 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18907         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
18908         mode with E_ prefix.
18910 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
18911             Chung-Ju Wu  <jasonwucj@gmail.com>
18913         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
18914         * config/nds32/nds32-md-auxiliary.c
18915         (symbolic_reference_mentioned_p): New.
18916         (nds32_legitimize_ict_address): New.
18917         (nds32_expand_ict_move): New.
18918         (nds32_indirect_call_referenced_p): New.
18919         (nds32_symbol_binds_local_p): Delete.
18920         (nds32_long_call_p): Modify.
18921         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
18922         * config/nds32/nds32-protos.h
18923         (symbolic_reference_mentioned_p): Declare.
18924         (nds32_legitimize_ict_address): Declare.
18925         (nds32_expand_ict_move): Declare.
18926         (nds32_indirect_call_referenced_p): Declare.
18927         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
18928         (nds32_relax_group): Use nds32_ict_const_p as condition.
18929         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
18930         (nds32_asm_file_start): Output ict_model directive in asm code.
18931         (nds32_legitimate_address_p): Consider indirect call.
18932         (nds32_print_operand): Consider indirect call.
18933         (nds32_print_operand_address): Consider indirect call.
18934         (nds32_insert_attributes): Handle "indirect_call" attribute.
18935         (TARGET_LEGITIMATE_ADDRESS_P): Define.
18936         (TARGET_LEGITIMATE_CONSTANT_P): Define.
18937         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
18938         (TARGET_DELEGITIMIZE_ADDRESS): Define.
18939         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
18940         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
18941         (TARGET_ICT_MODEL_SMALL): Define.
18942         (TARGET_ICT_MODEL_LARGE): Define.
18943         * config/nds32/nds32.md (movsi): Consider ict model.
18944         (call, call_value): Consider ict model.
18945         (sibcall, sibcall_value): Consider ict model.
18946         * config/nds32/nds32.opt (mict-model): New option.
18947         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
18948         model.
18950 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
18951             Monk Chiang  <sh.chiang04@gmail.com>
18952             Jim Wilson <jimw@sifive.com>
18954         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
18955         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
18956         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
18957         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
18958         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
18959         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
18960         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
18961         compute save_libcall_adjustment properly.
18962         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
18963         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
18964         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
18965         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
18966         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
18967         (ABI_SPEC): Handle mabi=ilp32e.
18968         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
18969         (RVE): Add RVE mask.
18970         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
18971         <-march>: Add rv32e as an example.
18973 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
18975         PR c++/82899
18976         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
18977         (intra_create_variable_infos): Handle C++ constructors.
18979 2018-05-18  Martin Liska  <mliska@suse.cz>
18981         * passes.def: Remove a redundant pass.
18983 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
18985         PR bootstrap/85838
18986         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
18988 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18990         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
18991         (ARMv4): Update.
18992         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
18993         (ARMv6m): Update.
18994         (armv2, armv2a, armv3, armv3m): Delete architectures.
18995         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
18996         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
18997         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
18998         Delete cpus.
18999         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
19000         (*mulsidi3adddi): Likewise.
19001         (mulsidi3): Likewise.
19002         (*mulsidi3_nov6): Likewise.
19003         (umulsidi3): Likewise.
19004         (umulsidi3_nov6): Likewise.
19005         (umaddsidi4): Likewise.
19006         (*umulsidi3adddi): Likewise.
19007         (smulsi3_highpart): Likewise.
19008         (*smulsi3_highpart_nov6): Likewise.
19009         (umulsi3_highpart): Likewise.
19010         (*umulsi3_highpart_nov6): Likewise.
19011         * config/arm/arm.h (arm_arch3m): Delete.
19012         * config/arm/arm.c (arm_arch3m): Delete.
19013         (arm_option_override_internal): Update armv3-related comment.
19014         (arm_configure_build_target): Delete use of isa_bit_mode32.
19015         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
19016         (arm_rtx_costs_internal): Delete check of arm_arch3m.
19017         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
19018         (mulsa3): Likewise.
19019         (mulusa3): Likewise.
19020         * config/arm/arm-protos.h (arm_arch3m): Delete.
19021         * config/arm/arm-tables.opt: Regenerate.
19022         * config/arm/arm-tune.md: Likewise.
19023         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
19024         deleted architectures.
19026 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19028         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
19029         (armv5t, armv5te): New features.
19030         (ARMv5, ARMv5e): Delete fgroups.
19031         (ARMv5t, ARMv5te): Adjust for above changes.
19032         (ARMv6m): Likewise.
19033         (armv5, armv5e): Delete arches.
19034         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
19035         arm_arch5.
19036         (*call_reg_arm): Likewise.
19037         (*call_value_reg_armv5): Likewise.
19038         (*call_value_reg_arm): Likewise.
19039         (*call_symbol): Likewise.
19040         (*call_value_symbol): Likewise.
19041         (*sibcall_insn): Likewise.
19042         (*sibcall_value_insn): Likewise.
19043         (clzsi2): Likewise.
19044         (prefetch): Likewise.
19045         (define_split and define_peephole2 dependent on arm_arch5):
19046         Likewise.
19047         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
19048         arm_arch5e.
19049         (TARGET_ARM_QBIT): Likewise.
19050         (TARGET_DSP_MULTIPLY): Likewise.
19051         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
19052         (arm_arch5, arm_arch5e): Delete.
19053         (arm_arch5t, arm_arch5te): Declare.
19054         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
19055         (arm_arch5t): Declare.
19056         (arm_option_reconfigure_globals): Update for the above.
19057         (arm_options_perform_arch_sanity_checks): Update comment, replace
19058         use of arm_arch5 with arm_arch5t.
19059         (use_return_insn): Likewise.
19060         (arm_emit_call_insn): Likewise.
19061         (output_return_instruction): Likewise.
19062         (arm_final_prescan_insn): Likewise.
19063         (arm_coproc_builtin_available): Likewise.
19064         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
19065         arm_arch5e with arm_arch5t and arm_arch5te.
19066         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
19067         (arm_arch5t, arm_arch5te): Declare.
19068         * config/arm/arm-tables.opt: Regenerate.
19069         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
19070         * config/arm/t-multilib: Likewise.
19071         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
19072         instead of arm_arch5.
19073         (*call_reg_thumb1): Likewise.
19074         (*call_value_reg_thumb1_v5): Likewise.
19075         (*call_value_reg_thumb1): Likewise.
19076         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
19077         unreachable path.
19078         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
19080 2018-05-18  Martin Liska  <mliska@suse.cz>
19082         PR gcov-profile/84846
19083         * doc/gcov.texi: Document -t option of gcov tool.
19085 2018-05-18  Martin Liska  <mliska@suse.cz>
19087         PR gcov-profile/84846
19088         * gcov.c (print_usage): Add new -t option.
19089         (process_args): Handle the option.
19090         (generate_results): Use stdout as output when requested by
19091         the option.
19093 2018-05-18  Martin Liska  <mliska@suse.cz>
19095         PR gcov-profile/84846
19096         * coverage.c (coverage_init): Write PWD to .gcno file.
19097         * doc/gcov.texi: Document how working directory is printed.
19098         * gcov-dump.c (dump_gcov_file): Print PWD.
19099         * gcov.c (output_intermediate_file): Likewise.
19100         (read_graph_file): Read PWD string.
19101         (output_lines): Print PWD.
19103 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19105         PR middle-end/85817
19106         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
19107         for retval and return false if all args to phi are zero.
19109 2018-05-18  Richard Biener  <rguenther@suse.de>
19111         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
19112         method.
19113         (evrp_dom_walker::before_dom_children): Call it.
19115 2018-05-18  Richard Biener  <rguenther@suse.de>
19117         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
19118         results when processing array refs with variable index.
19120 2018-05-18  Toon Moene  <toon@moene.org>
19122         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
19123         directly after that of -floop-interchange. Indicate that both
19124         options are enabled by default when specifying -O3.
19126 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19128         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
19129         iterator.  Delete separate integer-mode vec_set<mode> expander.
19130         (aarch64_simd_vec_setv2di): Delete.
19131         (vec_setv2di): Delete.
19132         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
19133         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
19134         the "w, r" alternative.
19136 2018-05-18  Martin Liska  <mliska@suse.cz>
19138         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
19139         * tree-pass.h (make_pass_lower_switch_O0): New function.
19140         * tree-switch-conversion.c (node_has_low_bound): Remove.
19141         (node_has_high_bound): Likewise.
19142         (node_is_bounded): Likewise.
19143         (class pass_lower_switch): Make it a template type and create
19144         two instances.
19145         (pass_lower_switch::execute): Add template argument.
19146         (make_pass_lower_switch): New function.
19147         (make_pass_lower_switch_O0): New function.
19148         (do_jump_if_equal): Remove.
19149         (emit_case_nodes): Simplify to just handle all 3 cases and leave
19150         all the hard work to tree optimization passes.
19152 2018-05-18  Martin Liska  <mliska@suse.cz>
19154         * dbgcnt.c (limit_low): Renamed from limit.
19155         (limit_high): New variable.
19156         (dbg_cnt_is_enabled): Check for upper limit.
19157         (dbg_cnt): Adjust dumping.
19158         (dbg_cnt_set_limit_by_index): Add new argument for high
19159         value.
19160         (dbg_cnt_set_limit_by_name): Likewise.
19161         (dbg_cnt_process_single_pair): Parse new format.
19162         (dbg_cnt_process_opt): Use strtok.
19163         (dbg_cnt_list_all_counters): Remove 'value' and add
19164         'limit_high'.
19165         * doc/invoke.texi: Document changes.
19167 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
19169         * doc/sourcebuild.texi (scalar_all_fma): Document.
19170         * tree.def (FMA_EXPR): Delete.
19171         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
19172         * internal-fn.c (ternary_direct): New macro.
19173         (expand_ternary_optab_fn): Likewise.
19174         (direct_ternary_optab_supported_p): Likewise.
19175         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
19176         * builtins.c (fold_builtin_fma): Delete.
19177         (fold_builtin_3): Don't call it.
19178         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
19179         * expr.c (expand_expr_real_2): Likewise.
19180         * fold-const.c (operand_equal_p): Likewise.
19181         (fold_ternary_loc): Likewise.
19182         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
19183         * gimple.c (DEFTREECODE): Likewise.
19184         * gimplify.c (gimplify_expr): Likewise.
19185         * optabs-tree.c (optab_for_tree_code): Likewise.
19186         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
19187         * tree-eh.c (operation_could_trap_p): Likewise.
19188         (stmt_could_throw_1_p): Likewise.
19189         * tree-inline.c (estimate_operator_cost): Likewise.
19190         * tree-pretty-print.c (dump_generic_node): Likewise.
19191         (op_code_prio): Likewise.
19192         * tree-ssa-loop-im.c (stmt_cost): Likewise.
19193         * tree-ssa-operands.c (get_expr_operands): Likewise.
19194         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
19195         * fold-const-call.h (fold_fma): Delete.
19196         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
19197         CFN_FNMA and CFN_FNMS.
19198         (fold_fma): Delete.
19199         * genmatch.c (combined_fn): New enum.
19200         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
19201         (commutative_op): New function.
19202         (commutate): Use it.  Handle more than 2 operands.
19203         (dt_operand::gen_gimple_expr): Use commutative_op.
19204         (parser::parse_expr): Allow :c to be used with non-binary
19205         operators if the commutative operand is known.
19206         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
19207         CFN_FMS, CFN_FNMA and CFN_FNMS.
19208         (backprop::process_assign_use): Remove FMA_EXPR handling.
19209         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
19210         (gen_hsa_fma): New function.
19211         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
19212         IFN_FNMA and IFN_FNMS.
19213         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
19214         * gimple-fold.h (follow_all_ssa_edges): Declare.
19215         * gimple-fold.c (follow_all_ssa_edges): New function.
19216         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
19217         gimple_build interface and use follow_all_ssa_edges to fold the result.
19218         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
19219         instead of checking for optabs directly.
19220         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19221         rather than FMA_EXPRs.
19222         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19223         call to IFN_FMA instead of an FMA_EXPR.
19225 2018-05-17  Jim Wilson  <jimw@sifive.com>
19227         * expr.c (do_tablejump): When converting index to Pmode, if we have a
19228         sign extended promoted subreg, and the range does not have the sign bit
19229         set, then do a sign extend.
19231         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19232         test, check for sign extended subreg and/or constant operands, and
19233         do a sign extend in that case.
19235 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
19237         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19238         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19239         Add untyped.
19240         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19241         Change logics_shift_reg to logics_shift_imm.
19242         (thunderx2t99_fp_loadpair_basic): Delete.
19243         (thunderx2t99_fp_storepair_basic): Delete.
19244         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19245         (thunderx2t99_asimd_polynomial): Delete.
19246         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19247         and neon_fp_mul_d_scalar_q.
19248         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19249         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19250         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19251         (thunderx2t99_asimd_lut): Add missing tbl types.
19252         (thunderx2t99_asimd_ext): Delete.
19253         (thunderx2t99_asimd_load1_1_mult): Delete.
19254         (thunderx2t99_asimd_load1_2_mult): Delete.
19255         (thunderx2t99_asimd_load1_ldp): New.
19256         (thunderx2t99_asimd_load1): New.
19257         (thunderx2t99_asimd_load2): Add missing *load2* types.
19258         (thunderx2t99_asimd_load3): New.
19259         (thunderx2t99_asimd_load4): New.
19260         (thunderx2t99_asimd_store1_1_mult): Delete.
19261         (thunderx2t99_asimd_store1_2_mult): Delete.
19262         (thunderx2t99_asimd_store2_mult): Delete.
19263         (thunderx2t99_asimd_store2_onelane): Delete.
19264         (thunderx2t99_asimd_store_stp): New.
19265         (thunderx2t99_asimd_store1): New.
19266         (thunderx2t99_asimd_store2): New.
19267         (thunderx2t99_asimd_store3): New.
19268         (thunderx2t99_asimd_store4): New.
19270 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
19272         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19273         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
19275 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
19276             Segher Boessenkool  <segher@kernel.crashing.org>
19278         PR target/85698
19279         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19280         operand.
19282 2018-05-17  Richard Biener  <rguenther@suse.de>
19284         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19285         for pruning loop and prune defs feeding only already visited PHIs.
19287 2018-05-17  Richard Biener  <rguenther@suse.de>
19289         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19291 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
19292             Richard Biener  <rguenther@suse.de>
19294         PR tree-optimization/85793
19295         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19296         for VMAT_ELEMENTWISE.
19298 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
19300         * internal-fn.h (lookup_internal_fn): Declare
19301         * internal-fn.c (lookup_internal_fn): New function.
19302         * gimple.c (gimple_build_call_from_tree): Handle calls to
19303         internal functions.
19304         * gimple-pretty-print.c (dump_gimple_call): Print "." before
19305         internal function names.
19306         * tree-pretty-print.c (dump_generic_node): Likewise.
19307         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19309 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
19311         * gimple-fold.h (gimple_build): Make the function forms take
19312         combined_fn rather than built_in_function.
19313         (gimple_simplify): Likewise.
19314         * gimple-match-head.c (gimple_simplify): Likewise.
19315         * gimple-fold.c (gimple_build): Likewise.
19316         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19317         rather than gimple_build_call_internal.
19318         (get_initial_defs_for_reduction): Likewise.
19319         (vect_create_epilog_for_reduction): Likewise.
19320         (vectorizable_live_operation): Likewise.
19322 2018-05-17  Martin Liska  <mliska@suse.cz>
19324         * gimple-ssa-sprintf.c (format_directive): Do not use
19325         space in between 'G_' and '('.
19327 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
19329         PR target/85323
19330         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19331         even if the mask is not all ones.
19333         PR target/85323
19334         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19335         vector.
19336         (ix86_gimple_fold_builtin): Likewise.
19338         PR target/85323
19339         * config/i386/i386.c: Include tree-vector-builder.h.
19340         (ix86_vector_shift_count): New function.
19341         (ix86_fold_builtin): Fold shift builtins by scalar count.
19342         (ix86_gimple_fold_builtin): Likewise.
19344         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19345         _mm512_setzero): New intrinsics.
19347 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
19348             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19350         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19351         code generation for cases where splatting a value is not useful.
19352         * simplify-rtx.c (simplify_ternary_operation): Simplify
19353         vec_merge across a vec_duplicate and a paradoxical subreg forming
19354         a vector mode to a vec_concat.
19356 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
19358         * config.gcc: Support "goldmont-plus".
19359         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19360         "goldmont-plus".
19361         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19362         PROCESSOR_GOLDMONT_PLUS.
19363         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19364         (processor_target_table): Add "goldmont-plus".
19365         (PTA_GOLDMONT_PLUS): Define.
19366         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19367         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19368         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19369         (fold_builtin_cpu): Add "goldmont-plus".
19370         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19371         (ix86_option_override_internal): Add "goldmont-plus".
19372         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19373         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19374         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19375         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19377 2018-05-17  Richard Biener  <rguenther@suse.de>
19379         PR tree-optimization/85757
19380         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19381         remove defs that only feed that PHI from further processing.
19383 2018-05-16  Jim Wilson  <jimw@sifive.com>
19385         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19386         asterisk to name.
19387         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19389 2018-05-16  Mark Wielaard  <mark@klomp.org>
19391         * dwarf2out.c (count_index_strings): New function.
19392         (output_indirect_strings): Call count_index_strings and generate
19393         header for dwarf_version >= 5.
19395 2018-05-16  Mark Wielaard  <mark@klomp.org>
19397         * dwarf2out.c (dwarf_FORM): New function.
19398         (set_indirect_string): Use dwarf_FORM.
19399         (reset_indirect_string): Likewise.
19400         (size_of_die): Likewise.
19401         (value_format): Likewise.
19402         (output_die): Likewise.
19403         (add_skeleton_AT_string): Likewise.
19404         (output_macinfo_op): Likewise.
19405         (index_string): Likewise.
19406         (output_index_string_offset): Likewise.
19407         (output_index_string): Likewise.
19408         (count_index_strings): Likewise.
19410 2018-05-16  Carl Love  <cel@us.ibm.com>
19412         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19413         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19415 2018-05-16  Martin Jambor  <mjambor@suse.cz>
19417         * ipa-prop.c (ipa_free_all_edge_args): Remove.
19418         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19420 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
19422         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19423         (fnma<mode>4): Likewise.
19424         (fms<mode>4): Likewise.
19425         (fnms<mode>4): Likewise.
19426         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19427         (aarch64_fnma<mode>4): Likewise.
19428         (aarch64_fms<mode>4): Likewise.
19429         (aarch64_fnms<mode>4): Likewise.
19430         (aarch64_fnmadd<mode>4): Likewise.
19432 2018-05-16  Jason Merrill  <jason@redhat.com>
19434         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
19436 2018-05-16  Richard Biener  <rguenther@suse.de>
19438         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19439         (dump_stmt_cost): Declare.
19440         (add_stmt_cost): Dump cost we add.
19441         (add_stmt_costs): New function.
19442         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19443         No longer exported.
19444         (vect_analyze_stmt): Adjust prototype.
19445         (vectorizable_condition): Likewise.
19446         (vectorizable_live_operation): Likewise.
19447         (vectorizable_reduction): Likewise.
19448         (vectorizable_induction): Likewise.
19449         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19450         cost vector to pass to vectorizable_ and record afterwards.
19451         (vect_model_reduction_cost): Take cost vector argument and adjust.
19452         (vect_model_induction_cost): Likewise.
19453         (vectorizable_reduction): Likewise.
19454         (vectorizable_induction): Likewise.
19455         (vectorizable_live_operation): Likewise.
19456         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19457         SLP_TREE_NUMBER_OF_VEC_STMTS.
19458         (vect_analyze_slp_cost_1): Remove.
19459         (vect_analyze_slp_cost): Likewise.
19460         (vect_slp_analyze_node_operations): Take visited args and
19461         a target cost vector.  Avoid processing already visited stmt sets.
19462         (vect_slp_analyze_operations): Use a local cost vector to gather
19463         costs and register those of non-discarded instances.
19464         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19465         (vect_schedule_slp_instance): Remove copying of
19466         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
19467         zero.
19468         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19469         adding cost.  Record cost entry location.
19470         (vect_prologue_cost_for_slp_op): Function to compute cost of
19471         a constant or invariant generated for SLP vect in the prologue,
19472         split out from vect_analyze_slp_cost_1.
19473         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
19474         (vect_model_promotion_demotion_cost): Likewise.
19475         (vect_model_store_cost): Likewise, make static.
19476         (vect_model_load_cost): Likewise.
19477         (vectorizable_bswap): Add cost vector arg and adjust.
19478         (vectorizable_call): Likewise.
19479         (vectorizable_simd_clone_call): Likewise.
19480         (vectorizable_conversion): Likewise.
19481         (vectorizable_assignment): Likewise.
19482         (vectorizable_shift): Likewise.
19483         (vectorizable_operation): Likewise.
19484         (vectorizable_store): Likewise.
19485         (vectorizable_load): Likewise.
19486         (vectorizable_condition): Likewise.
19487         (vectorizable_comparison): Likewise.
19488         (can_vectorize_live_stmts): Likewise.
19489         (vect_analyze_stmt): Likewise.
19490         (vect_transform_stmt): Adjust calls to vectorizable_*.
19491         * tree-vectorizer.c: Include gimple-pretty-print.h.
19492         (dump_stmt_cost): New function.
19494 2018-05-16  Richard Biener  <rguenther@suse.de>
19496         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19497         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19498         * tree-ssa-dse.c: Include tree-ssa-loop.h.
19499         (check_name): New callback.
19500         (dse_classify_store): Track cycles via a visited bitmap of PHI
19501         defs and simplify handling of in-loop and across loop dead stores
19502         and properly fail for loop-variant refs.  Handle byte-tracking with
19503         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19504         limiting the walk.
19506 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
19508         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19509         (vect_get_mask_type_for_stmt): Likewise.
19510         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19511         split out from...
19512         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
19513         to determine the statement's vector type and the vector type that
19514         should be used for calculating nunits.  Deal with cases in which
19515         the type has to be deferred.
19516         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19517         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19518         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19519         (vect_determine_vf_for_stmt): New functions, split out from...
19520         (vect_determine_vectorization_factor): ...here.
19521         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19522         (vect_get_mask_type_for_stmt): New functions, split out from
19523         vect_determine_vectorization_factor.
19525 2018-05-16  Richard Biener  <rguenther@suse.de>
19527         * tree-cfg.c (verify_gimple_assign_ternary): Properly
19528         verify the [VEC_]COND_EXPR embedded comparison.
19530 2018-05-15  Martin Sebor  <msebor@redhat.com>
19532         PR tree-optimization/85753
19533         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19534         RECORD_TYPE in addition to ARRAY_TYPE.
19536 2018-05-15  Martin Sebor  <msebor@redhat.com>
19538         PR middle-end/85643
19539         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19541 2018-05-15  Richard Biener  <rguenther@suse.de>
19543         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19544         add by_clobber_p one.  Change algorithm to collect all defs
19545         representing uses we need to walk and try reducing them to
19546         a single one before failing.
19547         (dse_dom_walker::dse_optimize_stmt): Adjust.
19549 2018-05-13  Mark Wielaard  <mark@klomp.org>
19551         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19552         (size_of_loc_descr): Likewise.
19553         (output_loc_operands): Likewise.
19554         (output_loc_operands_raw): Likewise.
19555         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19556         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19557         (hash_loc_operands): Likewise.
19558         (compare_loc_operands): Likewise.
19560 2018-05-14  Mark Wielaard  <mark@klomp.org>
19562         * dwarf2out.c (count_index_addrs): New function.
19563         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19565 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19567         PR tree-optimization/83648
19568         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19569         return value as malloc candidate.
19571 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19573         PR ipa/85734
19574         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19575         param as true in call to suggest_attribute.
19577 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
19579         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19580         -mreadonly-in-sdata.
19582 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19584         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19585         New pattern.
19586         (aarch64_crypto_aesd_fused): Likewise.
19588 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
19590         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19591         (movsi_aarch64): Likewise.
19592         (load_pairsi): Likewise.
19593         (load_pairdi): Likewise.
19594         (store_pairsi): Likewise.
19595         (store_pairdi): Likewise.
19596         (load_pairsf): Likewise.
19597         (load_pairdf): Likewise.
19598         (store_pairsf): Likewise.
19599         (store_pairdf): Likewise.
19600         (zero_extend): Likewise.
19601         (trunc): Swap alternatives.
19602         (fcvt_target): Add '?' to prefer w over r.
19604 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
19606         PR target/85756
19607         * config/i386/i386.md: Disallow non-commutative arithmetics in
19608         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19609         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
19610         in the peephole2 before it.
19612 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
19614         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19615         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19616         (ix86_handle_option): Handle -mcldemote.
19617         * config.gcc: New header.
19618         * config/i386/cldemoteintrin.h: New file.
19619         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19620         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19621         -mcldemote.
19622         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19623         OPTION_MASK_ISA_CLDEMOTE.
19624         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19625         (ix86_valid_target_attribute_inner_p): Ditto.
19626         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19627         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19628         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19629         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19630         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19631         (cldemote): New.
19632         * config/i386/i386.opt: Add -mcldemote.
19633         * config/i386/x86intrin.h: New header.
19634         * doc/invoke.texi: Add -mcldemote.
19636 2018-05-14  Richard Biener  <rguenther@suse.de>
19638         * doc/match-and-simplify.texi: Adjust :s documentation.
19640 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
19642         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19643         intended memcpy size.
19644         (REORDER_45): Likewise.
19646 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
19648         * sort.cc: New file.
19649         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19650         * vec.c (qsort_chk): Use gcc_qsort.
19651         * Makefile.in (OBJS-libcommon): Add sort.o.
19652         (build/sort.o): New target.  Use it...
19653         (BUILD_RTL): ... here, and...
19654         (build/gencfn-macros): ... here, and...
19655         (build/genmatch): ... here.
19657 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19658             Chung-Ju Wu  <jasonwucj@gmail.com>
19660         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19661         * config/nds32/nds32-graywolf.md: New file.
19662         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19663         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19664         pipeline.
19665         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19666         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19667         * config/nds32/nds32.md (pipeline_model): Add graywolf.
19668         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19669         * config/nds32/pipelines.md: Include n15 settings.
19671 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19672             Chung-Ju Wu  <jasonwucj@gmail.com>
19674         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19675         * config/nds32/nds32-n13.md: New file.
19676         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19677         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19678         pipeline.
19679         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19680         * config/nds32/nds32.md (pipeline_model): Add n13.
19681         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19682         * config/nds32/pipelines.md: Include n13 settings.
19684 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19685             Chung-Ju Wu  <jasonwucj@gmail.com>
19687         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19688         * config/nds32/nds32-n10.md: New file.
19689         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19690         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19691         pipeline.
19692         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19693         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19694         * config/nds32/nds32.md (pipeline_model): Add n10.
19695         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19696         * config/nds32/pipelines.md: Include n10 settings.
19698 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
19699             Kito Cheng  <kito.cheng@gmail.com>
19700             Chung-Ju Wu  <jasonwucj@gmail.com>
19702         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19703         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19704         Add enum values for DSP extension instructions.
19705         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19706         New constraints.
19707         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19708         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19709         New code iterators.
19710         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19711         * config/nds32/nds32-dspext.md: New file for DSP implementation.
19712         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19713         * config/nds32/nds32-intrinsic.md: Likewise.
19714         * config/nds32/nds32_intrinsic.h: Likewise.
19715         * config/nds32/nds32-md-auxiliary.c: Likewise.
19716         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19717         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19718         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19719         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19720         * config/nds32/nds32-protos.h: New declarations for DSP extension.
19721         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19722         TYPE_DMAC in switch statement.
19723         * config/nds32/nds32.c: New checking and implementation for DSP
19724         extension instructions.
19725         * config/nds32/nds32.h: Likewise.
19726         * config/nds32/nds32.md: Likewise.
19727         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19728         * config/nds32/predicates.md: Implement new predicates for DSP
19729         extension.
19731 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
19733         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19734         Reformat alternatives and attributes so it is easier to identify
19735         which constraints/attributes go with which instruction.
19736         (mov<mode>_hardfloat32, FMOVE64): Likewise.
19737         (mov<mode>_softfloat32, FMOVE64): Likewise.
19738         (mov<mode>_hardfloat64, FMOVE64): Likewise.
19739         (mov<mode>_softfloat64, FMOVE64): Likewise.
19741 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19743         * doc/extend.texi (PowerPC Built-in Functions): Rename this
19744         subsection.
19745         (Basic PowerPC Built-in Functions): The new name of the
19746         subsection previously known as "PowerPC Built-in Functions".
19747         (Basic PowerPC Built-in Functions Available on all Configurations):
19748         New subsubsection.
19749         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19750         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19751         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19752         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19754 2018-05-11  Martin Jambor  <mjambor@suse.cz>
19756         PR ipa/85655
19757         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
19758         single const.
19760 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
19762         PR target/85733
19763         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
19765 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
19767         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
19768         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
19769         (ix86_handle_option): Handle -mwaitpkg.
19770         * config.gcc: New header.
19771         * config/i386/cpuid.h (bit_WAITPKG): New bit.
19772         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
19773         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
19774         function type.
19775         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19776         OPTION_MASK_ISA_WAITPKG.
19777         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
19778         (ix86_option_override_internal): Add PTA_WAITPKG.
19779         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
19780         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
19781         IX86_BUILTIN_TPAUSE.
19782         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
19783         __builtin_ia32_umwait and __builtin_ia32_tpause.
19784         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
19785         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
19786         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
19787         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
19788         UNSPECV_TPAUSE): New.
19789         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
19790         * config/i386/i386.opt: Add -mwaitpkg.
19791         * config/i386/waitpkgintrin.h: New file.
19792         * config/i386/x86intrin.h: New header.
19793         * doc/invoke.texi: Add -mwaitpkg.
19795 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
19797         PR target/85606
19798         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
19799         equivalent.
19800         (cortex-m0): Use armv6s-m isa.
19801         (cortex-m0plus): Likewise.
19802         (cortex-m1): Likewise.
19803         (cortex-m0.small-multiply): Likewise.
19804         (cortex-m0plus.small-multiply): Likewise.
19805         (cortex-m1.small-multiply): Likewise.
19807 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
19808             Jakub Jelinek  <jakub@redhat.com>
19810         PR tree-optimization/85692
19811         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
19812         source permute as well.
19814 2018-05-11  Martin Liska  <mliska@suse.cz>
19816         PR sanitizer/85556
19817         * doc/extend.texi: Document LLVM style format for no_sanitize
19818         attribute.
19820 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
19822         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
19823         mode_supports_vsx_dform_quad to mode_supports_dq_form.
19824         (mode_supports_vsx_dform_quad): Likewise.
19825         (mode_supports_vmx_dform): Move these functions to be next to the
19826         other mode_supports functions.
19827         (mode_supports_dq_form): Likewise.
19828         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
19829         mode_supports_dq_form.
19830         (reg_offset_addressing_ok_p): Likewise.
19831         (offsettable_ok_by_alignment): Likewise.
19832         (rs6000_legitimate_offset_address_p): Likewise.
19833         (legitimate_lo_sum_address_p): Likewise.
19834         (rs6000_legitimize_address): Likewise.
19835         (rs6000_legitimize_reload_address): Likewise.
19836         (rs6000_secondary_reload_inner): Likewise.
19837         (rs6000_preferred_reload_class): Likewise.
19838         (rs6000_output_move_128bit): Likewise.
19840 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
19842         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
19843         Generate SImode target register for null target.
19844         <case IX86_BUILTIN_XGETBV>: Ditto.
19845         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
19846         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
19848 2018-05-10  Carl Love  <cel@us.ibm.com>
19850         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19851         dcbtt and dcbtstt if operands[2] is 0.
19853 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
19855         PR target/85693
19856         * config/i386/sse.md (usadv64qi): New expander.
19858 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
19860         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
19861         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
19862         -maltivec=be support.
19863         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
19864         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
19865         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
19866         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
19867         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
19868         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
19869         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
19870         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
19871         altivec_vsumsws): Adjust.
19872         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
19873         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
19874         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
19875         support.
19876         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
19877         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
19878         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
19879         (altivec_lve<VI_char>x): Delete expand.
19880         (*altivec_lve<VI_char>x_internal): Rename to...
19881         (altivec_lve<VI_char>x): ... this.
19882         (altivec_lvxl_<mode>): Delete expand.
19883         (*altivec_lvxl_<mode>_internal): Rename to ...
19884         (altivec_lvxl_<mode>): ... this.
19885         (altivec_stvxl_<mode>): Delete expand.
19886         (*altivec_stvxl_<mode>_internal): Rename to ...
19887         (altivec_stvxl_<mode>): ... this.
19888         (altivec_stve<VI_char>x): Delete expand.
19889         (*altivec_stve<VI_char>x_internal): Rename to ...
19890         (altivec_stve<VI_char>x): ... this.
19891         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
19892         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
19893         reduc_plus_scal_<mode>): Adjust.
19894         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
19895         comment.
19896         (rs6000_cpu_cpp_builtins): Adjust.
19897         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
19898         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
19899         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
19900         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
19901         -maltivec=be support.
19902         (rs6000_split_vec_extract_var): Adjust.
19903         (rs6000_split_v4si_init): Adjust.
19904         (swap_selector_for_mode): Delete.
19905         (altivec_expand_lvx_be, altivec_expand_stvx_be,
19906         altivec_expand_stvex_be): Delete.
19907         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
19908         -maltivec=be support.
19909         (rs6000_gimple_fold_builtin): Ditto.
19910         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
19911         Adjust.
19912         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
19913         (TARGET_DIRECT_MOVE_64BIT): Adjust.
19914         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
19915         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
19916         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
19917         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
19918         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
19919         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
19920         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
19921         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
19922         anonymous split): Adjust.
19923         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
19924         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
19926 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
19928         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
19929         when --with-gxx-include-dir is also specified.
19930         * configure: Regenerate.
19932 2018-05-09  Jim Wilson  <jimw@sifive.com>
19934         PR target/84797
19935         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
19936         * config/riscv/t-withmultilib: New.
19937         * config/riscv/withmultilib.h: New.
19938         * doc/install.texi: Document RISC-V --with-multilib-list support.
19940 2018-05-09  Richard Biener  <rguenther@suse.de>
19942         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
19943         vector.
19944         (vect_bb_vectorization_profitable_p): Adjust.  Compute
19945         actual scalar cost using the cost vector and the add_stmt_cost
19946         machinery.
19948 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19950         PR rtl-optimization/85645
19951         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
19952         in the REG_CFA_REGISTER note for LR, don't leave it empty.
19954 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19956         PR rtl-optimization/85645
19957         * shrink-wrap.c (spread_components): Return a boolean saying if
19958         anything was changed.
19959         (try_shrink_wrapping_separate): Iterate spread_components until
19960         nothing changes anymore.
19962 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19964         PR rtl-optimization/85645
19965         * regrename.c (build_def_use): Also kill the chains that include the
19966         destination of a REG_CFA_REGISTER note.
19968 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19970         PR rtl-optimization/85645
19971         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
19972         insn that has a REG_CFA_REGISTER note.
19974 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
19976         * cfgexpand.c (expand_clobber): New function.
19977         (expand_gimple_stmt_1): Use it.
19978         * tree-vect-stmts.c (vect_clobber_variable): New function,
19979         split out from...
19980         (vectorizable_simd_clone_call): ...here.
19981         (vectorizable_store): Emit a clobber either side of an
19982         IFN_STORE_LANES sequence.
19983         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
19985 2018-05-09  Tom de Vries  <tom@codesourcery.com>
19987         PR target/85626
19988         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
19989         (define_insn "trap_if_false"): Add exit after trap.
19991 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
19993         PR rtl-optimization/85638
19994         * bb-reorder.c: Include common/common-target.h.
19995         (create_forwarder_block): New function extracted from...
19996         (fix_up_crossing_landing_pad): ...here.  Rename into...
19997         (dw2_fix_up_crossing_landing_pad): ...this.
19998         (sjlj_fix_up_crossing_landing_pad): New function.
19999         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
20000         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
20001         from both partitions and exit the loop after one iteration.
20003 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20005         Revert:
20006         * doc/extend.texi (PowerPC Built-in Functions): Rename this
20007         subsection.
20008         (Basic PowerPC Built-in Functions): The new name of the
20009         subsection previously known as "PowerPC Built-in Functions".
20010         (Basic PowerPC Built-in Functions Available on all Configurations):
20011         New subsubsection.
20012         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20013         subsubsection.
20014         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20015         subsubsection.
20016         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20017         subsubsection.
20018         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20019         subsubsection.
20021 2018-05-08  Jim Wilson  <jimw@sifive.com>
20023         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
20024         (LD_EMUL_SUFFIX): New.
20025         (LINK_SPEC): Use it.
20027 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20029         * doc/extend.texi (PowerPC Built-in Functions): Rename this
20030         subsection.
20031         (Basic PowerPC Built-in Functions): The new name of the
20032         subsection previously known as "PowerPC Built-in Functions".
20033         (Basic PowerPC Built-in Functions Available on all Configurations):
20034         New subsubsection.
20035         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20036         subsubsection.
20037         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20038         subsubsection.
20039         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20040         subsubsection.
20041         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20042         subsubsection.
20044 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
20046         PR target/85683
20047         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
20048         after cmpelim optimization.
20050 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
20052         * config.gcc: Support "goldmont".
20053         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
20054         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20055         PROCESSOR_GOLDMONT.
20056         * config/i386/i386.c (m_GOLDMONT): Define.
20057         (processor_target_table): Add "goldmont".
20058         (PTA_GOLDMONT): Define.
20059         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
20060         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
20061         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
20062         (fold_builtin_cpu): Add "goldmont".
20063         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
20064         (ix86_option_override_internal): Add "goldmont".
20065         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
20066         (processor_type): Add PROCESSOR_GOLDMONT.
20067         * config/i386/i386.md: Add CPU "glm".
20068         * config/i386/glm.md: New file.
20069         * config/i386/x86-tune.def: Add m_GOLDMONT.
20070         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
20072 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
20074         PR target/85572
20075         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
20076         E_V4DImode.
20077         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
20078         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
20079         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
20081         PR target/85317
20082         * config/i386/i386.c (ix86_fold_builtin): Handle
20083         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
20085         PR target/85480
20086         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
20087         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
20089 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
20091         PR target/85658
20092         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
20093         (check_arch): Likewise.
20094         (check_fpu): Return the result rather than printing it.
20095         (end arch): Fix operator precedence.
20096         (end cpu): Likewise.
20097         (END): Print the result from check_fpu.
20099 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
20100             Alan Hayward  <alan.hayward@arm.com>
20101             David Sherwood  <david.sherwood@arm.com>
20103         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
20104         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
20105         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
20106         (*fcmuo<mode>_and): New patterns.
20108 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
20110         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
20111         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
20112         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
20113         (cmp_op, sve_imm_con): New code attributes.
20114         (SVE_COND_INT_CMP, imm_con): Delete.
20115         (cmp_op): Remove above unspecs from int attribute.
20116         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
20117         to...
20118         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
20119         comparison-specific unspecs.
20120         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
20121         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
20122         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
20123         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
20124         (*vec_fcm<cmp_op><mode>): Rename to...
20125         (*fcm<cmp_op><mode>): ...this and adjust likewise.
20126         (*vec_fcmuo<mode>): Rename to...
20127         (*fcmuo<mode>): ...this and adjust likewise.
20128         (*pred_fcm<cmp_op><mode>): New pattern.
20129         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
20130         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
20131         functions.
20132         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
20133         and UNORDERED.
20134         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
20135         (aarch64_emit_sve_predicated_cond): New function.
20136         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
20137         (aarch64_emit_unspec_cond_or): Replace with...
20138         (aarch64_emit_sve_or_conds): ...this new function.  Use
20139         aarch64_emit_sve_ptrue_op for the individual comparisons and
20140         aarch64_emit_binop to OR them together.
20141         (aarch64_emit_inverted_unspec_cond): Replace with...
20142         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
20143         aarch64_emit_sve_ptrue_op for the comparison and
20144         aarch64_emit_unop to invert the result.
20145         (aarch64_expand_sve_vec_cmp_float): Update after the above
20146         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
20148 2018-05-07  Nathan Sidwell  <nathan@acm.org>
20150         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
20151         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
20152         (Backwards Compatibility): Likewise.
20154 2018-05-07  Luis Machado  <luis.machado@linaro.org>
20156         PR bootstrap/85681
20157         Revert:
20158         2018-05-07  Luis Machado  <luis.machado@linaro.org>
20160         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20161         <prefetch_dynamic_strides>: New const bool field.
20162         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20163         prefetch_dynamic_strides.
20164         (exynosm1_prefetch_tune): Likewise.
20165         (thunderxt88_prefetch_tune): Likewise.
20166         (thunderx_prefetch_tune): Likewise.
20167         (thunderx2t99_prefetch_tune): Likewise.
20168         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20169         to false.
20170         (aarch64_override_options_internal): Update to set
20171         PARAM_PREFETCH_DYNAMIC_STRIDES.
20172         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20173         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20174         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20175         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20176         prefetch-dynamic-strides setting.
20178         2018-05-07  Luis Machado  <luis.machado@linaro.org>
20180         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20181         <minimum_stride>: New const int field.
20182         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20183         minimum_stride field.
20184         (exynosm1_prefetch_tune): Likewise.
20185         (thunderxt88_prefetch_tune): Likewise.
20186         (thunderx_prefetch_tune): Likewise.
20187         (thunderx2t99_prefetch_tune): Likewise.
20188         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20189         (aarch64_override_options_internal): Update to set
20190         PARAM_PREFETCH_MINIMUM_STRIDE.
20191         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20192         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20193         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20194         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20195         stride is constant and is below the minimum stride threshold.
20197 2018-05-07  Luis Machado  <luis.machado@linaro.org>
20199         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
20200         to 512.
20202 2018-05-07  Luis Machado  <luis.machado@linaro.org>
20204         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20205         <prefetch_dynamic_strides>: New const bool field.
20206         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20207         prefetch_dynamic_strides.
20208         (exynosm1_prefetch_tune): Likewise.
20209         (thunderxt88_prefetch_tune): Likewise.
20210         (thunderx_prefetch_tune): Likewise.
20211         (thunderx2t99_prefetch_tune): Likewise.
20212         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20213         to false.
20214         (aarch64_override_options_internal): Update to set
20215         PARAM_PREFETCH_DYNAMIC_STRIDES.
20216         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20217         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20218         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20219         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20220         prefetch-dynamic-strides setting.
20222 2018-05-07  Luis Machado  <luis.machado@linaro.org>
20224         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20225         <minimum_stride>: New const int field.
20226         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20227         minimum_stride field.
20228         (exynosm1_prefetch_tune): Likewise.
20229         (thunderxt88_prefetch_tune): Likewise.
20230         (thunderx_prefetch_tune): Likewise.
20231         (thunderx2t99_prefetch_tune): Likewise.
20232         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20233         (aarch64_override_options_internal): Update to set
20234         PARAM_PREFETCH_MINIMUM_STRIDE.
20235         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20236         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20237         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20238         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20239         stride is constant and is below the minimum stride threshold.
20241 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
20243         PR c++/85659
20244         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20245         the type is addressable.  Don't force op into register if it has
20246         BLKmode.
20248 2018-05-05  Roland McGrath  <mcgrathr@google.com>
20250         PR other/77609
20251         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20252         any section for which we don't know a specific type it should have,
20253         regardless of name.  Previously this was done only for the exact
20254         names ".init_array", ".fini_array", and ".preinit_array".
20255         (default_elf_asm_named_section): Add comment about
20256         relationship with default_section_type_flags and SECTION_NOTYPE.
20257         (get_section): Don't consider it a type conflict if one side has
20258         SECTION_NOTYPE and the other doesn't, as long as neither has the
20259         SECTION_BSS et al used in the default_section_type_flags logic.
20261 2018-05-05  Tom de Vries  <tom@codesourcery.com>
20263         PR target/85653
20264         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20265         (workaround_barsyncs): New function.
20266         (nvptx_reorg): Use workaround_barsyncs.
20267         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20268         (define_expand "nvptx_membar_cta"): New define_expand.
20269         (define_insn "*nvptx_membar_cta"): New insn.
20271 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
20273         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20274         To improve optimization opportunities.
20275         * builtin-types.def: The new needed builtin types for the above.
20277 2018-05-04  Richard Biener  <rguenther@suse.de>
20279         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20280         * gimple-ssa-store-merging.c
20281         (imm_store_chain_info::output_merged_store): Remove redundant create,
20282         release split_store vector contents on failure.
20283         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20284         scalar stmt vector on cache hit.
20286 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
20288         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20289         Xilinx FP support.
20290         * config.gcc (powerpc-xilinx-eabi*): Remove.
20291         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20292         support.
20293         (fusion_addis_mem_combo_load): Ditto.
20294         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20295         FP support.
20296         (rs6000_cpu_cpp_builtins): Ditto.
20297         * config/rs6000/rs6000-linux.c
20298         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20299         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20300         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20301         support.
20302         (rs6000_setup_reg_addr_masks): Ditto.
20303         (rs6000_init_hard_regno_mode_ok): Ditto.
20304         (rs6000_option_override_internal): Ditto.
20305         (legitimate_lo_sum_address_p): Ditto.
20306         (rs6000_legitimize_address): Ditto.
20307         (rs6000_legitimize_reload_address): Ditto.
20308         (rs6000_legitimate_address_p): Ditto.
20309         (abi_v4_pass_in_fpr): Ditto.
20310         (setup_incoming_varargs): Ditto.
20311         (rs6000_gimplify_va_arg): Ditto.
20312         (rs6000_split_multireg_move): Ditto.
20313         (rs6000_savres_strategy): Ditto.
20314         (rs6000_emit_prologue_components): Ditto.
20315         (rs6000_emit_epilogue_components): Ditto.
20316         (rs6000_emit_prologue): Ditto.
20317         (rs6000_emit_epilogue): Ditto.
20318         (rs6000_elf_file_end): Ditto.
20319         (rs6000_function_value): Ditto.
20320         (rs6000_libcall_value): Ditto.
20321         * config/rs6000/rs6000.h: Ditto.
20322         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20323         (TARGET_MINMAX): ... this.  New.
20324         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20325         * config/rs6000/rs6000.md: Remove Xilinx FP support.
20326         (*movsi_internal1_single): Delete.
20327         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20328         mfpu=, mxilinx-fpu): Delete.
20329         * config/rs6000/singlefp.h: Delete.
20330         * config/rs6000/sysv4.h: Remove Xilinx FP support.
20331         * config/rs6000/t-rs6000: Ditto.
20332         * config/rs6000/t-xilinx: Delete.
20333         * config/rs6000/titan.md: Adjust for fp_type removal.
20334         * config/rs6000/vsx.md: Remove Xilinx FP support.
20335         (VStype_simple): Delete.
20336         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20337         * config/rs6000/xfpu.h: Delete.
20338         * config/rs6000/xfpu.md: Delete.
20339         * config/rs6000/xilinx.h: Delete.
20340         * config/rs6000/xilinx.opt: Delete.
20341         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20342         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20344 2018-05-04  Tom de Vries  <tom@codesourcery.com>
20346         PR libgomp/85639
20347         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20348         if ignore == 0.
20350 2018-05-04  Richard Biener  <rguenther@suse.de>
20352         PR middle-end/85627
20353         * tree-complex.c (update_complex_assignment): We are always in SSA form.
20354         (expand_complex_div_wide): Likewise.
20355         (expand_complex_operations_1): Likewise.
20356         (expand_complex_libcall): Preserve EH info of the original stmt.
20357         (tree_lower_complex): Handle removed blocks.
20358         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20359         on complex multiplication and division libcall builtins.
20361 2018-05-04  Richard Biener  <rguenther@suse.de>
20363         PR middle-end/85574
20364         * fold-const.c (negate_expr_p): Restrict negation of operand
20365         zero of a division to when we know that can happen without
20366         overflow.
20367         (fold_negate_expr_1): Likewise.
20369 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
20371         PR libstdc++/85466
20372         * real.h (real_nextafter): Declare.
20373         * real.c (real_nextafter): New function.
20374         * fold-const-call.c (fold_const_nextafter): New function.
20375         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20376         CASE_CFN_NEXTTOWARD.
20377         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20378         even when arg1_mode is different from arg0_mode.
20380 2018-05-03  Nathan Sidwell  <nathan@acm.org>
20382         * doc/extend.texi (Deprecated Features): Remove
20383         -ffriend-injection.
20384         (Backwards Compatibility): Likewise.
20385         * doc/invoke.texi (C++ Language Options): Likewise.
20386         (C++ Dialect Options): Likewise.
20388 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
20390         PR target/85530
20391         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20392         _mm512_mask_mullox_epi64): New intrinsics.
20394 2018-05-03  Tom de Vries  <tom@codesourcery.com>
20396         PR testsuite/85106
20397         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20398         dump files): Add offload-tree.
20400 2018-05-03  Richard Biener  <rguenther@suse.de>
20402         PR tree-optimization/85615
20403         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20404         to loops not nested in BBs loop father to avoid creating multi-entry
20405         loops.
20407 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20409         PR tree-optimization/70291
20410         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20411         arguments.  Change return type to tree.  Emit libcall as a new
20412         statement rather than replacing existing one when inplace_p is true.
20413         (expand_complex_multiplication_components): New function.
20414         (expand_complex_multiplication): Expand floating-point complex
20415         multiplication using the above.
20416         (expand_complex_division): Rename inner_type parameter to type.
20417         Update expand_complex_libcall call-site.
20418         (expand_complex_operations_1): Update expand_complex_multiplication
20419         and expand_complex_division call-sites.
20421 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
20423         PR target/85582
20424         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20425         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20426         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20427         the highest significant bit of the shift count mask is clear.  In
20428         check whether and[sq]i3 is needed verify that all significant bits
20429         of the shift count other than the highest are set.
20431 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20433         PR libgomp/82428
20434         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20435         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20436         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20437         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20438         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20439         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20440         __builtin_goacc_parlevel_size.
20442 2018-05-02  Richard Biener  <rguenther@suse.de>
20444         PR tree-optimization/85597
20445         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20446         do not use split vect_get_vec_defs call but call vect_get_slp_defs
20447         directly.
20449 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20451         PR testsuite/85106
20452         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20453         dump files): Add ltrans-tree.
20455 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20457         PR testsuite/85106
20458         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20459         dump files): Add wpa-ipa.
20461 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
20463         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
20464         powerpc*-*-linux*paired* target.
20465         * config/rs6000/750cl.h: Delete.
20466         * config/rs6000/paired.h: Delete.
20467         * config/rs6000/paired.md: Delete.
20468         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20469         float support.
20470         * config/rs6000/rs6000-builtin.def: Remove paired float support.
20471         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20472         comment.  Remove paired float support.
20473         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20474         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20475         VECTOR_PAIRED.
20476         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20477         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20478         declarations.
20479         * config/rs6000/rs6000.c: Remove paired float support.
20480         (paired_expand_vector_init, paired_expand_vector_move,
20481         paired_emit_vector_compare, paired_emit_vector_cond_expr,
20482         (paired_expand_lv_builtin, paired_expand_stv_builtin,
20483         paired_expand_builtin, paired_expand_predicate_builtin,
20484         paired_init_builtins): Delete.
20485         * config/rs6000/rs6000.h: Remove paired float support.
20486         * config/rs6000/rs6000.md: Remove paired float support.
20487         (move_from_CR_ov_bit): Delete.
20488         * config/rs6000/rs6000.opt (mpaired): Delete.
20489         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20490         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20492 2018-05-02  Richard Biener  <rguenther@suse.de>
20494         PR middle-end/85567
20495         * gimplify.c (gimplify_save_expr): When in SSA form allow
20496         SAVE_EXPRs to compute to SSA vars.
20498 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
20500         PR target/85582
20501         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20502         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20503         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20504         clobber operands[2], instead use a new pseudo.  Formatting fixes.
20506 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
20508         PR tree-optimization/85586
20509         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20510         exit early for statements in the same group if the accesses are
20511         not strided.
20513 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20515         PR lto/85451
20516         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20517         error message.
20519 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
20521         PR tree-optimization/85143
20522         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20524 2018-05-01  Tom de Vries  <tom@codesourcery.com>
20526         PR lto/85451
20527         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20528         not found" error message.
20530 2018-05-01  Tom de Vries  <tom@codesourcery.com>
20532         PR other/83786
20533         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20534         * vec.c (test_ordered_remove_if): New function.
20535         (vec_c_tests): Call test_ordered_remove_if.
20536         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20537         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20538         * tree-vect-patterns.c (vect_pattern_recog_1): Use
20539         VEC_ORDERED_REMOVE_IF.
20541 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20543         PR tree-optimization/82665
20544         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20545         pointer subtraction where arguments come from a memchr call.
20547 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
20549         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20550         --push-state --as-needed and --pop-state instead of --as-needed and
20551         --no-as-needed if ld supports it.
20552         * configure: Regenerated.
20554         PR web/85578
20555         * doc/install.texi2html: Replace _002d with - and _002a with * in
20556         generated html files using sed.
20558 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20560         PR c++/85523
20561         * gcc-rich-location.c (blank_line_before_p): New function.
20562         (use_new_line): New function.
20563         (gcc_rich_location::add_fixit_insert_formatted): New function.
20564         * gcc-rich-location.h
20565         (gcc_rich_location::add_fixit_insert_formatted): New function.
20567 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20569         * selftest.c (assert_streq): Rename "expected" and "actual" to
20570         "val1" and "val2".  Extend NULL-handling to cover both inputs
20571         symmetrically, while still requiring both to be non-NULL for a pass.
20572         * selftest.h (assert_streq): Rename "expected" and "actual" to
20573         "val1" and "val2".
20574         (ASSERT_EQ): Likewise.
20575         (ASSERT_EQ_AT): Likewise.
20576         (ASSERT_KNOWN_EQ): Likewise.
20577         (ASSERT_KNOWN_EQ_AT): Likewise.
20578         (ASSERT_NE): Likewise.
20579         (ASSERT_MAYBE_NE): Likewise.
20580         (ASSERT_MAYBE_NE_AT): Likewise.
20581         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
20582         the assertion to pass.
20583         (ASSERT_STREQ_AT): Likewise.
20585 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
20587         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20588         interaction with -pie.
20590 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20592         * selftest.h: Fix alphabetization of per-source-file selftest
20593         declarations.
20595 2018-04-30  Jason Merrill  <jason@redhat.com>
20597         PR c++/61982 - dead stores to destroyed objects.
20598         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20599         of clobber.
20601 2018-04-30  Jason Merrill  <jason@redhat.com>
20603         * tree.c (build_clobber): New.
20604         * tree.h: Declare it.
20605         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20607 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20609         * diagnostic-show-locus.c (layout::layout): Update for
20610         location_get_source_line returning a char_span.
20611         (struct char_span): Move to input.h.
20612         (struct correction): Update for fields in char_span becoming
20613         private.
20614         (struct source_line): Update for location_get_source_line
20615         returning a char_span.
20616         (layout::print_line): Likewise.
20617         * edit-context.c (edited_file::print_content): Likewise.
20618         (edited_file::print_diff_hunk): Likewise.
20619         (edited_file::print_run_of_changed_lines): Likewise.
20620         (edited_file::get_num_lines): Likewise.
20621         (edited_line::edited_line): Likewise.
20622         * final.c (asm_show_source): Likewise.
20623         * input.c (location_get_source_line): Convert return type
20624         from const char * to char_span, losing the final "line_len"
20625         param.
20626         (dump_location_info): Update for the above.
20627         (get_substring_ranges_for_loc): Likewise.  Use a char_span
20628         when handling the literal within the line.
20629         (test_reading_source_line): Update for location_get_source_line
20630         returning a char_span.
20631         * input.h (class char_span): Move here from
20632         diagnostic-show-locus.c, converting from a struct to a class.
20633         Make data members private.
20634         (char_span::operator bool): New.
20635         (char_span::length): New.
20636         (char_span::get_buffer): New.
20637         (char_span::operator[]): New.
20638         (char_span::subspan): Make const.
20639         (char_span::xstrdup): New.
20640         (location_get_source_line): Convert return type from const char *
20641         to char_span, losing the final "line_size" param.
20643 2018-04-30  Jan Hubicka  <jh@suse.cz>
20645         * lto-wrapper.c (ltrans_priorities): New static var.
20646         (cmp_priority): New.
20647         (run_gcc): Read priorities and if doing parallel build order
20648         the Makefile by them.
20650 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20652         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20654 2018-04-30  Richard Biener  <rguenther@suse.de>
20656         * tree-cfg.c (verify_address): Remove base argument, add
20657         flag whether to check TREE_ADDRESSABLE and do that.
20658         (verify_expr): Remove.
20659         (verify_types_in_gimple_reference): Add pieces from verify_expr.
20660         (verify_gimple_assign_single): Likewise.
20661         (verify_gimple_switch): Likewise.
20662         (verify_expr_location_1): Dereference tp once.  Add (disabled)
20663         piece from verify_expr.
20664         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20666 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20668         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20670 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20672         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20673         (small_data_pattern): Likewise.
20674         (arc_rewrite_small_data): Likewise.
20675         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20676         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20677         (get_symbol_alignment): New function.
20678         (legitimate_small_data_address_p): Likewise.
20679         (legitimate_scaled_address): Update, call
20680         legitimate_small_data_address_p.
20681         (output_sdata): New static variable.
20682         (arc_print_operand): Update how we handle small data operands.
20683         (arc_print_operand_address): Likewise.
20684         (arc_legitimate_address_p): Update, use
20685         legitimate_small_data_address_p.
20686         (arc_rewrite_small_data_p): Remove.
20687         (arc_rewrite_small_data_1): Likewise.
20688         (arc_rewrite_small_data): Likewise.
20689         (small_data_pattern): Likewise.
20690         (compact_sda_memory_operand): Update to use
20691         legitimate_small_data_address_p and get_symbol_alignment.
20692         (prepare_move_operands): Don't rewite sdata pattern.
20693         (prepare_extend_operands): Remove.
20694         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20695         pattern.
20696         (zero_extendqisi2): Likewise.
20697         (zero_extendhisi2): Likewise.
20698         (extendqihi2): Likewise.
20699         (extendqisi2): Likewise.
20700         (extendhisi2): Likewise.
20701         (addsi3): Likewise.
20702         (subsi3): Likewise.
20703         (andsi3): Likewise.
20704         * config/arc/constraints.md (Usd): Change it to memory constraint.
20706 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20708         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20709         as source of std instructions.
20710         * config/arc/arc.md (movsi_insn): Update pattern predicate to
20711         allow 6-bit constants as source for store instructions.
20712         (movdi_insn): Update instruction pattern to allow 6-bit constants
20713         as source for store instructions.
20715 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
20717         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20719 2018-04-30  Nathan Sidwell  <nathan@acm.org>
20720             Sandra Loosemore <sandra@codesourcery.com>
20722         * dumpfile.c (dump_open): Allow '-' for stdout.
20723         * doc/invoke.texi (Developer Options): Document dump filename
20724         determination early.  Document stdin/stdout selection.
20726 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
20728         Microblaze Target: PIC data text relative
20730         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20731         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20732         Add declaration.
20733         * config/microblaze/microblaze.h (microblaze_constant_address_p):
20734         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20735         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20736         New addressing mode for data-text relative position indepenedent code.
20737         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20738         'ADDRESS_SYMBOLIC_TXT_REL'.
20739         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20740         (microblaze_legitimate_pic_operand): Exclude function calls from
20741         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20742         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20743         addresses cases.
20744         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20745         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20746         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20747         for 'address + offset'.
20748         (microblaze_expand_prologue): Add new function prologue call for
20749         'r20' assignation.
20750         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20751         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20752         table in case of TARGET_PIC_DATA_TEXT_REL.
20753         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20754         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20755         Add new macros 'UNSPEC_TEXT',
20756         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20757         + exclude function calls from 'UNSPEC_PLT' in case of data text
20758         relative mode.
20759         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20760         new target hook for generating address diff vector tables in case of
20761         flag_pic.
20762         * doc/tm.texi : Regenerate.
20763         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
20764         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
20765         of addr diff vector generation.
20766         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20767         target hook definition.
20768         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
20769         Add default function for generate_pic_addr_diff_vec -> flag_pic.
20770         * doc/invoke.texi (Add new pic option): Add new microblaze pic
20771         option for data text relative.
20773 2018-04-30  Richard Biener  <rguenther@suse.de>
20775         * tree-chrec.h (evolution_function_is_constant_p): Remove
20776         redundant check.
20777         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
20779 2018-04-30  Richard Biener  <rguenther@suse.de>
20781         PR bootstrap/85571
20782         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
20784 2018-04-30  Richard Biener  <rguenther@suse.de>
20786         PR tree-optimization/28364
20787         PR tree-optimization/85275
20788         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
20789         copying first exit test.
20791 2018-04-28  Mark Wielaard  <mark@klomp.org>
20793         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
20794         dwarf_version >= 5.
20795         (dwarf_AT): Handle DW_AT_addr_base.
20796         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
20798 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
20800         PR target/84431
20801         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
20802         (*ashl<dwi>3_doubleword_mask_1): Ditto.
20803         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
20804         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
20806 2018-04-28  Richard Biener  <rguenther@suse.de>
20808         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
20809         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
20810         to reflect use.  Only add interesting stmts.
20812 2018-04-27  Martin Jambor  <mjambor@suse.cz>
20814         PR ipa/85549
20815         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
20816         the jump function allows for passing through aggregate values.
20818 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
20820         * input.h (in_system_header_at): Convert from macro to inline
20821         function.
20822         (from_macro_expansion_at): Likewise.
20823         (from_macro_definition_at): Likewise.
20825 2018-04-27  Jeff Law  <law@redhat.com>
20827         * config.gcc: Mark tile* targets as deprecated/obsolete.
20829 2018-04-27  Richard Biener  <rguenther@suse.de>
20831         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
20832         fix for ILP32.
20834 2018-04-27  Richard Biener  <rguenther@suse.de>
20836         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
20838 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
20840         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
20841         with Yd constraint. Set "preferred_for_speed" attribute from
20842         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
20843         with Yd constraint.
20844         (*movdi_internal): Ditto.
20845         (movti_interunit splitters): Remove
20846         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
20847         (movdi_interunit splitters): Ditto.
20848         * config/i386/constraints.md (Ye): Remove.
20849         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
20851 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20853         PR target/85512
20854         * config/aarch64/constraints.md (Usg): Limit to 31.
20855         (Usj): Limit to 63.
20857 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
20859         PR tree-optimization/85529
20860         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
20861         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
20862         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
20863         zero extension or masking of the MSB bit.
20864         (optimize_range_tests): Add FIRST_BB argument, pass it through
20865         to optimize_range_tests_var_bound.
20866         (maybe_optimize_range_tests, reassociate_bb): Adjust
20867         optimize_range_tests callers.
20869 2018-04-26  Richard Biener  <rguenther@suse.de>
20870             Jakub Jelinek  <jakub@redhat.com>
20872         * cgraph.h (symbol_table): Just declare debug method here.
20873         * symtab.c (symbol_table::debug): Define.
20875 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
20877         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
20879 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
20881         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
20882         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
20883         (*movdi_internal): Substitute Yi and Yj constraint with x
20884         and Ym and Yn constraint with y constraint.  Update "isa"
20885         attribute and set "preferred_for_speed" attribute from
20886         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
20887         (*movsi_internal): Ditto.
20888         (*movdf_internal): Ditto.
20889         (*movsf_internal): Ditto.
20890         (*zero_extendsidi2): Ditto.
20891         * config/i386/sse.md (vec_set<mode>_0): Ditto.
20892         (sse2_loadld): Ditto.
20893         (*vec_extract<ssevecmodelower>_0): Ditto.
20894         (*vec_extractv4si_0_zext_sse4): Ditto.
20895         (vec_concatv2di): Ditto.
20896         (*vec_dup<mode>): Ditto.
20897         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
20898         * config/i386/constraints.md (Yi): Remove.
20899         (Yj): Remove.
20900         (Ym): Remove.
20901         (Yn): Remove.
20903 2018-04-26  Nathan Sidwell  <nathan@acm.org>
20905         * dumpfile.c (dump_open): New.
20906         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
20907         (dump_finish): Detect stdio/stderr by value not name.
20909 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
20911         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
20913 2018-04-26  Tom de Vries  <tom@codesourcery.com>
20915         PR target/84952
20916         * config/nvptx/nvptx.c (verify_neutering_jumps)
20917         (verify_neutering_labels): New function
20918         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
20920 2018-04-26  Tom de Vries  <tom@codesourcery.com>
20922         PR target/84025
20923         * config/nvptx/nvptx.c (needs_neutering_p): New function.
20924         (nvptx_single): Use needs_neutering_p to skip over insns that do not
20925         need neutering.
20927 2018-04-26  Richard Biener <rguenther@suse.de>
20928             Tom de Vries  <tom@codesourcery.com>
20930         PR lto/85422
20931         * lto-streamer-out.c (output_function): Fixup loops if required to match
20932         discovery done in the reader.
20934 2018-04-26  Richard Biener  <rguenther@suse.de>
20936         PR tree-optimization/85116
20937         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
20938         have a loop exit from the single latch predecessor.  Remove
20939         case of header with just condition.
20940         (ch_base::copy_headers): Exclude infinite loops from any
20941         processing.
20942         (pass_ch::execute): Record exits.
20944 2018-04-26  Richard Biener  <rguenther@suse.de>
20946         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
20947         prologue cost vector and pass it to vect_get_load_cost.
20948         (vect_get_peeling_costs_all_drs): Likewise.
20949         (vect_peeling_hash_get_lowest_cost): Likewise.
20950         (vect_enhance_data_refs_alignment): Likewise.
20952 2018-04-26  Richard Biener  <rguenther@suse.de>
20954         PR middle-end/85450
20955         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
20956         checking of integer<->pointer conversions.
20957         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
20958         sign-/zero-extending pointer types.
20959         (expand_omp_for_static_chunk): Likewise.
20961 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
20962             Jean Lee  <xiaoyur347@gmail.com>
20964         * config/mips/mips.c (mips_asan_shadow_offset): New function.
20965         (TARGET_ASAN_SHADOW_OFFSET): Define.
20966         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
20967         true for -fsanitize=address.
20969 2018-04-25  Mark Wielaard  <mark@klomp.org>
20971         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
20972         shorter ones.
20974 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
20976         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
20977         than "alu", remove explicit "memory" and "imm_disp" attributes.
20978         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
20980         PR middle-end/85414
20981         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
20982         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
20983         gen_lowpart_no_emit.
20985 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
20987         PR target/85473
20988         * config/i386/i386.c (ix86_expand_builtin): Change memory
20989         operand to XI, extend p0 to Pmode.
20990         * config/i386/i386.md: Change unspec volatile and operand
20991         1 mode to XI, change operand 0 mode to P.
20993 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20995         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
20996         GET_MODE_MASK before any checking.
20997         (nds32_can_use_bset_p): Likewise.
20998         (nds32_can_use_btgl_p): Likewise.
21000 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
21002         * config/nds32/nds32-doubleword.md: New define_split pattern for
21003         illegal register number.
21005 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
21007         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
21009 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
21011         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
21013 2018-04-25  Richard Biener  <rguenther@suse.de>
21015         * lto-streamer.h (LTO_major_version): Bump to 8.
21017 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
21019         * BASE-VER: Set to 9.0.0.
21021 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
21023         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
21024         in __abskf2 and __powikf2.
21026 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21028         PR target/85512
21029         * config/aarch64/constraints.md (Usg, Usj): New constraints.
21030         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
21031         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
21032         Use the above on operand 2.  Reindent.
21033         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
21035 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
21037         PR target/85485
21038         * common/config/i386/i386-common.c (ix86_handle_option): Don't
21039         handle OPT_mcet.
21040         * config/i386/i386.opt (mcet): Removed.
21041         * doc/install.texi: Remove -mcet documentation.
21042         * doc/invoke.texi: Likewise.
21044 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
21046         PR target/85485
21047         * doc/install.texi: Remove -mcet from bootstrap-cet.
21049 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
21051         PR target/85511
21052         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
21053         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
21054         if TARGET_64BIT.
21056         PR target/85503
21057         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
21058         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
21059         containing a CONST_VECTOR.
21061 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
21063         * doc/install.texi: Update newlib dependency for nvptx.
21065 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
21067         PR target/85508
21068         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
21069         instead of INTVAL when shifting x left.
21071 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
21073         PR tree-optimization/85478
21074         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
21075         vect_grouped_store_supported for single element vectors.
21077 2018-04-24  Richard Biener  <rguenther@suse.de>
21079         PR target/85491
21080         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
21081         load cost increase to the case of non-constant step.
21083 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
21085         PR target/84828
21086         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
21087         destination if any_malformed_asm.
21089 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
21091         PR middle-end/85496
21092         * expr.c (store_field): In the bitfield case, if the value comes from
21093         a function call and is returned in registers by means of a PARALLEL,
21094         do not change the mode of the temporary unless BLKmode and VOIDmode.
21096 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
21098         PR rtl-optimization/85423
21099         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
21100         dependencies to debug insns when the previous insn is non-debug.
21102 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
21104         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
21105         enums into a single definition.
21106         (fls): Fix predicates and printing.
21107         (seti): Likewise.
21109 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
21111         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
21112         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
21113         and short u6 immediate.
21114         (check_if_valid_sleep_operand): Remove.
21115         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
21117 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
21119         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
21120         flag_always_save_lp condition.
21121         * config/nds32/nds32.opt (malways-save-lp): New option.
21123 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
21125         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
21126         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
21127         * config/nds32/nds32.h
21128         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
21129         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
21131 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
21133         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
21134         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
21136 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
21137             Chung-Ju Wu  <jasonwucj@gmail.com>
21139         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
21140         Declare.
21141         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
21142         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
21144 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
21146         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
21148 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
21150         * config/nds32/nds32-protos.h (nds32_data_alignment,
21151         nds32_local_alignment): Declare.
21152         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
21153         nds32_local_alignment): New functions.
21154         (TARGET_CONSTANT_ALIGNMENT): Define.
21155         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
21157 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
21159         * config/nds32/nds32.c
21160         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
21161         (TARGET_MODES_TIEABLE_P): Likewise.
21163 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
21165         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
21166         level Ofast and Og.
21168 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
21169             Chung-Ju Wu  <jasonwucj@gmail.com>
21171         * config/nds32/constants.md (unspec_volatile_element): Add enum values
21172         for unaligned access.
21173         * config/nds32/nds32-intrinsic.c: Implementation of expanding
21174         unaligned access.
21175         * config/nds32/nds32-intrinsic.md: Likewise.
21176         * config/nds32/nds32_intrinsic.h: Likewise.
21177         * config/nds32/nds32.h (nds32_builtins): Likewise.
21178         * config/nds32/nds32.opt (munaligned-access): New option.
21179         * config/nds32/nds32.c (nds32_asm_file_start): Display
21180         flag_unaligned_access status.
21182 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
21184         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
21185         -mno-relax is present.
21186         * config/riscv/linux.h (LINK_SPEC): Ditto.
21188 2018-04-20  Martin Sebor  <msebor@redhat.com>
21190         PR c/85365
21191         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
21192         for null pointers.
21193         (gimple_fold_builtin_stxcpy_chk): Same.
21194         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
21196 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
21198         PR target/85456
21199         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
21200         __powikf2 when long double is IEEE 128-bit.
21202 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
21204         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
21205         step to make sure stack always aligned.
21207 2018-04-20  Carl Love  <cel@us.ibm.com>
21209         PR target/83402
21210         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
21211         size check for arg0.
21213 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
21214             Tom de Vries  <tom@codesourcery.com>
21216         PR target/85445
21217         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
21218         Emit insns for calls too.
21219         (nvptx_find_par): Always look for worker-level predecessor insn.
21220         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
21221         calls.
21222         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21223         (nvptx_process_pars): Propagate frames for calls.
21225 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
21227         PR target/85469
21228         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21229         Removed.
21230         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21231         (ix86_handle_option): Don't handle OPT_mibt.
21232         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21233         __SHSTK__.
21234         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21235         has_ibt and ibt.
21236         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21237         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21238         (ix86_target_macros): Define __CET__ with flag_cf_protection
21239         for -fcf-protection.
21240         * config/i386/i386.c (isa2_opts): Remove -mibt.
21241         * config/i386/i386.h (TARGET_IBT): Removed.
21242         (TARGET_IBT_P): Likewise.
21243         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21244         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21245         * config/i386/i386.opt (mcet): Update help message.
21246         (mshstk): Likewise.
21247         (mibt): Removed.
21248         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
21249         -mcet as an alias for -mshstk.
21251 2018-04-20  Richard Biener <rguenther@suse.de>
21253         PR middle-end/85475
21254         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21255         complexity by forcing a single use of the multiply operand.
21257 2018-04-20  Martin Jambor  <mjambor@suse.cz>
21259         ipa/85449
21260         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21261         recursion dependency to only apply to non-clones.
21263 2018-04-20  Martin Jambor  <mjambor@suse.cz>
21265         ipa/85447
21266         * ipa-cp.c (create_specialized_node): Check that clones of
21267         self-recursive edges exist during IPA-CP.
21269 2018-04-19  Toon Moene  <toon@moene.org>
21271         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21272         by -O3.
21274 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
21276         PR tree-optimization/85467
21277         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21278         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
21279         VECTOR_CST element to type.
21281 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
21283         PR target/85397
21284         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21285         * config/i386/i386.md (builtin_setjmp_setup): Removed.
21286         (builtin_longjmp): Likewise.
21287         (save_stack_nonlocal): New pattern.
21288         (restore_stack_nonlocal): Likewise.
21290 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
21292         PR target/85404
21293         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21294         Replace ASM_OUTPUT_LABEL with fprintf.
21296 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
21298         PR target/85417
21299         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21300         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21301         * config/i386/i386-c.c (ix86_target_macros_internal): Also
21302         define __IBT__ and __SHSTK__ for -fcf-protection.
21303         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21304         TARGET_IBT.
21305         (ix86_trampoline_init): Likewise.
21306         (x86_output_mi_thunk): Likewise.
21307         (ix86_notrack_prefixed_insn_p): Likewise.
21308         (ix86_option_override_internal): Don't disallow -fcf-protection.
21309         * config/i386/i386.md (rdssp<mode>): Also enable for
21310         -fcf-protection.
21311         (incssp<mode>): Likewise.
21312         (nop_endbr): Likewise.
21313         * config/i386/i386.opt (mcet): Change help message to built-in
21314         functions only.
21315         (mibt): Likewise.
21316         (mshstk): Likewise.
21317         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21318         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
21319         enable CET built-in functions.
21321 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
21323         * common/config/i386/i386-common.c
21324         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21325         OPTION_MASK_ISA_MOVDIRI_UNSET,
21326         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21327         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21328         * config.gcc (movdirintrin.h): New header.
21329         * config/i386/cpuid.h (bit_MOVDIRI,
21330         bit_MOVDIR64B): New bits.
21331         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21332         and -mmvodir64b.
21333         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21334         (VOID, PVOID, PCVOID)): New function types.
21335         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21336         __builtin_ia32_directstoreu_u64,
21337         __builtin_ia32_movdir64b): New builtins.
21338         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21339         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21340         and -mmovdiri.
21341         (ix86_valid_target_attribute_inner_p): Ditto.
21342         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21343         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21344         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21345         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21346         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21347         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21348         (movdiri<mode>, movdir64b_<mode>): New.
21349         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21350         * config/i386/immintrin.h: Include movdirintrin.h.
21351         * config/i386/movdirintrin.h: New file.
21352         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21354 2018-04-19  Richard Biener  <rguenther@suse.de>
21356         PR middle-end/85455
21357         * cfg.c (clear_bb_flags): When loop state says we have
21358         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21360 2018-04-19  Richard Biener  <rguenther@suse.de>
21362         PR tree-optimization/84737
21363         * tree-vect-data-refs.c (vect_copy_ref_info): New function
21364         copying restrict info.
21365         (vect_setup_realignment): Use it.
21366         * tree-vectorizer.h (vect_copy_ref_info): Declare.
21367         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21368         the first DR to all generated stores.
21369         (vectorizable_load): Likewise for loads.
21371 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
21373         PR tree-optimization/85446
21374         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21375         the integral and pointer types to have the same precision.
21377         * doc/install.texi: Document --disable-cet being the default and
21378         --enable-cet=auto.
21380 2018-04-18  Martin Liska  <mliska@suse.cz>
21382         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21383         style.
21385 2018-04-18  Martin Liska  <mliska@suse.cz>
21387         Revert
21388         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
21390         PR ipa/83983
21391         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21392         arguments if they are comparable.
21394 2018-04-18  Martin Liska  <mliska@suse.cz>
21396         Revert
21397         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
21399         PR lto/84805
21400         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21401         incomplete types.
21403 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
21405         PR target/85388
21406         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21407         ENDBR after calling __morestack.
21409 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
21411         PR jit/85384
21412         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21413         by using gcc_base_ver to generate a gcc_driver_version, and use
21414         it when generating GCC_DRIVER_NAME.
21415         * configure: Regenerate.
21417 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
21419         PR target/81084
21420         * config.gcc: Obsolete powerpc*-*-*spe*.
21422 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21424         PR debug/84637
21425         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21426         (stabstr_D): Change type of unum from unsigned int to
21427         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
21428         type.
21430 2018-04-17  Jim Wilson  <jimw@sifive.com>
21432         PR 84856
21433         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21434         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21435         Set arg_pointer_offset after using pretend_args_size.
21437 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21439         PR rtl-optimization/85431
21440         * dse.c (record_store): Ignore zero width stores.
21442         PR sanitizer/85230
21443         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
21444         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21445         __builtin_stack_restore rather than after it.
21446         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21447         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21448         argument instead of virtual_dynamic_stack_rtx.
21450 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21452         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21453         New prototype.
21454         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21455         Add note to error message to explain internal mapping of overloaded
21456         built-in function name to non-overloaded built-in function name.
21457         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21458         function.
21460 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
21462         PR target/85424
21463         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21464         where the inputs overlap with the output.
21466 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21468         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21469         (=v, v) alternative and explicit "memory" attribute.
21470         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
21471         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21472         attributes.
21473         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21474         "sselog1" type instead of "sselog".
21475         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21476         "sselog".  Remove explicit "memory" attribute.
21477         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21478         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21479         attributes.
21480         (vec_extract_hi_v32hi): Merge all alternatives into one, use
21481         "sselog1" type instead of "sselog".  Remove explicit "memory"
21482         attribute.
21483         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21484         use "sselog1" type instead of "sselog".  Remove explicit "memory"
21485         attribute.
21486         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21487         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21488         attributes.
21489         (vec_extract_hi_v64qi): Merge all alternatives into one, use
21490         "sselog1" type instead of "sselog".  Remove explicit "memory"
21491         attribute.
21492         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21493         use "sselog1" type instead of "sselog".  Remove explicit "memory"
21494         attribute.
21496         PR target/85430
21497         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21499         PR middle-end/85414
21500         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21501         on a SUBREG.
21503 2018-04-17  Martin Jambor  <mjambor@suse.cz>
21505         PR ipa/85421
21506         * ipa-cp.c (create_specialized_node): Call
21507         expand_all_artificial_thunks if necessary.
21509 2018-04-17  Martin Liska  <mliska@suse.cz>
21511         PR lto/85405
21512         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21513         in message, remote space in between '_G' and '('.
21515 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21517         PR target/85281
21518         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21519         avx512f_vmcmp<mode>3<round_saeonly_name>,
21520         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21521         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21522         avx512f_rndscale<mode><round_saeonly_name>,
21523         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21524         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21525         Use %<iptr>2 instead of %2 for -masm=intel.
21526         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21527         avx512f_vcvttss2usi<round_saeonly_name>,
21528         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21529         -masm=intel.
21530         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21531         avx512f_vcvttsd2usi<round_saeonly_name>,
21532         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21533         Use %q1 instead of %1 for -masm=intel.
21534         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21535         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21536         of %3 for -masm=intel.
21537         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21538         -masm=intel.
21539         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21540         -masm=intel.
21541         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21542         -masm=intel.
21543         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21544         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21545         %g1.
21546         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21547         -masm=intel.
21548         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21549         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21550         %g1 and one with %0 and %1.
21551         (avx512er_vmrcp28<mode><round_saeonly_name>,
21552         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21553         %1 for -masm=intel.
21554         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21555         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21556         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21557         of %0 and %{%4%} for -masm=intel.
21558         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21559         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21560         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21561         order of %0 and %{%5%}%{z%} for -masm=intel.
21563 2018-04-17  Jan Hubicka  <jh@suse.cz>
21565         PR lto/85405
21566         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21568 2018-04-17  Martin Liska  <mliska@suse.cz>
21570         PR ipa/85329
21571         * multiple_target.c (create_dispatcher_calls): Set apostrophes
21572         for target_clone error message.  Make default implementation
21573         clone to be a local declaration.
21574         (separate_attrs): Add new argument and check for an empty
21575         string.
21576         (expand_target_clones): Handle it.
21577         (ipa_target_clone): Make redirection just for target_clones
21578         functions.
21580 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
21581             Tom de Vries  <tom@codesourcery.com>
21583         PR middle-end/84955
21584         * omp-expand.c (expand_oacc_for): Add dummy false branch for
21585         tiled basic blocks without omp continue statements.
21587 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
21589         PR target/83660
21590         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21591         vec_extract expression as having side effects to make sure it gets
21592         a cleanup point.
21594 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
21596         PR target/85403
21597         * config/i386/i386.c (get_builtin_code_for_version): Check
21598         error_mark_node.
21600 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
21602         PR target/84331
21603         * config.gcc: Support "skylake".
21604         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21605         PROCESSOR_SKYLAKE.
21606         * config/i386/i386.c (m_SKYLAKE): Define.
21607         (processor_target_table): Add "skylake".
21608         (ix86_option_override_internal): Add "skylake".
21609         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21610         PROCESSOR_CANNONLAKE.
21611         (get_builtin_code_for_version): Fix priority for
21612         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21613         PROCESSOR_SKYLAKE-AVX512.
21614         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21615         (processor_type): Add PROCESSOR_SKYLAKE.
21617 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
21618             Jason Merrill  <jason@redhat.com>
21620         PR c++/85112
21621         * convert.c (convert_to_integer_1): Use direct recursion for
21622         enumeral types and types with a precision less than the number
21623         of bits in their mode.
21625 2018-04-16  Julia Koval  <julia.koval@intel.com>
21627         PR target/84413
21628         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21629         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21631 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
21633         PR target/85293
21634         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21635         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21636         and -mno-direct-move.
21638 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
21640         PR target/83402
21641         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21642         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21643         Ensure negative shifts result in {0}.
21645 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
21647         PR rtl-optimization/79916
21648         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21649         regs (if any) to define how to gnerate SD moves when LRA is in
21650         progress.
21652 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
21654         PR rtl-optimization/85393
21655         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21656         * except.c (expand_dw2_landing_pad_for_region): Make static.
21657         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21658         a label and unconditional jump to old_bb, rather than
21659         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21660         basic block.
21662         PR rtl-optimization/85376
21663         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21664         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21665         instead of a specific value.
21667 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
21668             Bin Cheng  <bin.cheng@arm.com>
21670         PR tree-optimization/82965
21671         PR tree-optimization/83991
21672         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21673         by_profile_only parameter.
21674         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21675         information if the loop was predicted to iterate too many times.
21676         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21678 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
21680         PR lto/71991
21681         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21682         always inline.
21684 2018-04-13  Martin Liska  <mliska@suse.cz>
21685             Jakub Jelinek  <jakub@redhat.com>
21687         PR middle-end/81657
21688         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21689         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21690         * builtins.c (expand_builtin_memory_copy_args): Use
21691         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21692         handle dest_addr == pc_rtx.
21694 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
21696         PR target/85291
21697         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21698         asked to not generate direct moves.
21699         (fix_trunc<mode>si2_stfiwx): Similar.
21700         (fix_trunc<mode>si2_internal): Similar.
21702 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
21704         PR debug/83157
21705         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21706         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21707         lookup if dest in some wider mode is known to be const0_rtx and
21708         if so, record permanent equivalence for it to be ZERO_EXTEND of
21709         the narrower mode destination.
21711 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
21713         * lto-streamer-out.c (output_function): Revert 259346.
21714         * omp-expand.c (expand_oacc_for): Likewise.
21716 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
21718         PR rtl-optimization/85354
21719         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21720         * sel-sched.c (sel_global_init): ... here.
21722 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
21724         PR target/85238
21725         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21726         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21727         mode for PE-COFF targets.
21728         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21729         (i386_pe_asm_lto_end): Likewise.
21730         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21731         (TARGET_ASM_LTO_END): Likewise.
21732         * config/i386/winnt.c (saved_debug_info_level): New static variable.
21733         (i386_pe_asm_lto_start): New function.
21734         (i386_pe_asm_lto_end): Likewise.
21736 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
21737             Richard Biener  <rguenther@suse.de>
21739         PR middle-end/84955
21740         * lto-streamer-out.c (output_function): Fix CFG loop state before
21741         streaming out.
21742         * omp-expand.c (expand_oacc_for): Handle calls to internal
21743         functions like regular functions.
21745 2018-04-12  Richard Biener  <rguenther@suse.de>
21747         PR lto/85371
21748         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21749         for the early LTO debug to properly generate references to it
21750         during DIE emission.  Do not re-use that for the skeleton for
21751         split-dwarf.
21752         (dwarf2out_early_finish): Likewise.
21754 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
21756         PR target/85328
21757         * config/i386/sse.md
21758         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
21759         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
21760         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
21761         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
21762         and output is a reg, avoid creating invalid lowpart subreg, but
21763         instead split into a 512-bit move.  Don't split if not AVX512VL,
21764         input is xmm16+ reg and output is a mem.
21765         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
21766         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
21767         xmm16+ reg and output is a mem.
21769 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21771         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
21772         also for flag_dwarf2_cfi_asm.
21774 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
21776         PR rtl-optimization/85342
21777         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
21778         a bool scalar var inside of the loop instead.  Don't try to update
21779         recog_data.operand after failed apply_change_group.
21781 2018-04-12  Tom de Vries  <tom@codesourcery.com>
21783         PR target/85296
21784         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
21785         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
21786         array with flexible array member as array without given dimension.
21787         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
21788         argument for undefined param to true.
21790 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
21792         PR target/85321
21793         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21794         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
21795         from PowerPC section.
21796         * config/rs6000/sysv4.opt (mcall-): Improve help text.
21797         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
21798         help text that is too long.
21799         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
21800         help text that is too long.
21801         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
21802         help text that is too long.
21804 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
21806         * config/alpha/alpha.md (stack_probe_internal): Rename
21807         from "probe_stack".  Update all callers.
21809 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
21811         PR rtl-optimization/84566
21812         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
21813         sched_macro_fuse_insns.
21815 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
21817         PR target/84301
21818         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
21819         (compute_block_dependences): ... from here.
21821 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21823         PR tree-optimization/85331
21824         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
21825         from int to HOST_WIDE_INT.
21827 2018-04-11  Martin Jambor  <mjambor@suse.cz>
21829         PR ipa/84149
21830         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
21831         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
21832         not the same as the source val.
21833         (cgraph_edge_brings_value_p): New parameter.
21834         (gather_edges_for_value): Pass destination value to
21835         cgraph_edge_brings_value_p.
21836         (perhaps_add_new_callers): Likewise.
21837         (get_info_about_necessary_edges): Likewise and exclude values brought
21838         only by self-recursive edges.
21839         (create_specialized_node): Redirect only clones of self-calling edges.
21840         (+self_recursive_pass_through_p): New function.
21841         (find_more_scalar_values_for_callers_subset): Use it.
21842         (find_aggregate_values_for_callers_subset): Likewise.
21843         (known_aggs_to_agg_replacement_list): Removed.
21844         (decide_whether_version_node): Re-calculate known constants for all
21845         remaining context clones.
21847 2018-04-11  Richard Biener  <rguenther@suse.de>
21849         PR lto/85339
21850         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
21851         from early DWARF output.
21852         (dwarf2out_early_finish): Output line info unconditionally into
21853         early DWARF and add reference to it.
21855 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21857         PR target/85281
21858         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
21859         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
21860         other than V2DFmode using iptr mode attribute.
21861         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
21863 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
21865         PR rtl-optimization/84659
21866         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
21868 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21870         PR debug/85302
21871         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
21872         SIZEP is NULL.
21873         (output_loc_list): Pass address of a dummy size variable even in the
21874         locview handling loop.
21875         (index_location_lists): Add comment on why skip_loc_list_entry can't
21876         call size_of_locs.
21878 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21880         PR target/85261
21881         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
21882         into register.
21884 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
21886         PR target/85321
21887         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21888         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
21889         and -mstring-compare-inline-limit.
21891 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21893         PR target/85287
21894         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
21895         for stack clash protection in a register whenever we need it to be in
21896         a register.
21898 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21900         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
21901         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
21903 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21905         PR target/85321
21906         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
21907         the help text.
21908         (mlong-double-): Ditto.
21909         * config/rs6000/sysv4.opt (msdata=): Ditto.
21910         (mtls-size=): Ditto.
21912 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21914         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
21915         erroneous entries for
21916         "vector int vec_ldl (int, long int *)", and
21917         "vector unsigned int vec_ldl (int, unsigned long int *)".
21918         Add comments and entries for
21919         "vector bool char vec_ldl (int, bool char *)",
21920         "vector bool short vec_ldl (int, bool short *)",
21921         "vector bool int vec_ldl (int, bool int *)",
21922         "vector bool long long vec_ldl (int, bool long long *)",
21923         "vector pixel vec_ldl (int, pixel *)",
21924         "vector long long vec_ldl (int, long long *)",
21925         "vector unsigned long long vec_ldl (int, unsigned long long *)".
21926         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
21927         type tree bool_long_long_type_node and correct definition of
21928         bool_V2DI_type_node to make reference to this new type tree.
21929         (rs6000_mangle_type): Replace erroneous reference to
21930         bool_long_type_node with bool_long_long_type_node.
21931         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
21932         comments to emphasize sign distinctions for char and int types and
21933         replace RS6000_BTI_bool_long constant with
21934         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
21935         use of RS6000_BTI_pixel.
21936         (bool_long_type_node): Remove this macro definition.
21937         (bool_long_long_type_node): New macro definition
21939 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
21941         PR rtl-optimization/85300
21942         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
21943         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
21944         simplify_unary_operation fails.
21946 2018-04-10  Martin Liska  <mliska@suse.cz>
21948         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
21949         cgraph_edge and ipa_ref.
21951 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
21953         PR target/85177
21954         PR target/85255
21955         * config/i386/sse.md
21956         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
21957         computation of the VEC_MERGE selector from mask.
21958         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
21959         Fix decoding of the VEC_MERGE selector into mask.
21961 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
21963         PR tree-optimization/85286
21964         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
21966 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
21968         * final.c (final_1): Set insn_last_address as well as
21969         insn_current_address.
21971 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21973         PR target/85173
21974         * explow.c (emit_stack_probe): Call validize_mem on memory location
21975         before passing it to gen_probe_stack.  Create address operand and
21976         legitimize it for the probe_stack_address case.
21978 2018-04-09  Jan Hubicka  <jh@suse.cz>
21980         PR lto/85078
21981         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
21982         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
21983         * tree.c (free_lang_data_in_type): Fix handling of binfos;
21984         walk basetypes.
21985         (free_lang_data): Rebuild type inheritance graph.
21987 2018-04-09  Martin Sebor  <msebor@redhat.com>
21989         * invoke.texi (-finline-small-functions): Mention other optimization
21990         options.
21991         (-findirect-inlining, -fpartial-inlining): Same.
21992         (-finline-functions-called-once): Same.
21993         (-freorder-blocks-and-partition): Same.
21995 2018-04-09  Jan Hubicka  <jh@suse.cz>
21997         PR rtl/84058
21998         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
21999         jumps; choose last target that matches the criteria (i.e.
22000         no partition changes for non-crossing jumps).
22001         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
22002         support for redirecting crossing jumps to non-crossing.
22004 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
22006         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
22007         also for naked functions.
22009 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
22011         * config/arc/arc.md (add_shift): New pattern.
22012         (add_shift2): Likewise.
22013         (sub_shift): Likewise.
22014         (sub_shift_cmp0_noout): Likewise.
22015         (compare_si_ashiftsi): Likewise.
22016         (xbfu_cmp0_noout): New combine pattern.
22017         (xbfu_cmp0"): Likewise.
22018         (movsi_set_cc_insn): Place the predicable variant first.
22019         (commutative_binary_cmp0_noout): Remove clobber.
22020         (commutative_binary_cmp0): New pattern.
22021         (noncommutative_binary_cmp0): Likewise.
22022         (noncommutative_binary_cmp0_noout): Likewise.
22023         (noncommutative_binary_comparison_result_used): Removed.
22024         (rsub_cmp0): New pattern.
22025         (rsub_cmp0_noout): Likewise.
22026         (extzvsi): Changed, keep only meaningful variants.
22027         (SQH, SEZ): New iterators.
22028         (SQH_postfix): New mode attribute.
22029         (SEZ_prefix): New code attribute.
22030         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
22031         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
22032         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
22033         of numerical value.
22034         (noncommutative_operator): Check the availability of barrel
22035         shifter option.
22037 2018-04-09  Richard Biener  <rguenther@suse.de>
22039         PR tree-optimization/85284
22040         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
22041         Only use the niter constraining form of simple_iv when the exit
22042         is always executed.
22044 2018-04-09  Tom de Vries  <tom@codesourcery.com>
22046         PR target/84041
22047         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22048         (define_expand "*memory_barrier"): New define_expand.
22049         (define_insn "memory_barrier"): New insn.
22051 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
22053         PR rtl-optimization/80463
22054         PR rtl-optimization/83972
22055         PR rtl-optimization/83480
22057         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
22058         correct producer for the insn.
22059         (tidy_control_flow): Fixup seqnos in case of debug insns.
22061 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
22063         PR rtl-optimization/83913
22065         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
22066         different sched-times when merging exprs.
22068 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
22070         PR rtl-optimization/83962
22072         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
22073         tidy_fallthru_edge and tidy_control_flow.
22075 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
22077         PR rtl-optimization/83530
22079         * sel-sched.c (force_next_insn): New global variable.
22080         (remove_insn_for_debug): When force_next_insn is true, also leave only
22081         next insn in the ready list.
22082         (sel_sched_region): When the region wasn't scheduled, make another pass
22083         over it with force_next_insn set to 1.
22085 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
22087         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
22088         into tm_file.
22089         * config/nds32/constants.md (unspec_volatile_element): Add enum values
22090         for interrupt control.
22091         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22092         functions for interrupt control.
22093         * config/nds32/nds32-intrinsic.md: Likewise.
22094         * config/nds32/nds32_intrinsic.h: Likewise.
22095         * config/nds32/nds32.h (nds32_builtins): Likewise.
22097 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
22099         * config/nds32/nds32.c (nds32_init_machine_status,
22100         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
22101         strict_aligned_p field.
22102         (nds32_expand_to_rtl_hook): New function.
22103         (TARGET_EXPAND_TO_RTL_HOOK): Define.
22104         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
22106 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
22107             Chung-Ju Wu  <jasonwucj@gmail.com>
22109         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
22110         * config/nds32/nds32-n7.md: New file.
22111         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
22112         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
22113         pipeline.
22114         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
22115         * config/nds32/nds32.md (pipeline_model): Add n7.
22116         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
22117         * config/nds32/pipelines.md: Include n7 settings.
22119 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
22120             Chung-Ju Wu  <jasonwucj@gmail.com>
22122         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
22123         * config/nds32/nds32-e8.md: New file.
22124         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
22125         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
22126         pipeline.
22127         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
22128         * config/nds32/nds32.md (pipeline_model): Add e8.
22129         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
22130         * config/nds32/pipelines.md: Include e8 settings.
22132 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
22133             Chung-Ju Wu  <jasonwucj@gmail.com>
22135         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
22136         * config/nds32/nds32-n8.md: New file.
22137         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
22138         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
22139         pipeline.
22140         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
22141         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
22142         * config/nds32/nds32.md (pipeline_model): Add n8.
22143         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
22144         * config/nds32/pipelines.md: Include n8 settings.
22146 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
22147             Chung-Ju Wu  <jasonwucj@gmail.com>
22149         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
22150         * config/nds32/nds32-n9-2r1w.md: New file.
22151         * config/nds32/nds32-n9-3r2w.md: New file.
22152         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
22153         nds32_register_ports): New or modify for cpu n9.
22154         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
22155         pipeline.
22156         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
22157         * config/nds32/nds32-utils.c: New file.
22158         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
22159         TARGET_MUL_SLOW): Define.
22160         * config/nds32/nds32.md (pipeline_model): New attribute.
22161         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
22162         New options that support cpu n9.
22163         * config/nds32/pipelines.md: Include n9 settings.
22164         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
22166 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
22168         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
22169         information if necessary.
22170         (output_cond_branch_compare_zero): Likewise.
22171         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
22172         (nds32_target_alignment): Refine for alignment.
22173         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
22174         (FUNCTION_BOUNDARY): Modify.
22175         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
22176         align case.
22177         * config/nds32/nds32.opt (malways-align, malign-functions): New.
22179 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
22181         * config/nds32/constants.md (unspec_volatile_element): Add values for
22182         TLB operation and data prefetch.
22183         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22184         functions for TLB operation and data prefetch.
22185         * config/nds32/nds32-intrinsic.md: Likewise.
22186         * config/nds32/nds32_intrinsic.h: Likewise.
22187         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
22188         (nds32_print_operand): Likewise.
22189         * config/nds32/nds32.h (nds32_builtins): Likewise.
22191 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
22192         Andrew Pinski <pinsika@gcc.gnu.org>
22194         PR middle-end/82976
22195         * match.pd: Use constant_boolean_node of correct type instead of
22196         boolean_true_node or boolean_false_node for simplifying
22197         pointer comparisons to zero.
22199 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
22201         PR tree-optimization/80021
22202         * tree.c (verify_type_variant): Make error call in verify_variant_match
22203         translatable and remove final full stop.
22205 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22207         * config/nds32/constants.md (unspec_volatile_element): Add
22208         UNSPEC_VOLATILE_EH_RETURN.
22209         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
22210         nds32_output_stack_pop): Support dwarf exception handling process.
22211         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
22212         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
22213         exception handling process.
22214         (nds32_compute_stack_frame): Likewise.
22215         (nds32_return_addr_rtx): Likewise.
22216         (nds32_initial_elimination_offset): Likewise.
22217         (nds32_expand_prologue): Likewise.
22218         (nds32_expand_epilogue): Likewise.
22219         (nds32_dynamic_chain_address): New function.
22220         * config/nds32/nds32.h (machine_function): Add fields for dwarf
22221         exception handling.
22222         (DYNAMIC_CHAIN_ADDRESS): Define.
22223         (EH_RETURN_DATA_REGNO): Define.
22224         (EH_RETURN_STACKADJ_RTX): Define.
22225         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22226         patterns for dwarf exception handling.
22228 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22230         * config/nds32/nds32.h: Clean up obsolete macros.
22232 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22234         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22235         Add enum values for particular instructions.
22236         * config/nds32/nds32-intrinsic.c: Implementation of expanding
22237         particular intrinsic functions.
22238         * config/nds32/nds32-intrinsic.md: Likewise.
22239         * config/nds32/nds32_intrinsic.h: Likewise.
22240         * config/nds32/nds32.h (nds32_builtins): Likewise.
22241         * config/nds32/nds32.md (type): Add pbsad and pbsada.
22242         (btst, ave): New patterns for particular instructions.
22244 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22246         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22247         Add enum values for atomic load/store and memory sync.
22248         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22249         and memory sync.
22250         * config/nds32/nds32-intrinsic.md: Likewise.
22251         * config/nds32/nds32_intrinsic.h: Likewise.
22252         * config/nds32/nds32.h (nds32_builtins): Likewise.
22254 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
22256         PR tree-optimization/85257
22257         * fold-const.c (native_encode_vector): If not all elts could fit
22258         and off is -1, return 0 rather than offset.
22259         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22260         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22261         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
22262         adjust buffer in native_interpret_expr call.
22264 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22266         * config/nds32/constants.md (unspec_volatile_element): Add cache
22267         control enum values.
22268         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22269         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22270         * config/nds32/nds32.c (nds32_cctl_names): New.
22271         (nds32_print_operand): Handle cache control register names.
22272         * config/nds32/nds32.h (nds32_builtins): New enum values.
22273         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22274         macros.
22275         * config/nds32/nds32.md (type): Add mmu.
22276         * config/nds32/pipelines.md (simple_insn): Add mmu.
22278 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22280         * config/nds32/nds32.md (type): Remove call.
22281         * config/nds32/pipelines.md (simple_insn): Likewise.
22283 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22285         * config/nds32/constants.md (unspec_volatile_element): Add
22286         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22287         UNSPEC_VOLATILE_FMFCFG.
22288         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22289         description for fmfcfg and fmfcsr.
22290         (bdesc_1arg): Add fmtcsr.
22291         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22292         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22293         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22294         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22295         unspec_fmfcfg): New patterns.
22296         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22297         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22298         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22299         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22300         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22301         __nds32__fmfcfg): Define.
22303 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22305         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22306         intrinsic register names.
22307         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22308         intrinsic register enum values and macros.
22310 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22312         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22313         for load/store addressing form.
22314         (nds32_print_operand_address): Likewise.
22316 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
22318         PR target/85196
22319         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22320         based on LABEL_REF.  Remove useless assertion.
22321         (pic_address_needs_scratch): Fix formatting.
22322         (sparc_legitimize_pic_address): Minor tweaks.
22323         (sparc_delegitimize_address): Adjust assertion accordingly.
22324         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22325         into symbolic_operand.
22326         (movsi_high_pic_label_ref): Likewise.
22327         (movsi_lo_sum_pic_label_ref): Likewise.
22328         (movdi_pic_label_ref): Likewise.
22329         (movdi_high_pic_label_ref): Likewise.
22330         (movdi_lo_sum_pic_label_ref): Likewise.
22332 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
22334         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22335         custom LIB_SPEC setup.
22337 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
22338             Kito Cheng  <kito.cheng@gmail.com>
22340         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22341         * config/riscv/freebsd.h: New.
22343 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22345         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22346         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22347         file.
22349 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22350             Kito Cheng  <kito.cheng@gmail.com>
22352         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22353         nds32_output_call, nds32_symbol_binds_local_p): New functions.
22354         * config/nds32/nds32-protos.h (nds32_output_call,
22355         nds32_output_return): Declare.
22356         * config/nds32/nds32.md: Refine all the call and return patterns.
22358 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
22360         PR debug/85252
22361         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22362         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22364         PR rtl-optimization/84872
22365         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22366         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22367         EDGE_CROSSING edge.
22369 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
22371         * expr.c (copy_blkmode_to_reg): Revert 254862.
22372         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22374 2018-04-06  Richard Biener  <rguenther@suse.de>
22376         PR middle-end/85244
22377         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22378         after seeing a component reference with an adjacent field.  Treat
22379         refs to arrays at struct end of external decls similar to
22380         refs to unconstrained commons.
22382 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
22384         PR sanitizer/85213
22385         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22386         look through SAVE_EXPRs with non-side-effects argument.  Adjust
22387         recursive calls.
22388         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22389         save_p here.
22391 2018-04-06  Richard Biener  <rguenther@suse.de>
22393         PR middle-end/85180
22394         * alias.c (find_base_term): New wrapper around find_base_term
22395         unwinding CSELIB_VAL_PTR changes.
22396         (find_base_term): Do not restore CSELIB_VAL_PTR during the
22397         recursion.
22399 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22401         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22402         instructions.
22403         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22404         constant definitions.
22405         ("nop"): lr 0,0 -> nopr r0
22406         ("nop_lr0", "nop_lr1"): New insn definitions.
22408 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22410         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22411         NDS32_V3PUSH_AVAILABLE_P macro.
22413 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
22414             Chung-Ju Wu  <jasonwucj@gmail.com>
22416         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22417         (nds32*-*-*): Add float and fpu_config into supported_defaults.
22418         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22419         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22420         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22421         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22422         * config/nds32/constraints.md: New constraints and checking for hard
22423         float configuration.
22424         * config/nds32/iterators.md: New mode iterator and attribute for hard
22425         float configuration.
22426         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22427         patterns.
22428         * config/nds32/nds32-fpu.md: New file.
22429         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22430         deal with hard float code generation.
22431         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22432         ARCH_V3S.
22433         (abi_type, float_reg_number): New enum type.
22434         * config/nds32/nds32-predicates.c: New predicates for hard float.
22435         * config/nds32/nds32-protos.h: Declare functions for hard float.
22436         * config/nds32/nds32.c: Implementation for hard float configuration.
22437         * config/nds32/nds32.h: Definitions for hard float configuration.
22438         * config/nds32/nds32.md: Include hard float machine description and
22439         modify patterns for hard float configuration.
22440         * config/nds32/nds32.opt: New options for hard float configuration.
22441         * config/nds32/predicates.md: New predicates for hard float
22442         configuration.
22444 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
22446         * common/config/nds32/nds32-common.c
22447         (nds32_option_optimization_table): Enable -mreleax-hint by default.
22449 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
22451         PR middle-end/85195
22452         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22453         CONSTRUCTOR_ELT (ctor, ...)->value.
22455 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
22457         PR target/85193
22458         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22460 2018-04-05  Tom de Vries  <tom@codesourcery.com>
22462         PR target/85204
22463         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22464         cond jump.
22466 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
22467             Kito Cheng  <kito.cheng@gmail.com>
22469         * config/nds32/constraints.md (U33): Fine-tune checking condition.
22470         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22471         * config/nds32/nds32.h (nds32_16bit_address_type): Add
22472         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22474 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
22475             Kito Cheng  <kito.cheng@gmail.com>
22477         * config/nds32/constraints.md (Ufe): New memory constraint.
22478         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22479         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22480         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22481         operands.
22482         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22483         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22485 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22487         * config/nds32/nds32.md: Use optimize_size in the condition for
22488         alu-shift instructions.
22490 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22492         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22494 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22496         * config/nds32/nds32.md (negsi2): Refine pattern.
22498 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
22499             Chung-Ju Wu  <jasonwucj@gmail.com>
22501         * config/nds32/iterators.md (shift_rotate): New code iterator.
22502         (shift): New code attribute.
22503         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22504         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22505         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22506         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22507         bit-wise operations.
22508         (andsi3, *andsi3): Ditto.
22509         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22510         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22511         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22512         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22513         nds32_ior_operand, nds32_xor_operand): New predicates.
22515 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22517         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22518         (addsi3, subsi3): ... this.
22520 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22522         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22524 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22526         * config/nds32/nds32.md: Adjust indention.
22528 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
22530         * config/nds32/nds32.md (feature): New attribute.
22532 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22534         * config/nds32/nds32.md (subtype): New attribute.
22536 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22538         PR target/85203
22539         * config/arm/arm-builtins.c (arm_expand_builtin): Change
22540         expansion to perform a bitwise AND of the argument followed by a
22541         boolean negation of the result.
22543 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
22545         PR rtl-optimization/84878
22546         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22547         the basic block.  Assert the use reference is not artificial and that
22548         it has an associated insn.
22550 2018-04-04  Michael Matz  <matz@suse.de>
22552         * builtins.c (compute_objsize): Pass correct operand
22553         to array_at_struct_end_p.
22555 2018-04-04  Richard Biener  <rguenther@suse.de>
22557         PR lto/85176
22558         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22559         from contexts for DINFO_LEVEL_TERSE and below.
22561 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22563         * config/nds32/nds32-doubleword.md (move_<mode>): Require
22564         resiter_operand condition.
22565         * config/nds32/nds32.md (*move<mode>): Ditto.
22567 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22568             Monk Chiang  <sh.chiang04@gmail.com>
22570         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22572 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22574         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
22576 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22577             Kito Cheng  <kito.cheng@gmail.com>
22579         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
22580         nds32_cond_code_str, output_cond_branch,
22581         output_cond_branch_compare_zero, nds32_expand_cbranch,
22582         nds32_expand_cstore, nds32_expand_movcc,
22583         nds32_output_cbranchsi4_equality_zero,
22584         nds32_output_cbranchsi4_equality_reg,
22585         nds32_output_cbranchsi4_equality_reg_or_const_int,
22586         nds32_output_cbranchsi4_greater_less_zero: New functions.
22587         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22588         nds32_expand_cstore, nds32_expand_movcc,
22589         nds32_output_cbranchsi4_equality_zero,
22590         nds32_output_cbranchsi4_equality_reg,
22591         nds32_output_cbranchsi4_equality_reg_or_const_int,
22592         nds32_output_cbranchsi4_greater_less_zero): Declare.
22593         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22594         nds32_rimm11s_operand): New predicates.
22595         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22596         * config/nds32/nds32.md: Rewrite all the branch and conditional move
22597         patterns.
22599 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22601         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22602         * config/nds32/nds32.md: Ditto.
22603         * config/nds32/pipelines.md: Ditto.
22605 2018-04-04  Richard Biener  <rguenther@suse.de>
22607         PR tree-optimization/85168
22608         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22609         propagating abnormals.
22611 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22613         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22615 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22616             Kito Cheng  <kito.cheng@gmail.com>
22618         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22619         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22620         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22621         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22622         * config/nds32/nds32.md (sibcall_internal): New.
22623         (sibcall_register): Remove.
22624         (sibcall_immediate): Remove.
22625         (sibcall_value_internal): New.
22626         (sibcall_value_register): Remove.
22627         (sibcall_value_immediate): Remove.
22628         * config/nds32/predicates.md (nds32_general_register_operand): New.
22629         (nds32_call_address_operand): New.
22631 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
22633         PR rtl-optimization/85167
22634         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22635         bb_defs if *split_p, instead preinitialize it to NULL.
22637         PR tree-optimization/85156
22638         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22639         evaluating the argument multiple times.
22641 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
22643         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22644         than vector.
22645         (_mm_cvtpd_ps): Likewise.
22646         (_mm_cvttpd_epi32): Likewise.
22647         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22648         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22649         vector, pixel, and bool following altivec.h include.
22651 2018-04-03  Martin Sebor  <msebor@redhat.com>
22653         * doc/extend.texi (Common Function Attributes): Clarify.
22654         (const attribute): Likewise.
22655         (pure attribute): Likewise.
22657 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
22659         PR target/85169
22660         * config/i386/i386.c (ix86_expand_vector_set): Use
22661         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
22663 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
22665         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22666         instructions when changing rounding bits to preserve precision bits
22667         in the x87 control word.
22669 2018-04-03  Martin Liska  <mliska@suse.cz>
22671         PR tree-optimization/82491
22672         * rtl.h (strip_offset_and_add): Replace += suboffset with
22673         poly_uint64 () + suboffset.
22675 2018-03-29  Martin Liska  <mliska@suse.cz>
22676             Martin Jambor  <mjambor@suse.cz>
22678         PR ipa/84947
22679         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22680         param_type is not an integral or pointer type.
22682 2018-04-03  Richard Biener  <rguenther@suse.de>
22684         * sese.h (recompute_all_dominators): Remove.
22686 2018-04-02  Martin Sebor  <msebor@redhat.com>
22688         * doc/invoke.texi (-Wrestrict): Fix typos.
22690 2018-04-02  Jim Wilson  <jimw@sifive.com>
22692         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22693         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22694         (<optab>di3, <optab>si3_extend): Likewise.
22695         (<optab>si3_mask, <optab>si3_mask_1): New.
22696         (<optab>di3_mask, <optab>di3_mask_1): New.
22697         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22698         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22699         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22701 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
22703         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22704         example.
22706 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
22708         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22709         (nds32_canonicalize_comparison): New function.
22711 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
22712             Kito Cheng  <kito.cheng@gmail.com>
22713             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
22715         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22716         * config/nds32/constants.md (unspec_volatile_element): Add
22717         UNSPEC_VOLATILE_RELAX_GROUP.
22718         * config/nds32/nds32-relax-opt.c: New file.
22719         * config/nds32/nds32-predicates.c
22720         (nds32_symbol_load_store_p): New function.
22721         * config/nds32/nds32-protos.h
22722         (nds32_symbol_load_store_p): Declare function.
22723         (make_pass_nds32_relax_opt): Declare new rtl pass function.
22724         * config/nds32/nds32.c
22725         (nds32_register_pass): New function to register pass.
22726         (nds32_register_passes): New function to register passes.
22727         * config/nds32/nds32.md (relax_group): New pattern.
22728         * config/nds32/nds32.opt (mrelax-hint): New option.
22729         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22731 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
22733         * config/nds32/t-nds32: Modify files dependency.
22735 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
22737         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22738         (PROFILE_HOOK): Define its implementation.
22740 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
22742         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22743         type and 32-bit size.
22745 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
22747         PR middle-end/85090
22748         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22749         (V_128_256): New mode iterator.
22750         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22751         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22752         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22753         of V.
22754         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22755         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22757 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
22759         PR target/83315
22760         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
22761         NaN inputs correctly.
22763 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
22765         PR target/80546
22766         * config/rs6000/vsx.md (??r): New mode attribute.
22767         (*vsx_mov<mode>_64bit): Use it.
22768         (*vsx_mov<mode>_32bit): Likewise.
22770 2018-03-30  Martin Sebor  <msebor@redhat.com>
22772         PR tree-optimization/84818
22773         * builtins.c (check_access): Use warning_n.
22775 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22777         PR target/83822
22778         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
22779         condition.
22780         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
22781         condition.
22783 2018-03-30  Julia Koval  <julia.koval@intel.com>
22785         PR target/84413
22786         * x86-tune.def (movx, partial_reg_dependency): Enable for
22787         m_SKYLAKE_AVX512.
22789 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
22791         PR inline-asm/84985
22792         * lra-constraints.c (process_alt_operands): Move setting
22793         this_alternative_matches below.
22795 2018-03-29  Martin Liska  <mliska@suse.cz>
22797         PR lto/84995.
22798         * doc/invoke.texi: Document how LTO works with debug info.
22799         Describe auto-load support of binutils.  Mention 'x86-64'
22800         as valid option value of -march option.
22802 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
22804         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
22806         PR c/85094
22807         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
22808         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
22809         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
22810         checking.
22812 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
22814         PR target/84912
22815         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
22816         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
22817         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
22818         for RS6000_BTM_POWERPC64.
22819         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
22820         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
22821         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
22822         definition.
22823         (DIVDE): Use it.
22824         (DIVDEU): Likewise.
22826 2018-03-28  Carl Love  <cel@us.ibm.com>
22828         Revert
22829         2017-09-27  Carl Love  <cel@us.ibm.com>
22831         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
22832         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
22833         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
22834         fctiw instruction.
22836 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22838         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
22839         instead of __vector bool.
22840         (_mm_max_pu8): Likewise.
22841         (_mm_min_pi16): Likewise.
22843 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
22845         PR target/84912
22846         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
22847         (DIVWEUO): Likewise.
22848         (DIVDEO): Likewise.
22849         (DIVDEUO): Likewise.
22850         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
22851         DIVWEUO and DIVDEUO.
22852         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
22853         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
22854         (div_extend): Likewise.
22855         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
22856         builtin function.
22857         (__builtin_divweuo): Likewise.
22858         (__builtin_divdeo): Likewise.
22859         (__builtin_divdeuo): Likewise.
22861 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
22863         PR target/85095
22864         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
22865         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
22867         PR tree-optimization/82004
22868         * gimple-match-head.c (optimize_pow_to_exp): New function.
22869         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
22870         Don't fold to exp if optimize_pow_to_exp is false.
22872 2018-03-28  Martin Liska  <mliska@suse.cz>
22874         PR other/84819
22875         * calls.c (initialize_argument_information): Fix trailing space.
22876         * common.opt: Fix typo and provide better explanation for
22877         -fsanitize-coverage option.
22878         * config/i386/i386.opt: Fix typo.
22880 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
22881             Martin Liska  <mliska@suse.cz>
22883         PR sanitizer/85081
22884         * gimplify.c (asan_poison_variable): Don't do the check for
22885         gimplify_omp_ctxp here.
22886         (gimplify_decl_expr): Do it here.
22887         (gimplify_target_expr): Likewise.
22889 2018-03-28  Martin Liska  <mliska@suse.cz>
22891         PR target/84988
22892         * config/i386/i386.c (ix86_function_arg_advance): Do not call
22893         chkp_type_bounds_count if MPX is not enabled.
22895 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
22897         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
22899 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
22901         PR target/84914
22902         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
22903         function to create the function decl for complex long double
22904         multiply and divide for -mabi=ieeelongdouble.
22905         (init_float128_ieee): Call it.
22907 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
22909         PR target/85044
22910         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
22911         -fcf-protection=branch -mibt.
22912         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
22914 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22916         PR target/81863
22917         * config/arm/arm.c (arm_valid_symbolic_address): Handle
22918         arm_word_relocations.
22920 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
22922         PR target/85056
22923         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
22924         extern array declarations.
22926 2018-03-27  Richard Biener  <rguenther@suse.de>
22928         PR middle-end/84067
22929         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
22930         explicit single_use checks.
22932 2018-03-27  Richard Biener  <rguenther@suse.de>
22934         PR tree-optimization/85082
22935         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
22936         Valueize the VUSE.
22938 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22940         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
22941         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
22942         Turn on fasynchronous-unwind-tables and funwind-tables.
22944 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
22946         PR target/85073
22947         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
22948         (*bmi_blsr_<mode>_ccz): Ditto.
22950 2018-03-26  Tom de Vries  <tom@codesourcery.com>
22952         PR tree-optimization/85063
22953         * omp-general.c (offloading_function_p): New function.  Factor out
22954         of ...
22955         * omp-offload.c (pass_omp_target_link::gate): ... here.
22956         * omp-general.h (offloading_function_p): Declare.
22957         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
22958         with attribute omp declare target for offloading functions.
22960 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
22962         PR tree-optimization/84005
22963         * tree-data-ref.h (get_base_for_alignment): Declare.
22964         * tree-data-ref.c (get_base_for_alignment_1): New function.
22965         (get_base_for_alignment): Likewise.
22966         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
22967         get_base_for_alignment to find a suitable base object, instead
22968         of always using drb->base_address.
22970 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
22972         PR inline-asm/85022
22973         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
22974         known size by default.
22976 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
22978         PR inline-asm/85030
22979         * lra-constraints.c (process_alt_operands): Don't match BLKmode
22980         and non BLKmode operands.
22982 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22984         PR target/85026
22985         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
22986         Clean up attributes.
22988 2018-03-23  Richard Biener  <rguenther@suse.de>
22990         PR debug/85020
22991         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
22992         we are going to emit early debug for LTO.
22994 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
22996         PR inline-asm/85034
22997         * function.c (match_asm_constraints_1): Don't optimize if input
22998         doesn't satisfy general_operand predicate for output's mode.
23000         PR inline-asm/85022
23001         * alias.c (write_dependence_p): Don't require for x_canonicalized
23002         non-VOIDmode if x has VOIDmode.
23004         PR sanitizer/85029
23005         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
23006         just don't try to optimize it rather than assert it never happens.
23008 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23010         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
23011         macro expansions for definition of ST_INTERNAL_<mode> and
23012         LD_INTERNAL_<mode> builtins.
23013         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
23014         Remove prototype.
23015         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
23016         function.
23017         (altivec_expand_st_builtin): Likewise.
23018         (altivec_expand_builtin): Remove calls to deleted functions.
23019         (rs6000_address_for_altivec): Delete this function.
23020         * config/rs6000/vector.md: Remove expands for
23021         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
23023 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
23025         PR target/84826
23026         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
23027         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
23028         re-computing once computed.
23029         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
23030         (arm_init_machine_status): Initialize
23031         machine->static_chain_stack_bytes.
23033 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23035         PR target/84760
23036         * doc/extend.texi: Add four new prototypes for vec_ld.
23037         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
23038         definitions for more logical presentation.
23039         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
23040         entries for V1TI variants of __builtin_altivec_ld builtin.
23041         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
23042         handling of V1TI variant of LVX icode pattern.
23043         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
23044         (rs6000_gimple_fold_builtin): Likewise.
23045         (altivec_init_builtins): Add code to define
23046         __builtin_altivec_lvx_v1ti function.
23048 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
23050         PR inline-asm/84941
23051         * function.c (match_asm_constraints_1): Don't do the optimization
23052         if input isn't a REG, SUBREG, MEM or constant.
23054 2018-03-22  Tom de Vries  <tom@codesourcery.com>
23056         PR tree-optimization/84956
23057         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
23058         bb_has_abnormal_pred.
23060 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
23062         PR sanitizer/85018
23063         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
23064         DECL_INITIAL (decl) to decl at the end.
23065         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
23066         adjust the comment.
23068 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
23070         * doc/extend.texi (__builtin_tgmath): Document when complex
23071         integer types are treated as _Complex _Float64.
23073 2018-03-21  Tom de Vries  <tom@codesourcery.com>
23075         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
23077 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
23079         PR tree-optimization/84960
23080         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
23081         if it is ENTRY block, move them into single succ of ENTRY in that case.
23083 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
23085         PR tree-optimization/84811
23086         * poly-int.h (poly_span_traits): Remove the T3 parameter and
23087         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
23088         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
23089         (known_subrange_p): Update accordingly.  Cast each value involved
23090         in the size comparison, rather than casting the result of the
23091         subtraction.
23093 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
23095         PR tree-optimization/84982
23096         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
23097         by flipping the least significant bit rather than all bits from
23098         bitpos to bitpos + bitsize - 1.
23100 2018-03-21  Nathan Sidwell  <nathan@acm.org>
23102         * doc/extend.texi (Deprecated Features): Remove mention of
23103         long-deleted deprecations.
23105 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23107         PR jit/84288
23108         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
23109         * configure: Regenerate.
23111 2018-03-21  Tom de Vries  <tom@codesourcery.com>
23113         PR tree-optimization/83126
23114         * tree-parloops.c (num_phis): New function.
23115         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
23117 2018-03-21  Nathan Sidwell  <nathan@acm.org>
23119         * doc/extend.texi (Deprecated Features): Update deprecated flags,
23120         mention anon-struct/union members and trailing attributes.
23122 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
23124         PR tree-optimization/84969
23125         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
23126         builtin memset partitions if they set different rhs values.
23128 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
23130         PR rtl-optimization/84989
23131         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
23132         VEC_DUPLICATE with scalar result mode.
23134 2018-03-21  Martin Liska  <mliska@suse.cz>
23136         PR ipa/84963
23137         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
23138         not intended return statement.
23140 2018-03-21  Martin Liska  <mliska@suse.cz>
23142         PR target/84988
23143         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
23144         (chkp_find_bound_slots_1): Limit number of iterations.
23146 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
23148         PR target/84838
23149         * Minor grammar fixes for x86 options.
23151 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
23153         PR debug/84875
23154         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
23155         holding REG_CFA_RESTORE notes, instead turn them into a USE.
23157 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
23159         PR target/83789
23160         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
23161         (altivec_lvx_<mode>_1op): Likewise.
23162         (altivec_stvx_<mode>_2op): Likewise.
23163         (altivec_stvx_<mode>_1op): Likewise.
23164         (altivec_lvx_<VM2:mode>): New define_expand.
23165         (altivec_stvx_<VM2:mode>): Likewise.
23166         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
23167         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23168         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
23169         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23170         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
23171         (rs6000_gen_lvx): Likewise.
23172         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
23173         (altivec_expand_stv_builtin): Likewise.
23174         (altivec_expand_builtin): Likewise.
23175         * config/rs6000/vector.md: Likewise.
23177 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23179         PR target/82518
23180         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
23181         BYTES_BIG_ENDIAN.
23183 2018-03-20  Richard Biener  <rguenther@suse.de>
23185         PR target/84986
23186         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
23187         sign-conversions as zero, fall back to standard scalar_stmt
23188         cost for the rest.
23190 2018-03-20  Martin Liska  <mliska@suse.cz>
23192         PR ipa/84825
23193         * predict.c (rebuild_frequencies): Handle case when we have
23194         PROFILE_ABSENT, but flag_guess_branch_prob is false.
23196 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
23198         PR target/84990
23199         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
23200         flag_section_anchors.
23201         * varasm.c (use_blocks_for_decl_p): Remove hack for
23202         dw2_force_const_mem.
23204         PR target/84845
23205         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
23206         to ...
23207         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
23208         be created, use lowpart_subreg of operands[0] rather than operands[0]
23209         itself.
23210         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
23211         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
23212         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
23213         and n constraint instead of aarch64_shift_imm_di and Usd.
23214         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
23215         (*aarch64_<optab>_reg_minus<mode>3): ... this.
23217 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
23219         PR target/82989
23220         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23221         to favor GPR over NEON registers.
23222         (<shift>di3_neon): Likewise.
23224 2018-03-20  Tom de Vries  <tom@codesourcery.com>
23226         PR target/84952
23227         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23228         (nvptx_process_pars): Emit bar.sync asap and alap.
23230 2018-03-20  Tom de Vries  <tom@codesourcery.com>
23232         PR target/84954
23233         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23234         seen_label if seen_label is already set.
23236 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
23238         PR target/84945
23239         * config/i386/i386.c (fold_builtin_cpu): For features above 31
23240         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23241         Use 1U instead of 1.  Formatting fixes.
23243         PR c/84953
23244         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23245         instead of TREE_TYPE (s1) for the return value.
23247 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
23249         PR tree-optimization/84946
23250         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23251         bitsize + bitsize in poly_uint64 rather than poly_int64.
23253         PR sanitizer/78651
23254         * dwarf2asm.c: Include fold-const.c.
23255         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23256         of decl rather than decl itself.
23258         PR rtl-optimization/84643
23259         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23261 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
23263         PR sanitizer/78651
23264         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23265         calling assemble_variable.
23267 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
23269         PR target/81647
23270         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23271         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23273 2018-03-19  Jim Wilson  <jimw@sifive.com>
23275         PR bootstrap/84856
23276         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23277         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23278         (riscv_first_stack_step): Likewise.
23279         (riscv_option_override): Use STACK_BOUNDARY instead of
23280         MIN_STACK_BOUNDARY.
23281         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23282         MIN_STACK_BOUNDARY.
23283         (BIGGEST_ALIGNMENT): Set to 128.
23284         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23285         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23286         STACK_BOUNDARY.
23288 2018-03-19  Richard Biener  <rguenther@suse.de>
23290         PR tree-optimization/84933
23291         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23292         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23294 2018-03-19  Richard Biener  <rguenther@suse.de>
23296         PR tree-optimization/84859
23297         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23298         (cond_if_else_store_replacement): Perform sinking operation on
23299         single-store BBs regardless of MAX_STORES_TO_SINK setting.
23300         Generalize what a BB with a single eligible store is.
23302 2018-03-19  Richard Biener  <rguenther@suse.de>
23304         PR tree-optimization/84929
23305         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23306         chrec_is_positive against non-chrec arg.
23308 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
23310         PR target/84711
23311         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23313 2018-03-18  Martin Liska  <mliska@suse.cz>
23315         PR rtl-optimization/84635
23316         * regrename.c (build_def_use): Use matches_mode only when
23317         matches >= 0.
23319 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
23321         PR tree-optimization/84913
23322         * tree-vect-loop.c (vectorizable_reduction): Don't try to
23323         vectorize chains of COND_EXPRs.
23325 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
23327         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23329 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
23331         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23333 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
23335         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23337 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
23338             Kito Cheng  <kito.cheng@gmail.com>
23340         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23341         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23342         (nds32_adjust_reg_alloc_order): New function.
23343         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23345 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
23347         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23348         nds32_print_operand, nds32_print_operand_address): Use
23349         HOST_WIDE_INT_PRINT_DEC instead.
23351 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
23353         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23355 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
23357         PR target/84902
23358         * config/i386/i386.c (initial_ix86_tune_features,
23359         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23360         unsigned long long.
23361         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23362         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23363         rather than 1u << ix86_tune.  Formatting fix.
23364         (ix86_option_override_internal): Change ix86_arch_mask from
23365         unsigned int to unsigned HOST_WIDE_INT, initialize to
23366         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23367         (ix86_function_specific_restore): Likewise.
23369 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23371         PR target/84899
23372         * postreload.c (reload_combine_recognize_pattern): Perform
23373         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23374         truncate_int_for_mode the result for the destination's mode.
23376         PR c/84909
23377         * hsa-gen.c (mem_type_for_type): Fix comment typo.
23378         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23379         Likewise.
23380         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23381         Likewise.
23383 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
23385         PR target/84876
23386         * lra-assigns.c (lra_split_hard_reg_for): Don't use
23387         regno_allocno_class_array and sorted_pseudos.
23388         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23389         insns where regno is used.
23391 2018-03-16  Martin Liska  <mliska@suse.cz>
23393         PR ipa/84833
23394         * multiple_target.c (create_dispatcher_calls): Redirect
23395         reference in the symbol table.
23397 2018-03-16  Martin Liska  <mliska@suse.cz>
23399         PR ipa/84722
23400         * multiple_target.c (create_dispatcher_calls): Redirect also
23401         an alias.
23403 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23405         PR c++/79937
23406         PR c++/82410
23407         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23408         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23409         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23411 2018-03-16  Julia Koval  <julia.koval@intel.com>
23413         * doc/invoke.texi (Skylake Server): Add CLWB.
23414         Cannonlake): Remove CLWB.
23416 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23418         PR tree-optimization/84841
23419         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23420         1 << 3.
23421         (FLOAT_ONE_CONST_TYPE): Define.
23422         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23423         (sort_by_operand_rank): Put entries with higher constant_type last
23424         rather than first to match comments.
23426 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
23428         * config/nios2/nios2.md (movsi_internal): Fix thinko in
23429         split predicate.
23431 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
23433         PR c++/79085
23434         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23435         check and use address of target always.
23437 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
23439         PR target/84574
23440         * config/i386/i386.c (indirect_thunk_needed): Update comments.
23441         (indirect_thunk_bnd_needed): Likewise.
23442         (indirect_thunks_used): Likewise.
23443         (indirect_thunks_bnd_used): Likewise.
23444         (indirect_return_needed): New.
23445         (indirect_return_bnd_needed): Likewise.
23446         (output_indirect_thunk_function): Add a bool argument for
23447         function return.
23448         (output_indirect_thunk_function): Don't generate alias for
23449         function return thunk.
23450         (ix86_code_end): Call output_indirect_thunk_function to generate
23451         function return thunks.
23452         (ix86_output_function_return): Set indirect_return_bnd_needed
23453         and indirect_return_needed instead of indirect_thunk_bnd_needed
23454         and indirect_thunk_needed.
23456 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
23458         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23459         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23460         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23462 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
23463             Paul Hua <paul.hua.gm@gmail.com>
23465         PR c/84852
23466         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23468 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
23470         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23471         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23472         resp. SFmode cases.
23474 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
23476         PR target/84711
23477         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23478         instead of GET_MODE_SIZE when comparing Units.
23480 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
23482         PR target/68256
23483         * varasm.c (hash_section): Return an unchangeble hash value
23484         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23485         Return !aarch64_can_use_per_function_literal_pools_p ().
23487 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
23489         PR target/84860
23490         * optabs.c (emit_conditional_move): Pass address of cmode's copy
23491         rather than address of cmode as last argument to prepare_cmp_insn.
23493 2018-03-15  Julia Koval  <julia.koval@intel.com>
23495         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23496         F_AVX512VNNI, F_AVX512BITALG): New.
23498 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
23500         PR target/83451
23501         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
23502         insn for floating-point loads and stores.
23504 2018-03-14  Carl Love  <cel@us.ibm.com>
23506         * config/rs6000/rs6000-c.c: Add macro definitions for
23507         ALTIVEC_BUILTIN_VEC_PERMXOR.
23508         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23509         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23510         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23511         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23512         UNSPEC_VPERMXOR.
23513         * config/doc/extend.texi: Add prototypes for vec_permxor.
23515 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
23517         PR c/84852
23518         * diagnostic-show-locus.c (class layout_point): Convert m_line
23519         from int to linenum_type.
23520         (line_span::comparator): Use linenum "compare" function when
23521         comparing line numbers.
23522         (test_line_span): New function.
23523         (layout_range::contains_point): Convert param "row" from int to
23524         linenum_type.
23525         (layout_range::intersects_line_p): Likewise.
23526         (layout::will_show_line_p): Likewise.
23527         (layout::print_source_line): Likewise.
23528         (layout::should_print_annotation_line_p): Likewise.
23529         (layout::print_annotation_line): Likewise.
23530         (layout::print_leading_fixits): Likewise.
23531         (layout::annotation_line_showed_range_p): Likewise.
23532         (struct line_corrections): Likewise for field m_row.
23533         (line_corrections::line_corrections): Likewise for param "row".
23534         (layout::print_trailing_fixits): Likewise.
23535         (layout::get_state_at_point): Likewise.
23536         (layout::get_x_bound_for_row): Likewise.
23537         (layout::print_line): Likewise.
23538         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23539         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23540         * input.c (selftest::test_linenum_comparisons): New function.
23541         (selftest::input_c_tests): Call it.
23542         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23543         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23544         * selftest.h (ASSERT_GT): New macro.
23545         (ASSERT_GT_AT): New macro.
23546         (ASSERT_LT): New macro.
23547         (ASSERT_LT_AT): New macro.
23549 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
23551         PR rtl-optimization/84780
23552         * combine.c (distribute_links): Don't make a link based on pc_rtx.
23554 2018-03-14  Martin Liska  <mliska@suse.cz>
23556         * tree.c (record_node_allocation_statistics): Use
23557         get_stats_node_kind.
23558         (get_stats_node_kind): New function extracted from
23559         record_node_allocation_statistics.
23560         (free_node): Use get_stats_node_kind.
23562 2018-03-14  Richard Biener  <rguenther@suse.de>
23564         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23565         that the value-set of ANTIC_IN doesn't grow.
23567         Revert
23568         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23569         member.
23570         (BB_VISITED_WITH_VISITED_SUCCS): New define.
23571         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23573 2018-03-14  Julia Koval  <julia.koval@intel.com>
23575         * config.gcc (icelake-client, icelake-server): New.
23576         (icelake): Remove.
23577         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23578         (initial_ix86_arch_features): Ditto.
23579         (PTA_SKYLAKE): Add SGX.
23580         (PTA_ICELAKE): Remove.
23581         (PTA_ICELAKE_CLIENT): New.
23582         (PTA_ICELAKE_SERVER): New.
23583         (ix86_option_override_internal): Split up icelake on icelake client and
23584         icelake server.
23585         (get_builtin_code_for_version): Ditto.
23586         (fold_builtin_cpu): Ditto.
23587         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23588         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23589         * config/i386/i386.h (processor_type): Ditto.
23590         * doc/invoke.texi: Ditto.
23592 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
23594         PR sanitizer/83392
23595         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23596         INTEGER_CST offset, add it together with bitpos / 8 and
23597         sign extend based on POINTER_SIZE.
23599         PR target/84844
23600         Revert
23601         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
23603         PR target/78090
23604         * config/i386/constraints.md (Yc): New register constraint.
23605         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23606         Use Yc constraint for alternative 2 of operand 0.  Remove
23607         preferred_for_speed attribute.
23609 2018-03-14  Richard Biener  <rguenther@suse.de>
23611         PR tree-optimization/84830
23612         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23613         with the old one to avoid oscillations.
23615 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
23617         PR target/83712
23618         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23619         pseudos.
23620         (assign_by_spills): Return a flag of reload assignment failure.
23621         Do not process the reload assignment failures.  Do not spill other
23622         reload pseudos if they has the same reg class.  Update n if
23623         necessary.
23624         (lra_assign): Add a return arg.  Set up from the result of
23625         assign_by_spills call.
23626         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23627         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23628         usage_insns if it is not NULL.
23629         (spill_hard_reg_in_range): New function.
23630         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23631         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23632         function prototypes.
23633         (lra_assign): Change prototype.
23634         * lra.c (lra): Add code to deal with fails by splitting hard reg
23635         live ranges.
23637 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
23639         * config/riscv/riscv.opt (mrelax): New option.
23640         * config/riscv/riscv.c (riscv_file_start): Emit ".option
23641         "norelax" when riscv_mrelax is disabled.
23642         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23644 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23646         PR target/84743
23647         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23648         reassociation for int modes.
23650 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23652         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23653         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23654         for big-endian.
23655         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23656         * config/aarch64/aarch64-sve.md
23657         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23658         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23659         (*extend<mode><Vwide>2): Rename to...
23660         (aarch64_sve_extend<mode><Vwide>2): ...this.
23661         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23662         renaming the old pattern to...
23663         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
23664         unsigned packs.
23665         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23666         define_expand, renaming the old pattern to...
23667         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23668         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23669         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23670         account when deciding which SVE instruction the optab should use.
23671         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23673 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23675         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23676         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23677         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23678         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23679         (tlsdesc_small_<mode>): Turn a define_expand and use
23680         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
23681         (tlsdesc_small_advsimd_<mode>): ...this.
23682         (tlsdesc_small_sve_<mode>): New pattern.
23684 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23686         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23687         (UNSPEC_UMUL_HIGHPART): New constants.
23688         (MUL_HIGHPART): New int iteraor.
23689         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23690         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23691         define_expand.
23692         (*<su>mul<mode>3_highpart): New define_insn.
23694 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
23696         PR lto/84805
23697         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23698         incomplete types.
23700 2018-03-13  Martin Liska  <mliska@suse.cz>
23702         PR ipa/84658.
23703         * (sem_item_optimizer::sem_item_optimizer): Initialize new
23704         vector.
23705         (sem_item_optimizer::~sem_item_optimizer): Release it.
23706         (sem_item_optimizer::merge_classes): Register variable aliases.
23707         (sem_item_optimizer::fixup_pt_set): New function.
23708         (sem_item_optimizer::fixup_points_to_sets): Likewise.
23709         * ipa-icf.h: Declare new variables and functions.
23711 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
23713         PR middle-end/84834
23714         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23715         integer_pow2p@2 and test integer_pow2p in condition.
23716         (A < 0 ? C : 0): Similarly for @1.
23718         PR middle-end/84831
23719         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23720         characters starting at p contain '\0' character, don't look beyond
23721         that.
23723         PR target/84827
23724         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23725         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23727         PR target/84828
23728         * reg-stack.c (change_stack): Change update_end var from int to
23729         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23730         also call set_block_for_insn on the newly added insns and rescan.
23732         PR target/84786
23733         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23734         on the last operand.
23736         PR c++/84704
23737         * tree.c (stabilize_reference_1): Return save_expr (e) for
23738         STATEMENT_LIST even if it doesn't have side-effects.
23740 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
23742         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23744 2018-03-12  Renlin Li  <renlin.li@arm.com>
23746         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23747         aarch64_output_scalar_simd_mov_immediate.
23749 2018-03-12  Martin Sebor  <msebor@redhat.com>
23751         PR tree-optimization/83456
23752         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23753         for perfectly overlapping calls to memcpy.
23754         (gimple_fold_builtin_memory_chk): Same.
23755         (gimple_fold_builtin_strcpy): Handle no-warning.
23756         (gimple_fold_builtin_stxcpy_chk): Same.
23757         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
23759 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
23761         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
23762         parameter.  Use it for SFmode.
23763         (rs6000_function_arg_advance_1): Adjust.
23764         (rs6000_function_arg): Adjust.
23765         (rs6000_gimplify_va_arg): Pass false for that new parameter.
23767 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
23769         PR rtl-optimization/84169
23770         PR rtl-optimization/84780
23771         * combine.c (can_combine_p): Check for a 2-insn combination whether
23772         the destination register is used between the two insns, too.
23774 2018-03-12  Richard Biener  <rguenther@suse.de>
23776         PR tree-optimization/84803
23777         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
23778         for refs DR analysis didn't process.
23780 2018-03-12  Richard Biener  <rguenther@suse.de>
23782         PR tree-optimization/84777
23783         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
23784         force-vectorize loops ignore whether we are optimizing for size.
23786 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
23788         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
23789         (TARGET_MD_ASM_ADJUST): Define.
23791 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
23792             Kito Cheng  <kito.cheng@gmail.com>
23793             Chung-Ju Wu  <jasonwucj@gmail.com>
23795         * config/nds32/nds32.c (nds32_compute_stack_frame,
23796         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
23797         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
23798         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
23799         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
23800         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
23801         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
23802         * config/nds32/nds32.md (prologue, epilogue): Use macro
23803         NDS32_V3PUSH_AVAILABLE_P to do checking.
23805 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
23807         PR debug/58150
23808         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
23809         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
23810         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
23811         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
23812         addition of most attributes on !orig_type_die or the attribute not
23813         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
23815 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23816             Chung-Ju Wu  <jasonwucj@gmail.com>
23818         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
23819         __NDS32_VH__ macro.
23820         * config/nds32/nds32.opt (mvh): New option.
23822 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23823             Chung-Ju Wu  <jasonwucj@gmail.com>
23825         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
23826         function.
23827         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
23828         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
23829         definition.
23831 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23832             Chung-Ju Wu  <jasonwucj@gmail.com>
23834         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
23835         function.
23836         * config/nds32/nds32-multiple.md (strlensi): New pattern.
23837         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
23839 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
23840             Kito Cheng  <kito.cheng@gmail.com>
23841             Chung-Ju Wu  <jasonwucj@gmail.com>
23843         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
23844         UNSPEC_FFMISM and UNSPEC_FLMISM.
23845         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
23846         for ffb, ffmism and flmism.
23847         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
23848         (unspec_ffmism): Ditto.
23849         (unspec_flmism): Ditto.
23850         (nds32_expand_builtin_impl): Check if string extension is available.
23851         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
23852         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
23854 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
23856         Reverting patch:
23857         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
23859         PR target/83712
23860         * lra-assigns.c (assign_by_spills): Return a flag of reload
23861         assignment failure.  Do not process the reload assignment
23862         failures.  Do not spill other reload pseudos if they has the same
23863         reg class.
23864         (lra_assign): Add a return arg.  Set up from the result of
23865         assign_by_spills call.
23866         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23867         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23868         usage_insns if it is not NULL.
23869         (spill_hard_reg_in_range): New function.
23870         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23871         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23872         function prototypes.
23873         (lra_assign): Change prototype.
23874         * lra.c (lra): Add code to deal with fails by splitting hard reg
23875         live ranges.
23877 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
23879         PR target/84807
23880         * config/i386/i386.opt: Replace Enforcment with Enforcement.
23882 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
23884         PR debug/84620
23885         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
23886         (dw_val_node): Add val_symbolic_view.
23887         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
23888         (symview_upper_bound): New.
23889         (new_line_info_table): Initialize symviews_since_reset.
23890         (dwarf2out_source_line): Count symviews_since_reset and set
23891         symview_upper_bound.
23892         (dw_val_equal_p): Handle symview.
23893         (add_AT_symview): New.
23894         (print_dw_val): Handle symview.
23895         (attr_checksum, attr_checksum_ordered): Likewise.
23896         (same_dw_val_p, size_of_die): Likewise.
23897         (value_format, output_die): Likewise.
23898         (add_high_low_attributes): Use add_AT_symview for entry_view.
23899         (dwarf2out_finish): Reset symview_upper_bound, clear
23900         zero_view_p.
23902 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
23904         PR target/83969
23905         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
23906         Add strict argument and use it.
23907         (rs6000_split_multireg_move): Update for new strict argument.
23908         (mem_operand_gpr): Disallow all non-offsettable addresses.
23909         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
23911 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
23913         PR target/84772
23914         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
23915         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
23916         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
23918         PR c++/84767
23919         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
23920         decl, use remap_type if we want to use the type.
23922 2018-03-09  Martin Sebor  <msebor@redhat.com>
23924         PR tree-optimization/84526
23925         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23926         Remove dead code.
23927         (builtin_access::generic_overlap): Be prepared to handle non-array
23928         base objects.
23930 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
23932         PR rtl-optimization/84682
23933         * lra-constraints.c (process_address_1): Check is_address flag
23934         for address constraints.
23935         (process_alt_operands): Likewise.
23936         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
23937         preprocess_constraints.
23938         * recog.h (preprocess_constraints): Add oploc parameter.
23939         Adjust callers.
23940         * recog.c (preprocess_constraints): Test address_operand for
23941         CT_ADDRESS constraints.
23943 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
23945         PR target/83712
23946         * lra-assigns.c (assign_by_spills): Return a flag of reload
23947         assignment failure.  Do not process the reload assignment
23948         failures.  Do not spill other reload pseudos if they has the same
23949         reg class.
23950         (lra_assign): Add a return arg.  Set up from the result of
23951         assign_by_spills call.
23952         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23953         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23954         usage_insns if it is not NULL.
23955         (spill_hard_reg_in_range): New function.
23956         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23957         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23958         function prototypes.
23959         (lra_assign): Change prototype.
23960         * lra.c (lra): Add code to deal with fails by splitting hard reg
23961         live ranges.
23963 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23965         PR target/83193
23966         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
23967         Accept complain bool parameter.  Only emit errors if it is true.
23968         (arm_parse_cpu_option_name): Likewise.
23969         (arm_target_thumb_only): Adjust callers of the above.
23970         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
23971         prototype to take a default true bool parameter.
23972         (arm_parse_arch_option_name): Likewise.
23974 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
23975             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
23977         PR jit/64089
23978         PR jit/84288
23979         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
23980         * configure: Regenerate.
23981         * configure.ac ("linker --version-script option"): New.
23982         ("linker soname option"): New.
23984 2018-03-09  Richard Biener  <rguenther@suse.de>
23986         PR tree-optimization/84775
23987         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
23988         immediate uses of predicate stmts and mark them modified.
23990         Revert
23991         PR tree-optimization/84178
23992         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23993         to caller.
23994         (version_loop_for_if_conversion): Delay update_ssa call.
23995         (tree_if_conversion): Delay update_ssa until after predicate
23996         insertion.
23998 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
24000         PR target/84763
24001         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
24002         when the function accesses prior frames.
24004 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
24006         PR debug/84456
24007         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
24008         gen_llsym, otherwise call maybe_gen_llsym.
24010         PR inline-asm/84742
24011         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
24012         has ',' character inside of it.
24014 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24016         PR target/84748
24017         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
24018         as clobbering CC_REGNUM.
24020 2018-03-08  Richard Biener  <rguenther@suse.de>
24022         PR middle-end/84552
24023         * tree-scalar-evolution.c: Include tree-into-ssa.h.
24024         (follow_copies_to_constant): Do not follow SSA names registered
24025         for update.
24027 2018-03-08  Richard Biener  <rguenther@suse.de>
24029         PR tree-optimization/84178
24030         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24031         to caller.
24032         (version_loop_for_if_conversion): Delay update_ssa call.
24033         (tree_if_conversion): Delay update_ssa until after predicate
24034         insertion.
24036 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
24038         PR tree-optimization/84178
24039         * tree-if-conv.c (release_bb_predicate): Remove the
24040         the assertion that the stmts have NULL use_ops.
24041         Discard the statements, asserting that they haven't
24042         yet been added to a BB.
24044 2018-03-08  Richard Biener  <rguenther@suse.de>
24046         PR tree-optimization/84746
24047         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
24048         (phi_translate): Pass in destination ANTIC_OUT set.
24049         (phi_translate_1): Likewise.  For a simplified result lookup
24050         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
24051         (phi_translate_set): Adjust.
24052         (do_pre_regular_insertion): Likewise.
24053         (do_pre_partial_partial_insertion): Likewise.
24055 2018-03-08  Martin Liska  <mliska@suse.cz>
24057         PR gcov-profile/84735
24058         * doc/gcov.texi: Document usage of profile files.
24059         * gcov-io.h: Document changes in the format.
24061 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
24063         PR debug/84404
24064         PR debug/84408
24065         * dwarf2out.c (struct dw_line_info_table): Update comments for
24066         view == -1.
24067         (FORCE_RESET_NEXT_VIEW): New.
24068         (FORCE_RESETTING_VIEW_P): New.
24069         (RESETTING_VIEW_P): Check for -1 too.
24070         (ZERO_VIEW_P): Likewise.
24071         (new_line_info_table): Force-reset next view.
24072         (dwarf2out_begin_function): Likewise.
24073         (dwarf2out_source_line): Simplify zero_view_p initialization.
24074         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
24075         view directly.  Omit view when omitting .loc at line 0.
24077 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
24079         PR tree-optimization/84740
24080         * tree-switch-conversion.c (process_switch): Call build_constructors
24081         only if info.phi_count is non-zero.
24083         PR tree-optimization/84739
24084         * tree-tailcall.c (find_tail_calls): Check call arguments against
24085         DECL_ARGUMENTS (current_function_decl) rather than
24086         DECL_ARGUMENTS (func) when checking for tail recursion.
24088 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
24090         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
24091         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
24092         Volker Reichelt's entry and add entries for people that perform
24093         GCC fuzzy testing and report numerous bugs.
24095 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
24097         PR target/82411
24098         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
24099         readonly data in sdata, if that is disabled.
24100         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
24101         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
24102         -mreadonly-in-sdata option.
24104 2018-03-07  Martin Sebor  <msebor@redhat.com>
24106         PR tree-optimization/84468
24107         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
24108         basic block when looking for nul assignment.
24110 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
24112         PR target/84277
24113         * except.h (output_function_exception_table): Adjust prototype.
24114         * except.c (output_function_exception_table): Remove FNNAME parameter
24115         and add SECTION parameter.  Ouput one part of the table at a time.
24116         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
24117         the first part of the exception table and emit unwind directives.
24118         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
24119         (i386_pe_seh_cold_init): Likewise.
24120         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
24121         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
24122         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
24123         (ix86_output_call_insn): Emit a nop in one more case for SEH.
24124         * config/i386/winnt.c: Include except.h.
24125         (struct seh_frame_state): Add reg_offset, after_prologue and
24126         in_cold_section fields.
24127         (i386_pe_seh_end_prologue): Set seh->after_prologue.
24128         (i386_pe_seh_cold_init): New function.
24129         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
24130         to seh->in_cold_section.
24131         (seh_emit_push): Record the offset of the push.
24132         (seh_emit_save): Record the offet of the save.
24133         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
24134         Test seh->after_prologue to disregard the epilogue.
24135         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
24136         (i386_pe_end_cold_function): New function.
24138 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
24140         PR fortran/84565
24141         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
24142         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
24144         PR c++/84704
24145         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
24146         on tmp_var.
24147         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
24148         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
24150         PR middle-end/84723
24151         * multiple_target.c: Include tree-inline.h and intl.h.
24152         (expand_target_clones): Diagnose and fail if node->definition and
24153         !tree_versionable_function_p (node->decl).
24155 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
24157         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
24158         sprint_ul.
24159         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
24160         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
24161         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
24163 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
24165         PR target/84710
24166         * combine.c (try_combine): Use reg_or_subregno instead of handling
24167         just paradoxical SUBREGs and REGs.
24169 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
24171         * config/arc/arc.c (arc_finalize_pic): Remove function.
24172         (arc_must_save_register): We use single base PIC register, remove
24173         checks to save/restore the PIC register.
24174         (arc_expand_prologue): Likewise.
24175         * config/arc/arc-protos.h (arc_set_default_type_attributes):
24176         Remove.
24177         (arc_verify_short): Likewise.
24178         (arc_attr_type): Likewise.
24179         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
24180         (walk_stores): Likewise.
24181         (arc_address_cost): Make it static.
24182         (arc_verify_short): Likewise.
24183         (branch_dest): Likewise.
24184         (arc_attr_type): Likewise.
24185         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
24186         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
24187         (arc_final_prescan_insn): Remove inserting the nops due to
24188         hardware hazards.  It is done in reorg step.
24189         (insn_length_variant_t): Remove.
24190         (insn_length_parameters_t): Likewise.
24191         (arc_insn_length_parameters): Likewise.
24192         (arc_get_insn_variants): Likewise.
24193         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
24195 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
24197         PR inline-asm/84683
24198         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
24199         assertion failure.
24201         PR tree-optimization/84687
24202         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
24203         on new_node->decl.
24204         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
24206 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24208         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
24209         Rename to ppc_speculation_barrier.
24210         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
24211         __builtin_ppc_speculation_barrier.
24213 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
24215         PR target/84700
24216         * combine.c (combine_simplify_rtx): Don't try to simplify if
24217         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
24218         are equal to x.
24220 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
24222         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24223         to 32 bytes when compiling for POWER9.
24225 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
24227         PR target/84564
24228         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24229         regparm >= 3 with no arg reg available also for calls with
24230         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
24232         PR target/84524
24233         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24234         orig,vex.
24235         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
24237 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
24239         PR target/84264
24240         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24242 2018-03-05  Richard Biener  <rguenther@suse.de>
24244         PR tree-optimization/84486
24245         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24246         When inserting a __builtin_assume_aligned call set the LHS
24247         SSA name alignment info accordingly.
24249 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
24251         PR tree-optimization/84114
24252         * config/aarch64/aarch64.c (aarch64_reassociation_width)
24253         Avoid reassociation of FLOAT_MODE addition.
24255 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
24257         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24258         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24259         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24260         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24261         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24262         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24263         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24264         and -mwbnoinvd.
24265         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24266         __builtin_ia32_wbinvd): New builtins.
24267         (SPECIAL_ARGS2): New.
24268         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24269         (SPECIAL_ARGS2): New.
24270         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24271         (ix86_valid_target_attribute_inner_p): Ditto.
24272         (ix86_init_mmx_sse_builtins): Add special_args2.
24273         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24274         TARGET_WBNOINVD_P): New.
24275         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24276         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24277         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24278         * config/i386/immintrin.h (_wbinvd): New intrinsic.
24279         * config/i386/pconfigintrin.h: New file.
24280         * config/i386/wbnoinvdintrin.h: Ditto.
24281         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24282         wbnoinvdintrin.h.
24283         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24285 2018-03-05  Richard Biener  <rguenther@suse.de>
24287         PR tree-optimization/84670
24288         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24289         member.
24290         (BB_VISITED_WITH_VISITED_SUCCS): New define.
24291         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24292         (compute_antic_aux): Only assert the number of values in ANTIC_IN
24293         doesn't grow if all successors (recursively) were visited at least
24294         once.
24296 2018-03-05  Richard Biener  <rguenther@suse.de>
24298         PR tree-optimization/84650
24299         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24300         if executed in the loop pipeline.
24302 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
24304         * doc/configfiles.texi (Configuration Files): Move info about
24305         conditionalizing $target-protos.h to...
24306         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
24307         differs from $target-protos.h.
24309 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
24310             Chung-Ju Wu  <jasonwucj@gmail.com>
24312         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24313         * config/nds32/nds32-multiple.md (setmemsi): Define.
24314         * config/nds32/nds32-memory-manipulation.c
24315         (nds32_gen_dup_4_byte_to_word_value): New.
24316         (emit_setmem_word_loop): New.
24317         (emit_setmem_byte_loop): New.
24318         (nds32_expand_setmem_loop): New.
24319         (nds32_expand_setmem_loop_v3m): New.
24320         (nds32_expand_setmem_unroll): New.
24321         (nds32_expand_setmem): New.
24323 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24324             Chung-Ju Wu  <jasonwucj@gmail.com>
24326         * config/nds32/nds32-memory-manipulation.c
24327         (nds32_emit_load_store): New.
24328         (nds32_emit_post_inc_load_store): New.
24329         (nds32_emit_mem_move): New.
24330         (nds32_emit_mem_move_block): New.
24331         (nds32_expand_movmemsi_loop_unknown_size): New.
24332         (nds32_expand_movmemsi_loop_known_size): New.
24333         (nds32_expand_movmemsi_loop): New.
24334         (nds32_expand_movmemsi_unroll): New.
24335         (nds32_expand_movmemqi): Rename ...
24336         (nds32_expand_movmemsi): ... to this.
24337         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24338         (movmemsi): ... to this.
24339         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24340         (nds32_expand_movmemsi): ... to this.
24342 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24343             Monk Chiang  <sh.chiang04@gmail.com>
24344             Chung-Ju Wu  <jasonwucj@gmail.com>
24346         * config/nds32/nds32-protos.h
24347         (nds32_expand_load_multiple): New arguments.
24348         (nds32_expand_store_multiple): Ditto.
24349         (nds32_valid_multiple_load_store): Rename ...
24350         (nds32_valid_multiple_load_store_p): ... to this.
24351         * config/nds32/nds32-memory-manipulation.c
24352         (nds32_expand_load_multiple): Refine implementation.
24353         (nds32_expand_store_multiple): Ditto.
24354         * config/nds32/nds32-multiple.md
24355         (load_multiple): Update nds32_expand_load_multiple interface.
24356         (store_multiple): Update nds32_expand_store_multiple interface.
24357         * config/nds32/nds32-predicates.c
24358         (nds32_valid_multiple_load_store): Rename ...
24359         (nds32_valid_multiple_load_store_p): ... to this and refine
24360         implementation.
24361         * config/nds32/predicates.md
24362         (nds32_load_multiple_and_update_address_operation): New predicate.
24363         (nds32_store_multiple_and_update_address_operation): New predicate.
24365 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24366             Chung-Ju Wu  <jasonwucj@gmail.com>
24368         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24369         (combo): New attribute.
24370         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24372 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
24374         * config/nds32/nds32.opt: Change -mcmodel= default value.
24376 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
24377             Monk Chiang  <sh.chiang04@gmail.com>
24378             Chung-Ju Wu  <jasonwucj@gmail.com>
24380         * config/nds32/constants.md (unspec_element): New enum.
24381         * config/nds32/constraints.md (Umw): New constraint.
24382         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24383         * config/nds32/nds32-intrinsic.md: Likewise.
24384         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24385         (nds32_valid_smw_lwm_base_p): New.
24386         (nds32_output_smw_single_word): New.
24387         (nds32_output_lmw_single_word): New.
24388         (nds32_expand_unaligned_load): New.
24389         (nds32_expand_unaligned_store): New.
24390         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24391         (nds32_output_smw_single_word): Declare.
24392         (nds32_output_lmw_single_word): Declare.
24393         (nds32_expand_unaligned_load): Declare.
24394         (nds32_expand_unaligned_store): Declare.
24395         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24396         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24397         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24398         NDS32_BUILTIN_UASTORE_DW.
24399         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24400         predicate.
24402 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
24403             Kito Cheng  <kito.cheng@gmail.com>
24404             Chung-Ju Wu  <jasonwucj@gmail.com>
24406         * config/nds32/nds32-intrinsic.c
24407         (nds32_expand_builtin_null_ftype_reg): Delete.
24408         (nds32_expand_builtin_reg_ftype_imm): Ditto.
24409         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24410         (nds32_read_argument): New.
24411         (nds32_legitimize_target): Ditto.
24412         (nds32_legitimize_argument): Ditto.
24413         (nds32_check_constant_argument): Ditto.
24414         (nds32_expand_unop_builtin): Ditto.
24415         (nds32_expand_unopimm_builtin): Ditto.
24416         (nds32_expand_binop_builtin): Ditto.
24417         (nds32_builtin_decl_impl): Ditto.
24418         (builtin_description): Ditto.
24419         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24420         (nds32_init_builtins_impl): Ditto.
24421         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24422         (nds32_builtin_decl): New.
24423         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24424         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24426 2018-03-02  Jeff Law  <law@redhat.com>
24428         * reorg.c (stop_search_p): Handle DEBUG_INSN.
24429         (redundant_insn, fill_simple_delay_slots): Likewise.
24430         (fill_slots_from_thread): Likewise.
24431         * resource.c (mark_referenced_resources): Likewise.
24432         (mark_set_resources, find_dead_or_set_registers): Likewise.
24434 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24436         * substring-locations.h (format_warning_va): Formatting fix for
24437         ATTRIBUTE_GCC_DIAG.
24438         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24439         argument.
24440         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24441         * substring-locations.c: Include intl.h.
24442         (format_warning_va): Turned into small wrapper around
24443         format_warning_n_va, renamed to ...
24444         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24445         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24446         use ngettext.
24447         (format_warning_at_substring_n): New function.
24448         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24449         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
24450         format_warning_at_substring with just a shorter name instead of
24451         const function pointer.
24452         (fmtwarn_n): New function.
24453         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24454         appropriate, get rid of all the fmtstr temporaries, move conditionals
24455         with G_() wrapped string literals directly into fmtwarn arguments,
24456         cast dir.len to (int), formatting fixes.
24458 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
24460         * doc/invoke.texi: Remove "Cilk Plus" references.
24462 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24463             Richard Biener  <rguenther@suse.de>
24465         PR ipa/84628
24466         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24467         for error or warning attributes if CALL_FROM_THUNK_P is set.
24468         Formatting fixes.
24470 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24472         PR target/56540
24473         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24474         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24476         PR target/56540
24477         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24478         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24480         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24481         instead of -1U in last predictors element's probability member.
24483 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
24485         PR ipa/83983
24486         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24487         arguments if they are comparable.
24489 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
24491         PR tree-optimization/84634
24492         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24493         masks and masked_loop_p with a single loop_masks, making sure it's
24494         null for bb vectorization.
24496 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
24498         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24499         (vect_analyze_data_ref_access): Use loop->safe_len rather than
24500         loop->force_vectorize to check whether there is no alias.
24502 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24504         PR target/84614
24505         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24506         prototypes.
24507         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24508         comments.
24509         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24510         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24511         instead of a loop around prev_real_insn.
24512         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24513         prev_real_insn.
24515         PR inline-asm/84625
24516         * config/i386/i386.c (ix86_print_operand): Use conditional
24517         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24518         zero vector.
24520 2018-03-02  Richard Biener  <rguenther@suse.de>
24522         PR tree-optimization/84427
24523         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24524         (bitmap_set_subtract_values): Rewrite to handle multiple
24525         exprs per value.
24526         (clean): Likewise.
24527         (prune_clobbered_mems): Likewise.
24528         (phi_translate): Take edge instead of pred/phiblock.
24529         (phi_translate_1): Likewise.
24530         (phi_translate_set): Likewise.  Insert all translated
24531         exprs for a value into the set, keeping possibly multiple
24532         expressions per value.
24533         (compute_antic_aux): Adjust for phi_translate changes.
24534         When intersecting union the expressions and prune those
24535         not in the final value set, keeping possibly multiple
24536         expressions per value.  Do not use value-insertion
24537         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24538         all expressions.  Add verification that the value-sets
24539         only shrink during iteration.
24540         (compute_partial_antic_aux): Adjust for the phi_translate changes.
24541         (do_pre_regular_insertion): Likewise.
24542         (do_pre_partial_partial_insertion): Likewise.
24544 2018-03-02  Richard Biener  <rguenther@suse.de>
24546         PR target/82005
24547         * config/darwin.c (saved_debug_info_level): New static global.
24548         (darwin_asm_lto_start): Disable debug info generation for LTO out.
24549         (darwin_asm_lto_end): Restore debug info generation settings.
24551 2018-03-01  Martin Liska  <mliska@suse.cz>
24553         PR sanitizer/82484
24554         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24555         volatile arguments.
24557 2018-03-01  Richard Biener  <rguenther@suse.de>
24559         PR debug/84645
24560         * dwarf2out.c (gen_variable_die): Properly handle late VLA
24561         type annotation with LTO when debug was disabled at compile-time.
24563 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
24565         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24566         XINT with INTVAL.
24567         (mips_final_postscan_insn): Likewise.
24569 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
24571         PR rtl-optimization/84528
24572         * alias.c (init_alias_target): Add commentary.
24573         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24574         a unique base value if the frame pointer is not eliminated
24575         to the stack pointer.
24577 2018-03-01  Tom de Vries  <tom@codesourcery.com>
24579         PR rtl-optimization/83327
24580         * lra-int.h (hard_regs_spilled_into): Declare.
24581         * lra.c (hard_regs_spilled_into): Define.
24582         (init_reg_info): Init hard_regs_spilled_into.
24583         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24584         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24585         (process_bb_lives): Handle hard_regs_spilled_into.
24586         (lra_create_live_ranges_1): Before doing liveness propagation, clear
24587         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24589 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
24591         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24592         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24593         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24594         * config/rs6000/aix72.h: New file.
24596 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
24598         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24599         instead of warning_at with conditional singular and plural messages
24600         where possible.
24602         PR target/52991
24603         * stor-layout.c (update_alignment_for_field): For
24604         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24605         && !DECL_PACKED (field), do the alignment update, just use
24606         only desired_align instead of MAX (type_align, desired_align)
24607         as the alignment.
24608         (place_field): Don't do known_align < desired_align handling
24609         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24610         is non-NULL, instead do it after rli->prev_field handling and
24611         only if not within a bitfield word.  For DECL_PACKED (field)
24612         use type_align of BITS_PER_UNIT.
24614 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
24616         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24617         superfluous parentheses and trailing spaces.
24619 2018-02-28  Richard Biener  <rguenther@suse.de>
24621         PR tree-optimization/84584
24622         * graphite-scop-detection.c (scop_detection::add_scop): Discard
24623         SCoPs with fake exit edge.
24625 2018-02-28  Martin Liska  <mliska@suse.cz>
24627         PR testsuite/84597
24628         * timevar.c (timer::print): Fix format to properly print 100%
24629         values.
24631 2018-02-28  Richard Biener  <rguenther@suse.de>
24633         PR middle-end/84607
24634         * genmatch.c (capture_info::walk_match): Do not mark
24635         captured expressions without operands as expr_p given
24636         they act more like predicates and should be subject to
24637         "lost tail" side-effect preserving.
24639 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
24641         PR rtl-optimization/81611
24642         * auto-inc-dec.c (attempt_change): Move dead note from
24643         mem_insn if it's the next use of regno
24644         (find_address): Take address use of reg holding
24645         non-incremented value.  Add parm to limit search to the named
24646         reg only.
24647         (merge_in_block): Attempt to use a mem insn that is the next
24648         use of the original regno.
24650 2018-02-27  Martin Sebor  <msebor@redhat.com>
24652         PR c++/83871
24653         * doc/invoke.texi (-Wmissing-attributes): New option.
24654         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24656 2018-02-27  Martin Sebor  <msebor@redhat.com>
24658         PR translation/84207
24659         * diagnostic-core.h (warning_n, error_n, inform_n): Change
24660         n argument to unsigned HOST_WIDE_INT.
24661         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24662         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
24663         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24664         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24666 2018-02-27  Richard Biener  <rguenther@suse.de>
24668         PR tree-optimization/84512
24669         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24670         Do not use the estimate returned from record_stmt_cost for
24671         the scalar iteration cost but sum properly using add_stmt_cost.
24673 2018-02-27  Richard Biener  <rguenther@suse.de>
24675         PR tree-optimization/84466
24676         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24677         Adjust last change to less strictly validate use operands.
24679 2018-02-27  Martin Liska  <mliska@suse.cz>
24681         PR gcov-profile/84548
24682         * gcov.c (process_file): Allow partial overlap and consider it
24683         also as group functions.
24684         (output_lines): Properly calculate range of lines for a group.
24686 2018-02-27  Martin Liska  <mliska@suse.cz>
24688         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24689         'ggc' suffixes.  Change first column width.
24690         (timer::print): Fix formatting of the column.
24692 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
24694         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24695         preserve inline entry blocks for the sake of debug inline
24696         entry point markers alone.
24697         (remove_unused_locals): Suggest in comments a better place to
24698         force the preservation of inline entry blocks that are
24699         otherwise unused, but do not preserve them.
24701 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24703         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24705 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24707         PR target/84039
24708         * config/i386/constraints.md (Bs): Replace
24709         ix86_indirect_branch_register with
24710         TARGET_INDIRECT_BRANCH_REGISTER.
24711         (Bw): Likewise.
24712         * config/i386/i386.md (indirect_jump): Likewise.
24713         (tablejump): Likewise.
24714         (*sibcall_memory): Likewise.
24715         (*sibcall_value_memory): Likewise.
24716         Peepholes of indirect call and jump via memory: Likewise.
24717         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24718         (*sibcall_value_GOT_32): Likewise.
24719         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24720         (GOT_memory_operand): Likewise.
24721         (call_insn_operand): Likewise.
24722         (sibcall_insn_operand): Likewise.
24723         (GOT32_symbol_operand): Likewise.
24724         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24726 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
24728         PR rtl-optimization/83496
24729         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24730         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
24731         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24732         redundant insn, if any.
24733         (relax_delay_slots): Likewise.
24734         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24736 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
24738         PR tree-optimization/83965
24739         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24740         that grouped statements are part of a reduction chain.  Return
24741         true if the statement is not marked as a reduction itself but
24742         is part of a group.
24743         (vect_recog_dot_prod_pattern): Don't check whether the statement
24744         is part of a group here.
24745         (vect_recog_sad_pattern): Likewise.
24746         (vect_recog_widen_sum_pattern): Likewise.
24748 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
24750         PR debug/84545
24751         * final.c (rest_of_clean_state): Also look for calls inside sequences.
24753 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24755         PR target/84530
24756         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
24757         the bool argument.
24758         (ix86_output_indirect_function_return): New prototype.
24759         (ix86_split_simple_return_pop_internal): Likewise.
24760         * config/i386/i386.c (indirect_return_via_cx): New.
24761         (indirect_return_via_cx_bnd): Likewise.
24762         (indirect_thunk_name): Handle return va CX_REG.
24763         (output_indirect_thunk_function): Create alias for
24764         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
24765         (ix86_output_indirect_jmp): Remove the bool argument.
24766         (ix86_output_indirect_function_return): New function.
24767         (ix86_split_simple_return_pop_internal): Likewise.
24768         * config/i386/i386.md (*indirect_jump): Don't pass false
24769         to ix86_output_indirect_jmp.
24770         (*tablejump_1): Likewise.
24771         (simple_return_pop_internal): Change it to define_insn_and_split.
24772         Call ix86_split_simple_return_pop_internal to split it for
24773         -mfunction-return=.
24774         (simple_return_indirect_internal): Call
24775         ix86_output_indirect_function_return instead of
24776         ix86_output_indirect_jmp.
24778 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
24780         PR bootstrap/84405
24781         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
24782         memset and value initialization afterwards.
24784 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
24786         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
24788 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
24790         PR target/84521
24791         * common/config/aarch64/aarch64-common.c
24792         (aarch_option_optimization_table[]): Switch
24793         off fomit-frame-pointer
24795 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
24796             Chung-Ju Wu  <jasonwucj@gmail.com>
24798         * config/nds32/nds32-multiple.md (load_multiple): Disallow
24799         volatile memory.
24800         (store_multiple): Ditto.
24802 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
24804         * config.gcc: Add --with-cpu support for nds32 target.
24805         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
24806         * config/nds32/nds32.opt: Add -mcpu= option.
24808 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
24810         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
24811         isel=yes): Warn for these deprecated options.
24813 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
24815         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
24816         ISA_2_5_MASKS_EMBEDDED.
24818 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
24820         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
24821         p->max as pointers rather than using iterative_hash_expr.
24823 2018-02-23  Carl Love  <cel@us.ibm.com>
24825         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
24826         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
24827         BU_P8V_OVERLOAD_2.
24828         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
24829         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
24830         P8V_BUILTIN_VEC_VUNSIGNED2.
24832 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
24834         PR target/81572
24835         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
24836         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
24837         LRA_UNKNOWN_ALT.
24838         * lra-constraints.c (curr_insn_transform): Set up
24839         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
24840         LRA_UNKNOWN_ALT.
24841         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
24842         * lra-eliminations.c (spill_pseudos): Ditto.
24843         (process_insn_for_elimination): Ditto.
24844         * lra-lives.c (reg_early_clobber_p): Use the new macros.
24845         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
24846         LRA_NON_CLOBBERED_ALT.
24848 2018-02-22  Martin Sebor  <msebor@redhat.com>
24850         PR tree-optimization/84480
24851         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
24852         to maybe_diag_stxncpy_trunc.  Call it.
24853         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
24854         from gimple_fold_builtin_strcpy.  Print inlining stack.
24855         (handle_builtin_stxncpy): Print inlining stack.
24856         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
24858 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
24860         PR target/84176
24861         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
24862         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
24863         and -fcheck-pointer-bounds are used together.
24864         (indirect_thunk_prefix): New enum.
24865         (indirect_thunk_need_prefix): New function.
24866         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
24867         "_nt" instead of "_bnd" for NOTRACK prefix.
24868         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
24869         (output_indirect_thunk_function): Likewise.
24870         (): Likewise.
24871         (ix86_code_end): Update output_indirect_thunk_function calls.
24872         (ix86_output_indirect_branch_via_reg): Replace
24873         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
24874         (ix86_output_indirect_branch_via_push): Likewise.
24875         (ix86_output_function_return): Likewise.
24876         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
24877         incompatible with -fcf-protection=branch and
24878         -fcheck-pointer-bounds.
24880 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
24882         PR target/83335
24883         * config/aarch64/aarch64.c (aarch64_print_address_internal):
24884         Change gcc_assert call to output_operand_lossage.
24886 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
24888         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
24890 2018-02-22  DJ Delorie  <dj@redhat.com>
24891             Sebastian Perta  <sebastian.perta@renesas.com>
24892             Oleg Endo  <olegendo@gcc.gnu.org>
24894         * config/rx/rx.c (rx_rtx_costs): New function.
24895         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
24897 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24899         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
24901 2018-02-22  Martin Liska  <mliska@suse.cz>
24903         PR driver/83193
24904         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
24905         Add "native" as a possible value.
24907 2018-02-22  Martin Liska  <mliska@suse.cz>
24909         PR driver/83193
24910         * config/i386/i386.c (ix86_option_override_internal):
24911         Add "native" as a possible value for -march and -mtune.
24913 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
24915         PR target/84502
24916         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
24917         to all type variants.
24919         PR tree-optimization/84503
24920         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
24921         width as info->bitpos + info->bitsize - start.
24922         (merged_store_group::merge_overlapping): Simplify width computation.
24923         (check_no_overlap): New function.
24924         (imm_store_chain_info::try_coalesce_bswap): Compute expected
24925         start + width and last_order of the group, fail if check_no_overlap
24926         fails.
24927         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
24928         to group if check_no_overlap fails.
24930 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
24932         * config/rs6000/altivec.md: Delete contraint arguments to
24933         define_expand, define_split, and define_peephole2, and in
24934         define_insn_and_split if always unused.
24935         * config/rs6000/darwin.md: Ditto.
24936         * config/rs6000/dfp.md: Ditto.
24937         * config/rs6000/rs6000.md: Ditto.
24938         * config/rs6000/sync.md: Ditto.
24939         * config/rs6000/vector.md: Ditto.
24940         * config/rs6000/vsx.md: Ditto.
24942 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
24944         * config/rs6000/altivec.md: Write output control strings as braced
24945         blocks instead of double-quoted strings.
24946         * config/rs6000/darwin.md: Ditto.
24947         * config/rs6000/rs6000.md: Ditto.
24948         * config/rs6000/vector.md: Ditto.
24949         * config/rs6000/vsx.md: Ditto.
24951 2018-02-21  Jason Merrill  <jason@redhat.com>
24953         PR c++/84314 - ICE with templates and fastcall attribute.
24954         * attribs.c (build_type_attribute_qual_variant): Remove assert.
24956 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
24958         * ipa-cp.c (determine_versionability): Fix comment typos.
24960 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
24962         PR c/84229
24963         * ipa-cp.c (determine_versionability): Do not version functions caling
24964         va_arg_pack.
24966 2018-02-21  Martin Liska  <mliska@suse.cz>
24968         PR driver/83193
24969         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
24970         Add "native" as a possible value.
24971         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
24972         the macro when native cpu detection is available.
24974 2018-02-21  Martin Liska  <mliska@suse.cz>
24976         PR driver/83193
24977         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
24978         Add "native" as a possible value.
24979         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
24980         when native cpu detection is available.
24982 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
24983             Martin Sebor  <msebor@redhat.com>
24985         PR tree-optimization/84478
24986         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
24987         false.
24988         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
24989         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
24990         support which is conservatively correct, for 2 only stay conservative
24991         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
24992         argument to the 2 argument get_range_strlen, adjust 6 arg
24993         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
24994         false.
24995         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
24996         (gimple_fold_builtin_strlen): Pass true as last argument to
24997         get_range_strlen.
24999 2018-02-20  Martin Sebor  <msebor@redhat.com>
25001         PR middle-end/84095
25002         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
25003         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
25004         (builtin_memref::builtin_memref): Factor out parts into
25005         set_base_and_offset and call it.
25007 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
25009         PR middle-end/84406
25010         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
25011         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
25012         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
25013         search at the associated MODE_INT.
25015 2018-02-20  Jeff Law  <law@redhat.com>
25017         PR middle-end/82123
25018         PR tree-optimization/81592
25019         PR middle-end/79257
25020         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
25021         for range data rather than using global data.
25022         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
25023         range data rather than using global data.
25024         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
25025         pass it to children as needed.
25026         (struct directive::fmtresult): Similarly.
25027         (struct directive::set_width): Similarly.
25028         (struct directive::set_precision): Similarly.
25029         (format_integer, format_directive, parse_directive): Similarly.
25030         (format_none): Accept unnamed vr_values parameter.
25031         (format_percent, format_floating, format_character): Similarly.
25032         (format_string, format_plain): Similarly.
25033         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
25034         the EVRP range analyzer for range data rather than using global data.
25035         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
25036         gimple-ssa-evrp-analyze.h
25037         (class sprintf_dom_walker): Add after_dom_children member function.
25038         Add evrp_range_analyzer member.
25039         (sprintf_dom_walker::before_dom_children): Call into the EVRP
25040         range analyzer as needed.
25041         (sprintf_dom_walker::after_dom_children): New member function.
25042         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
25043         if not optimizing.
25044         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
25045         (evrp_range_analyzer::pop_to_marker): Likewise.
25047 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
25049         PR tree-optimization/84419
25050         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
25051         with the required type if its current type is compatible but
25052         different.
25054 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
25056         PR middle-end/82004
25057         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
25058         after vectorization.
25060 2018-02-20  Martin Liska  <mliska@suse.cz>
25062         PR driver/83193
25063         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
25064         possible values if we don't have a hint.
25066 2018-02-20  Martin Liska  <mliska@suse.cz>
25068         PR c/84310
25069         PR target/79747
25070         * final.c (shorten_branches): Build align_tab array with one
25071         more element.
25072         * opts.c (finish_options): Add alignment option limit check.
25073         (MAX_CODE_ALIGN): Likewise.
25074         (MAX_CODE_ALIGN_VALUE): Likewise.
25075         * doc/invoke.texi: Document maximum allowed option value for
25076         all -falign-* options.
25078 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
25080         PR target/84146
25081         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
25082         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
25083         * var-tracking.c (emit_note_insn_var_location): Remove all references
25084         to NOTE_INSN_CALL_ARG_LOCATION.
25085         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
25086         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
25087         Use copy_rtx_if_shared.
25088         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
25089         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
25090         (dwarf2out_var_location): Remove handling of
25091         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
25092         on call_insn.
25093         * final.c (final_scan_insn): Remove all references to
25094         NOTE_INSN_CALL_ARG_LOCATION.
25095         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
25096         before dumping final insns.
25097         * except.c (emit_note_eh_region_end): Remove all references to
25098         NOTE_INSN_CALL_ARG_LOCATION.
25099         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
25100         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
25101         * config/arc/arc.c (hwloop_optimize): Likewise.
25102         * config/arm/arm.c (create_fix_barrier): Likewise.
25103         * config/s390/s390.c (s390_chunkify_start): Likewise.
25104         * config/sh/sh.c (find_barrier): Likewise.
25105         * config/i386/i386.c (rest_of_insert_endbranch,
25106         ix86_seh_fixup_eh_fallthru): Likewise.
25107         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
25108         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
25109         * config/frv/frv.c (frv_function_prologue): Likewise.
25110         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
25111         reg note.
25112         (note_outside_basic_block_p): Remove all references to
25113         NOTE_INSN_CALL_ARG_LOCATION.
25114         * gengtype.c (adjust_field_rtx_def): Likewise.
25115         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
25116         Likewise.
25117         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
25118         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
25120         PR c++/84444
25121         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
25122         is ADDR_EXPR.
25124         PR tree-optimization/84452
25125         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
25126         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
25127         is NULL.
25129 2018-02-19  Martin Liska  <mliska@suse.cz>
25131         PR sanitizer/82183
25132         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
25134 2018-02-19  Martin Liska  <mliska@suse.cz>
25135             Richard Sandiford  <richard.sandiford@linaro.org>
25137         PR tree-optimization/82491
25138         * gimple-fold.c (get_base_constructor): Make earlier bail out
25139         to prevent ubsan.
25141 2018-02-19  Carl Love  <cel@us.ibm.com>
25143         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
25144         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
25145         BU_P8V_OVERLOAD_1.
25146         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
25147         P8V_BUILTIN_VEC_NEG.
25149 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
25151         * config/rl78/rl78.md (movdf): New define expand.
25153 2018-02-19  Martin Liska  <mliska@suse.cz>
25155         PR other/80589
25156         * doc/invoke.texi: Fix typo.
25157         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
25159 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
25161         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
25162         handle rs6000_single_float and rs6000_double_float specially for
25163         e500 family CPUs.
25165 2018-02-16  Jeff Law  <law@redhat.com>
25167         * config/rx/rx.c (add_pop_cfi_notes): New function.;
25168         (pop_regs): Use it.
25170 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
25172         PR ipa/84425
25173         * ipa-inline.c (inline_small_functions): Fix a typo.
25175 2018-02-16  Nathan Sidwell  <nathan@acm.org>
25177         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
25179 2018-02-16  Carl Love  <cel@us.ibm.com>
25181         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
25182         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
25183         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
25184         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
25185         expansion to P8V_BUILTIN_VEC_FLOAT2.
25187 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
25189         PR rtl-optimization/70023
25190         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
25191         src_regno into account.
25193 2018-02-16  Carl Love  <cel@us.ibm.com>
25195         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
25196         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
25197         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
25198         * config/rs6000/rs6000.c: Remove case statements for
25199         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
25200         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
25201         and P9V_BUILTIN_VEC_VINSERT4B.
25202         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
25203         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
25204         * config/rs6000/vsx.md:
25205         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
25206         vec_insert4b.
25208 2018-02-16  Carl Love  <cel@us.ibm.com>
25210         * config/rs6000/altivec.h: Add builtin names vec_extract4b
25211         vec_insert4b.
25212         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
25213         definitions.
25214         * config/rs6000/rs6000-c.c: Add the definitions for
25215         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
25216         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
25217         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
25218         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
25219         definition for insert4b and define insn *insert3b_internal.
25220         * doc/extend.texi: Add documentation for vec_extract4b.
25222 2018-02-16  Nathan Sidwell  <nathan@acm.org>
25224         * doc/extend.texi (Backwards Compatibility): Mention friend
25225         injection.  Note for-scope is deprecated.
25226         * doc/invoke.texi (-ffriend-injection): Deprecate.
25228 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
25230         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25231         that moved to I2, also allow destinations that are a paradoxical
25232         subreg (instead of a normal reg).
25234 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
25236         PR target/83831
25237         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25238         to QImode.
25240 2018-02-16  Richard Biener  <rguenther@suse.de>
25242         PR tree-optimization/84037
25243         PR tree-optimization/84016
25244         PR target/82862
25245         * config/i386/i386.c (ix86_builtin_vectorization_cost):
25246         Adjust vec_construct for the fact we need additional higher latency
25247         128bit inserts for AVX256 and AVX512 vector builds.
25248         (ix86_add_stmt_cost): Scale vector construction cost for
25249         elementwise loads.
25251 2018-02-16  Richard Biener  <rguenther@suse.de>
25253         PR tree-optimization/84417
25254         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25255         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25256         (non_rewritable_lvalue_p): Likewise, use poly-ints.
25258 2018-02-16  Martin Liska  <mliska@suse.cz>
25260         PR sanitizer/84307
25261         * internal-fn.def (ASAN_CHECK): Set proper flags.
25262         (ASAN_MARK): Likewise.
25264 2018-02-16  Julia Koval  <julia.koval@intel.com>
25266         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25267         from PTA_CANNONLAKE.
25269 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
25271         PR target/84272
25272         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25273         Use ++iter rather than iter++ for std::list iterators.
25274         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
25275         defer deleting them until all nodes in the forest are processed.  Do
25276         free even leaf nodes.  Change to_process into auto_vec.
25278         PR bootstrap/84405
25279         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25280         * vec.h (vec_default_construct): Use memset instead of placement new
25281         if BROKEN_VALUE_INITIALIZATION is defined.
25282         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25283         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25284         is defined.
25286         PR rtl-optimization/83723
25287         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25288         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
25289         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
25290         recursive calls.
25291         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25292         callers.
25293         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25295 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
25297         PR rtl-optimization/81443
25298         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25299         from inner REGs to paradoxical SUBREGs.
25301 2018-02-16  Richard Biener  <rguenther@suse.de>
25303         PR tree-optimization/84399
25304         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25305         For operands we can analyze at their definition make sure we can
25306         analyze them at each use as well.
25308 2018-02-16  Richard Biener  <rguenther@suse.de>
25310         PR tree-optimization/84190
25311         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25312         volatile accesses if the decl isn't volatile.
25314 2018-02-15  Jason Merrill  <jason@redhat.com>
25316         PR c++/84314 - ICE with templates and fastcall attribute.
25317         * attribs.c (build_type_attribute_qual_variant): Don't clobber
25318         TYPE_CANONICAL on an existing type.
25320 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
25322         PR tree-optimization/84383
25323         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25324         dstoff nor call operand_equal_p if dstbase is NULL.
25326         PR tree-optimization/84334
25327         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25328         also a CONSTANT_CLASS_P, punt.
25330 2018-02-14  Jim Wilson  <jimw@sifive.com>
25332         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25333         first SMALL_OPERAND check.  New local min_second_step.  Move assert
25334         to where locals are set.  Add TARGET_RVC support.
25335         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25337 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
25339         * doc/invoke.texi: Correct -Wformat-overflow code sample.
25341 2018-02-14  Martin Sebor  <msebor@redhat.com>
25343         PR tree-optimization/83698
25344         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25345         arrays constrain the offset range to their bounds.
25346         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25347         (builtin_access::overlap): Avoid setting the size of overlap if it's
25348         already been set.
25349         (maybe_diag_overlap): Also consider arrays when deciding what values
25350         of offsets to include in diagnostics.
25352 2018-02-14  Martin Sebor  <msebor@redhat.com>
25354         PR c/84108
25355         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25356         that correspond to the kind of a declaration.
25358 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
25360         PR target/83984
25361         * config/pa/pa.md: Load address of PIC label using the linkage table
25362         if the label is nonlocal.
25364 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25366         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25367         warning message if user requests -maltivec=be.
25368         * doc/invoke.texi: Document deprecation of -maltivec=be.
25370 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
25372         PR target/84220
25373         * config/rs6000/rs6000-c.c: Update definitions for
25374         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25375         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25377 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
25379         PR target/84239
25380         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25381         add _get_ssp intrinsics. Remove argument from
25382         __builtin_ia32_rdssp[d|q].
25383         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25384         * config/i386/i386-builtin.def: Remove argument from
25385         __builtin_ia32_rdssp[d|q].
25386         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25387         ix86_expand_special_args_builtin for _rdssp[d|q].
25388         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25389         Clear register before usage.
25390         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25391         Add documentation for new _get_ssp and _inc_ssp intrinsics.
25393 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
25395         PR tree-optimization/84357
25396         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25397         operand 1 of an ARRAY_REF too.
25399 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
25401         PR target/83831
25402         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25403         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25404         declarations.
25405         (set_of_reg): New struct.
25406         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25407         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25408         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25409         functions.
25410         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25411         Split into bitclr, bitset, bitinvert patterns if appropriate.
25412         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25413         use rx_fuse_in_memory_bitop.
25414         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25415         to named insn, correct maximum insn length.
25417 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
25419         PR target/79242
25420         * machmode.def: Define a complex mode for PARTIAL_INT.
25421         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25422         MODE_PARTIAL_INT.
25423         * doc/rtl.texi: Document CSPImode.
25424         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25425         handling.
25426         (msp430_hard_regno_nregs_with_padding): Likewise.
25428 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
25430         PR target/84279
25431         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25433 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
25435         PR rtl-optimization/84169
25436         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
25437         we generated a parallel as new i3 and we split that to new i2 and i3
25438         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
25439         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
25440         those to i2, not i1.  Partially rewrite this scan code.
25442 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
25444         PR c/82210
25445         * stor-layout.c (place_field): For variable length fields, adjust
25446         offset_align afterwards not just based on the field's alignment,
25447         but also on the size.
25449         PR middle-end/84309
25450         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25451         of exps and logs in the use_exp2 case.
25453 2018-02-13  Jeff Law  <law@redhat.com>
25455         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25456         entry for "vector".
25458         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25459         ARGS as unused.
25461 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
25463         PR debug/84342
25464         PR debug/84319
25465         * common.opt (gas-loc-support, gas-locview-support): New.
25466         (ginline-points, ginternal-reset-location-views): New.
25467         * doc/invoke.texi: Document them.  Use @itemx where intended.
25468         (gvariable-location-views): Adjust.
25469         * target.def (reset_location_view): New.
25470         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25471         (TARGET_RESET_LOCATION_VIEW): New.
25472         * doc/tm.texi: Rebuilt.
25473         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25474         (dwarf2out_default_as_locview_support): New.
25475         (output_asm_line_debug_info): Use option variables.
25476         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25477         (output_loc_list): Likewise.
25478         (add_high_low_attributes): Check option variables.
25479         Don't output entry view attribute in strict mode.
25480         (gen_inlined_subroutine_die): Check option variables.
25481         (dwarf2out_inline_entry): Likewise.
25482         (init_sections_and_labels): Likewise.
25483         (dwarf2out_early_finish): Likewise.
25484         (maybe_reset_location_view): New, from...
25485         (dwarf2out_var_location): ... here.  Call it.
25486         * debug.h (dwarf2out_default_as_loc_support): Declare.
25487         (dwarf2out_default_as_locview_support): Declare.
25488         * hooks.c (hook_int_rtx_insn_0): New.
25489         * hooks.h (hook_int_rtx_insn_0): Declare.
25490         * toplev.c (process_options): Take -gas-loc-support and
25491         -gas-locview-support from dwarf2out.  Enable
25492         -gvariable-location-views by default only with locview
25493         assembler support.  Enable -ginternal-reset-location-views by
25494         default only if the target defines the corresponding hook.
25495         Enable -ginline-points by default if location views are
25496         enabled; force it disabled if statement frontiers are
25497         disabled.
25498         * tree-inline.c (expand_call_inline): Check option variables.
25499         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25501 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
25503         PR tree-optimization/84321
25504         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25505         handling.  Also check whether the anti-range contains any values
25506         that satisfy the mask; switch to a VR_RANGE if not.
25508 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
25510         PR sanitizer/84340
25511         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25513 2018-02-13  Martin Jambor  <mjambor@suse.cz>
25515         PR c++/83990
25516         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25517         of call statements, also set location of a load to a temporary.
25519 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
25521         * config/rl78/rl78.c (add_vector_labels): New function.
25522         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25523         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25524         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25525         which checks that no arguments are passed.
25526         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25527         * doc/extend.texi: Documentation for the new attribute.
25529 2018-02-13  Andreas Schwab  <schwab@suse.de>
25531         * config/riscv/linux.h (CPP_SPEC): Define.
25533 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
25535         PR target/84335
25536         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25537         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25538         OPTION_MASK_ISA_AES as first argument to def_builtin_const
25539         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25540         instead of OPTION_MASK_ISA_PCLMUL as first argument to
25541         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25542         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25543         temporarily for AES and PCLMUL builtins.
25545         PR tree-optimization/84339
25546         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25547         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25548         Formatting fixes.
25550         PR middle-end/84309
25551         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25552         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25553         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25554         inline function.
25555         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25556         inline function.
25557         * omp-simd-clone.h: New file.
25558         * omp-simd-clone.c: Include omp-simd-clone.h.
25559         (expand_simd_clones): No longer static.
25560         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25561         cgraph.h and omp-simd-clone.h.
25562         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25563         (vect_recog_widen_shift_pattern): Formatting fix.
25564         (vect_pattern_recog_1): Don't check optab for calls.
25566         PR target/84336
25567         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25568         operands[2] into a REG before using gen_lowpart on it.
25570 2018-02-12  Jeff Law  <law@redhat.com>
25572         PR target/83760
25573         * config/sh/sh.c (find_barrier): Consider a sibling call
25574         a barrier as well.
25576         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25577         successfully back substituting a reg.
25579 2018-02-12  Richard Biener  <rguenther@suse.de>
25581         PR tree-optimization/84037
25582         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25583         parameter, move visited init to caller.
25584         (vect_slp_analyze_operations): Separate cost from validity
25585         check, initialize visited once for all instances.
25586         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25587         for all instances.
25588         * tree-vect-stmts.c (vect_model_simple_cost): Make early
25589         out an assert.
25590         (vect_model_promotion_demotion_cost): Likewise.
25591         (vectorizable_bswap): Guard cost modeling with !slp_node
25592         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25593         SLP stmts.
25594         (vectorizable_call): Likewise.
25595         (vectorizable_conversion): Likewise.
25596         (vectorizable_assignment): Likewise.
25597         (vectorizable_shift): Likewise.
25598         (vectorizable_operation): Likewise.
25599         (vectorizable_store): Likewise.
25600         (vectorizable_load): Likewise.
25601         (vectorizable_condition): Likewise.
25602         (vectorizable_comparison): Likewise.
25604 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
25606         PR sanitizer/84307
25607         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25608         (ASAN_MARK): Fix fnspec to account for return value, change pointer
25609         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25611 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
25613         PR middle-end/83665
25614         * params.def (inline-min-speedup): Increase from 8 to 15.
25615         (max-inline-insns-auto): Decrease from 40 to 30.
25616         * ipa-split.c (consider_split): Add some buffer for function to
25617         be considered inlining candidate.
25618         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25619         default values.
25621 2018-02-12  Richard Biener  <rguenther@suse.de>
25623         PR tree-optimization/84037
25624         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25625         matched stmts if we cannot swap the non-matched ones.
25627 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
25629         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25630         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25631         _mm_maskz_scalef_round_ss): New intrinsics.
25632         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25633         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25634         __builtin_ia32_scalefss_round): Remove.
25635         (__builtin_ia32_scalefsd_mask_round,
25636         __builtin_ia32_scalefss_mask_round): New intrinsics.
25637         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25638         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25639         ((match_operand:VF_128 2 "<round_nimm_predicate>"
25640         "<round_constraint>")): Changed to ...
25641         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25642         "<round_scalar_constraint>")): ... this.
25643         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25644         %0, %1, %2<round_op3>}"): Changed to ...
25645         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25646         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25647         %2<round_scalar_mask_op3>}"): ... this.
25648         * config/i386/subst.md (round_scalar_nimm_predicate): New.
25650 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
25652         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25653         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25654         (_mm_maskz_sqrt_round_ss): New intrinsics.
25655         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25656         (__builtin_ia32_sqrtsd_mask_round)
25657         (__builtin_ia32_sqrtss_mask_round): New builtins.
25658         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25659         (__builtin_ia32_sqrtss_round): Remove.
25660         (__builtin_ia32_sqrtsd_mask_round)
25661         (__builtin_ia32_sqrtss_mask_round): New builtins.
25662         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25663         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25664         ((match_operand:VF_128 1 "vector_operand"
25665         "xBm,<round_constraint>")): Changed to ...
25666         ((match_operand:VF_128 1 "vector_operand"
25667         "xBm,<round_scalar_constraint>")): ... this.
25668         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25669         %0, %2, %<iptr>1<round_op3>}): Changed to ...
25670         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25671         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25672         %<iptr>1<round_scalar_mask_op3>}): ... this.
25673         ((set_attr "prefix" "<round_prefix>")): Changed to ...
25674         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25676 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
25678         PR target/84266
25679         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25680         Cast vec_cmpeq result to correct type.
25681         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25682         Cast vec_cmpgt result to correct type.
25684 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
25686         * final.c (final_scan_insn_1): Renamed from...
25687         (final_scan_insn): ... this.  New wrapper, to recover
25688         seen from the outermost call in recursive ones.
25689         * config/sparc/sparc.c (output_return): Drop seen from call.
25690         (output_sibcall): Likewise.
25691         * config/visium/visium.c (output_branch): Likewise.
25693 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
25695         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25696         function label.
25698 2018-02-10  Alan Modra  <amodra@gmail.com>
25700         PR target/84300
25701         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25702         Specify LR as an input.
25704 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
25706         PR sanitizer/83987
25707         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25708         remove_member_access_dummy_vars): New functions.
25709         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25710         lower_omp_1, execute_lower_omp): Use them.
25712         PR rtl-optimization/84308
25713         * shrink-wrap.c (spread_components): Release todo vector.
25715 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
25717         PR rtl-optimization/57193
25718         * ira-color.c (struct allocno_color_data): Add member
25719         conflict_allocno_hard_prefs.
25720         (update_conflict_allocno_hard_prefs): New.
25721         (bucket_allocno_compare_func): Add a preference based on
25722         conflict_allocno_hard_prefs.
25723         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25724         (color_allocnos): Remove a dead code.  Initiate
25725         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
25727 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
25729         PR target/84226
25730         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25731         constraint from =wa to wa.  Avoid a subreg on the output operand,
25732         instead use a pseudo and subreg it in a move.
25733         (p9_xxbrd_<mode>): Changed to ...
25734         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25735         (p9_xxbrd_v2df): New expander.
25736         (p9_xxbrw_<mode>): Changed to ...
25737         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25738         (p9_xxbrw_v4sf): New expander.
25740 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
25742         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25744 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
25746         PR target/83926
25747         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25748         multiply in 32-bit mode.
25749         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25750         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25751         mode.
25753 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
25755         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25756         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25757         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
25758         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
25760 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
25762         PR lto/84213
25763         * dwarf2out.c (is_trivial_indirect_ref): New function.
25764         (dwarf2out_late_global_decl): Do not generate a location
25765         attribute for variables that have a non-trivial DECL_VALUE_EXPR
25766         and that are not defined in the current unit.
25768 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
25770         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
25771         instead of a libcall for UNORDERED.
25773 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
25775         PR target/82641
25776         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
25777         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
25779 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25781         PR target/PR84295
25782         * config/s390/s390.c (s390_set_current_function): Invoke
25783         s390_indirect_branch_settings also if fndecl didn't change.
25785 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
25787         * config/rs6000/rs6000.md (blockage): Set length to zero.
25789 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
25791         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
25793 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
25795         PR sanitizer/84285
25796         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
25797         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
25798         -static-lib*san.
25800         PR debug/84252
25801         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
25802         PARALLEL incoming that failed vt_get_decl_and_offset check.
25804         PR middle-end/84237
25805         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
25806         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
25807         TREE_READONLY bit.
25808         (get_variable_section): For decls in named .bss* sections pass true as
25809         second argument to bss_initializer_p.
25811 2018-02-09  Marek Polacek  <polacek@redhat.com>
25812             Jakub Jelinek  <jakub@redhat.com>
25814         PR c++/83659
25815         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
25816         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
25817         Sync some changes from cxx_fold_indirect_ref.
25819 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
25821         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
25822         markers.
25823         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
25824         (BLOCK_INLINE_ENTRY_LABEL): New.
25825         (dwarf2out_var_location): Disregard inline entry markers.
25826         (inline_entry_data): New struct.
25827         (inline_entry_data_hasher): New hashtable type.
25828         (inline_entry_data_hasher::hash): New.
25829         (inline_entry_data_hasher::equal): New.
25830         (inline_entry_data_table): New variable.
25831         (add_high_low_attributes): Add DW_AT_entry_pc and
25832         DW_AT_GNU_entry_view attributes if a pending entry is found
25833         in inline_entry_data_table.  Add old entry_pc attribute only
25834         if debug nonbinding markers are disabled.
25835         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
25836         markers are enabled.
25837         (block_within_block_p, dwarf2out_inline_entry): New.
25838         (dwarf2out_finish): Check that no entries remained in
25839         inline_entry_data_table.
25840         * final.c (reemit_insn_block_notes): Handle inline entry notes.
25841         (final_scan_insn, notice_source_line): Likewise.
25842         (rest_of_clean_state): Skip inline entry markers.
25843         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
25844         markers.
25845         * gimple.c (gimple_build_debug_inline_entry): New.
25846         * gimple.h (enum gimple_debug_subcode): Add
25847         GIMPLE_DEBUG_INLINE_ENTRY.
25848         (gimple_build_debug_inline_entry): Declare.
25849         (gimple_debug_inline_entry_p): New.
25850         (gimple_debug_nonbind_marker_p): Adjust.
25851         * insn-notes.def (INLINE_ENTRY): New.
25852         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
25853         inline entry marker notes.
25854         (print_insn): Likewise.
25855         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
25856         (INSN_DEBUG_MARKER_KIND): Likewise.
25857         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
25858         * tree-inline.c (expand_call_inline): Build and insert
25859         debug_inline_entry stmt.
25860         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
25861         inline entry blocks early, if nonbind markers are enabled.
25862         (dump_scope_block): Dump fragment info.
25863         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
25864         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
25865         (gimple_build_debug_inline_entry): New.
25866         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
25867         Enable/disable inline entry points too.
25868         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
25869         (DEBUG_INSN): Describe inline entry markers.
25871         * common.opt (gvariable-location-views): New.
25872         (gvariable-location-views=incompat5): New.
25873         * config.in: Rebuilt.
25874         * configure: Rebuilt.
25875         * configure.ac: Test assembler for view support.
25876         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
25877         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
25878         * dwarf2out.c (var_loc_view): New typedef.
25879         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
25880         (dwarf2out_locviews_in_attribute): New.
25881         (dwarf2out_locviews_in_loclist): New.
25882         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
25883         (enum dw_line_info_opcode): Add LI_adv_address.
25884         (struct dw_line_info_table): Add view.
25885         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
25886         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
25887         (zero_view_p): New variable.
25888         (ZERO_VIEW_P): New macro.
25889         (output_asm_line_debug_info): New.
25890         (struct var_loc_node): Add view.
25891         (add_AT_view_list, AT_loc_list): New.
25892         (add_var_loc_to_decl): Add view param.  Test it against last.
25893         (new_loc_list): Add view params.  Record them.
25894         (AT_loc_list_ptr): Handle loc and view lists.
25895         (view_list_to_loc_list_val_node): New.
25896         (print_dw_val): Handle dw_val_class_view_list.
25897         (size_of_die): Likewise.
25898         (value_format): Likewise.
25899         (loc_list_has_views): New.
25900         (gen_llsym): Set vl_symbol too.
25901         (maybe_gen_llsym, skip_loc_list_entry): New.
25902         (dwarf2out_maybe_output_loclist_view_pair): New.
25903         (output_loc_list): Output view list or entries too.
25904         (output_view_list_offset): New.
25905         (output_die): Handle dw_val_class_view_list.
25906         (output_dwarf_version): New.
25907         (output_compilation_unit_header): Use it.
25908         (output_skeleton_debug_sections): Likewise.
25909         (output_rnglists, output_line_info): Likewise.
25910         (output_pubnames, output_aranges): Update version comments.
25911         (output_one_line_info_table): Output view numbers in asm comments.
25912         (dw_loc_list): Determine current endview, pass it to new_loc_list.
25913         Call maybe_gen_llsym.
25914         (loc_list_from_tree_1): Adjust.
25915         (add_AT_location_description): Create view list attribute if
25916         needed, check it's absent otherwise.
25917         (convert_cfa_to_fb_loc_list): Adjust.
25918         (maybe_emit_file): Call output_asm_line_debug_info for test.
25919         (dwarf2out_var_location): Reset views as needed.  Precompute
25920         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
25921         attribute.  Set view.
25922         (new_line_info_table): Reset next view.
25923         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
25924         (dwarf2out_source_line): Likewise.  Output view resets and labels to
25925         the assembler, or select appropriate line info opcodes.
25926         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
25927         (optimize_string_length): Catch it.  Adjust.
25928         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
25929         dw_val_class_view_list, and remove it if no longer needed.
25930         (hash_loc_list): Hash view numbers.
25931         (loc_list_hasher::equal): Compare them.
25932         (optimize_location_lists): Check whether a view list symbol is
25933         needed, and whether the locview attribute is present, and
25934         whether they match.  Remove the locview attribute if no longer
25935         needed.
25936         (index_location_lists): Call skip_loc_list_entry for test.
25937         (dwarf2out_finish): Call output_asm_line_debug_info for test.
25938         Use output_dwarf_version.
25939         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
25940         (struct dw_val_node): Add val_view_list.
25941         * final.c (SEEN_NEXT_VIEW): New.
25942         (set_next_view_needed): New.
25943         (clear_next_view_needed): New.
25944         (maybe_output_next_view): New.
25945         (final_start_function): Rename to...
25946         (final_start_function_1): ... this.  Take pointer to FIRST,
25947         add SEEN parameter.  Emit param bindings in the initial view.
25948         (final_start_function): Reintroduce SEEN-less interface.
25949         (final): Rename to...
25950         (final_1): ... this.  Take SEEN parameter.  Output final pending
25951         next view at the end.
25952         (final): Reintroduce seen-less interface.
25953         (final_scan_insn): Output pending next view before switching
25954         sections or ending a block.  Mark the next view as needed when
25955         outputting variable locations.  Notify debug backend of section
25956         changes, and of location view changes.
25957         (rest_of_handle_final): Adjust.
25958         * toplev.c (process_options): Autodetect value for debug variable
25959         location views option.  Warn on incompat5 without -gdwarf-5.
25960         * doc/invoke.texi (gvariable-location-views): New.
25961         (gvariable-location-views=incompat5): New.
25962         (gno-variable-location-views): New.
25964 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
25966         PR tree-optimization/84136
25967         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
25968         that the result of find_edge is non-NULL.
25970 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
25972         PR target/83008
25973         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
25974         storing integer register in SImode.  Fix cost of 256 and 512
25975         byte aligned SSE register store.
25977 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
25979         * config/i386/i386.c (ix86_multiplication_cost): Fix
25980         multiplication cost for TARGET_AVX512DQ.
25982 2018-02-08  Marek Polacek  <polacek@redhat.com>
25984         PR tree-optimization/84238
25985         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
25986         get_range_strlen.
25988 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25990         PR tree-optimization/84265
25991         * tree-vect-stmts.c (vectorizable_store): Don't treat
25992         VMAT_CONTIGUOUS accesses as grouped.
25993         (vectorizable_load): Likewise.
25995 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25997         PR tree-optimization/81635
25998         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
25999         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
26000         (test_round_for_mask): New functions.
26001         (wide_int_cc_tests): Call test_round_for_mask.
26002         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
26003         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
26004         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
26005         range returned by get_range_info.
26007 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
26009         PR ipa/81360
26010         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
26011         * symtab.c: Include builtins.h
26012         (symtab_node::output_to_lto_symbol_table_p): Move here
26013         from lto-streamer-out.c:output_symbol_p.
26014         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
26015         (output_symbol_p): Move all logic to symtab.c
26016         (produce_symtab): Update.
26018 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26020         * config/s390/s390-opts.h (enum indirect_branch): Define.
26021         * config/s390/s390-protos.h (s390_return_addr_from_memory)
26022         (s390_indirect_branch_via_thunk)
26023         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
26024         (enum s390_indirect_branch_type): Define.
26025         * config/s390/s390.c (struct s390_frame_layout, struct
26026         machine_function): Remove.
26027         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
26028         (indirect_branch_table_label_no, indirect_branch_table_name):
26029         Define variables.
26030         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
26031         (enum s390_indirect_branch_option): Define.
26032         (s390_return_addr_from_memory): New function.
26033         (s390_handle_string_attribute): New function.
26034         (s390_attribute_table): Add new attribute handler.
26035         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
26036         (s390_indirect_branch_via_thunk): New function.
26037         (s390_indirect_branch_via_inline_thunk): New function.
26038         (s390_function_ok_for_sibcall): When jumping via thunk disallow
26039         sibling call optimization for non z10 compiles.
26040         (s390_emit_call): Force indirect branch target to be a single
26041         register.  Add r1 clobber for non-z10 compiles.
26042         (s390_emit_epilogue): Emit return jump via return_use expander.
26043         (s390_reorg): Handle JUMP_INSNs as execute targets.
26044         (s390_option_override_internal): Perform validity checks for the
26045         new command line options.
26046         (s390_indirect_branch_attrvalue): New function.
26047         (s390_indirect_branch_settings): New function.
26048         (s390_set_current_function): Invoke s390_indirect_branch_settings.
26049         (s390_output_indirect_thunk_function):  New function.
26050         (s390_code_end): Implement target hook.
26051         (s390_case_values_threshold): Implement target hook.
26052         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
26053         macros.
26054         * config/s390/s390.h (struct s390_frame_layout)
26055         (struct machine_function): Move here from s390.c.
26056         (TARGET_INDIRECT_BRANCH_NOBP_RET)
26057         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
26058         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
26059         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
26060         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
26061         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
26062         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
26063         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
26064         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
26065         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
26066         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
26067         (mnemonic attribute): Add values which aren't recognized
26068         automatically.
26069         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
26070         pattern for branch conversion.  Fix mnemonic attribute.
26071         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
26072         indirect branch via thunk if requested.
26073         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
26074         ("*indirect_jump"): Disable for branch conversion using out of
26075         line thunks.
26076         ("indirect_jump_via_thunk<mode>_z10")
26077         ("indirect_jump_via_thunk<mode>")
26078         ("indirect_jump_via_inlinethunk<mode>_z10")
26079         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
26080         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
26081         ("casesi_jump_via_inlinethunk<mode>_z10")
26082         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
26083         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
26084         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
26085         ("*indirect2_jump"): Disable for branch conversion.
26086         ("casesi_jump"): Turn into expander and expand patterns for branch
26087         conversion.
26088         ("return_use"): New expander.
26089         ("*return"): Emit return via thunk and rename it to ...
26090         ("*return<mode>"): ... this one.
26091         * config/s390/s390.opt: Add new options and and enum for the
26092         option values.
26094 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
26096         * lra-constraints.c (match_reload): Unconditionally use
26097         gen_lowpart_SUBREG, rather than selecting between that
26098         and equivalent gen_rtx_SUBREG code.
26100 2018-02-08  Richard Biener  <rguenther@suse.de>
26102         PR tree-optimization/84233
26103         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
26104         changed flag instead of boguously re-using phi_inserted.
26106 2018-02-08  Martin Jambor  <mjambor@suse.cz>
26108         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
26109         static local variables.
26111 2018-02-08  Richard Biener  <rguenther@suse.de>
26113         PR tree-optimization/84278
26114         * tree-vect-stmts.c (vectorizable_store): When looking for
26115         smaller vector types to perform grouped strided loads/stores
26116         make sure the mode is supported by the target.
26117         (vectorizable_load): Likewise.
26119 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
26121         * config/aarch64/aarch64.c (aarch64_components_for_bb):
26122         Increase LDP/STP opportunities by adding adjacent callee-saves.
26124 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
26126         PR rtl-optimization/84068
26127         PR rtl-optimization/83459
26128         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
26130 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
26132         PR tree-optimization/84224
26133         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
26134         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
26135         non-zero arguments.
26137 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
26139         PR target/84113
26140         * config/rs6000/altivec.md (*restore_world): Remove LR use.
26141         * config/rs6000/predicates.md (restore_world_operation): Adjust op
26142         count, remove one USE.
26144 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
26146         * doc/install.texi (Configuration): Document the
26147         --with-long-double-format={ibm,ieee} PowerPC configuration
26148         options.
26150         PR target/84154
26151         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
26152         Convert from define_expand to be define_insn_and_split.  Rework
26153         float/double/_Float128 conversions to QI/HI/SImode to work with
26154         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
26155         conversions to QI/HImode types did a store and then a load to
26156         truncate the value.  For conversions to VSX registers, don't split
26157         the insn, instead emit the code directly.  Use the code iterator
26158         any_fix to combine signed and unsigned conversions.
26159         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
26160         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
26161         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26162         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
26163         (fix_<mode>di2_hw): Likewise.
26164         (fixuns_<mode>di2_hw): Likewise.
26165         (fix_<mode>si2_hw): Likewise.
26166         (fixuns_<mode>si2_hw): Likewise.
26167         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
26168         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26169         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
26170         fix<uns>_trunc<SFDF:mode>si2_p8.
26171         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
26172         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
26173         (fix<uns>_<mode>_mem): Likewise.
26174         (fctiw<u>z_<mode>_mem): Likewise.
26175         (fix<uns>_<mode>_mem): Likewise.
26176         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
26177         the register allocator from doing a direct move to the GPRs to do
26178         a store, and instead use the ISA 3.0 store byte/half-word from
26179         vector register instruction.  For IEEE 128-bit floating point,
26180         also optimize stores of 32-bit ints.
26181         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
26183 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
26185         * genextract.c (push_pathstr_operand): New function to support
26186         [a-zA-Z].
26187         (walk_rtx): Call push_pathstr_operand.
26188         (print_path): Support [a-zA-Z].
26190 2018-02-07  Richard Biener  <rguenther@suse.de>
26192         PR tree-optimization/84037
26193         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
26194         (cse_and_gimplify_to_preheader): Declare.
26195         (vect_get_place_in_interleaving_chain): Likewise.
26196         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26197         ivexpr_map.
26198         (_loop_vec_info::~_loop_vec_info): Delete it.
26199         (cse_and_gimplify_to_preheader): New function.
26200         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
26201         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
26202         (vectorizable_load): Likewise.  For grouped stores always base
26203         the IV on the first element.
26204         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
26205         condition before gimplifying.
26207 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
26209         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
26210         *DIV_EXPR and *MOD_EXPR.
26212 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
26214         PR target/84248
26215         * config/i386/i386.c (ix86_option_override_internal): Mask out
26216         the CF_SET bit when checking -fcf-protection.
26218 2018-02-07  Tom de Vries  <tom@codesourcery.com>
26220         PR libgomp/84217
26221         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26222         enough.
26224 2018-02-07  Richard Biener  <rguenther@suse.de>
26226         PR tree-optimization/84204
26227         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26228         this place.
26230         PR tree-optimization/84205
26231         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26232         special-case isl_ast_op_zdiv_r.
26234         PR tree-optimization/84223
26235         * graphite-scop-detection.c (gather_bbs::before_dom_children):
26236         Only add conditions from within the region.
26237         (gather_bbs::after_dom_children): Adjust.
26239 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
26241         PR target/84209
26242         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26243         * config/avr/avr.md: Only post-reload split REG-REG moves if
26244         either register is GENERAL_REG_P.
26246 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
26248         PR tree-optimization/84235
26249         * tree-ssa-scopedtables.c
26250         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26251         if the subtraction is performed in floating point type where NaNs are
26252         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26253         build 1.  Formatting fix.
26255 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
26257         PR target/84146
26258         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26259         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26260         and skip it regardless of bb boundaries.  Use CALL_P macro,
26261         don't test INSN_P (insn) together with CALL_P or JUMP_P check
26262         unnecessarily, formatting fix.
26264 2018-02-06  Michael Collison  <michael.collison@arm.com>
26266         * config/arm/thumb2.md:
26267         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26268         (*thumb_mov_notscc): Ditto.
26270 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
26272         PR target/84154
26273         * config/rs6000/rs6000.md (su code attribute): Use "u" for
26274         unsigned_fix, not "s".
26276 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26278         * configure.ac (gcc_fn_eh_frame_ro): New function.
26279         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26280         correct .eh_frame permissions.
26281         * configure: Regenerate.
26283 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
26285         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26286         irrelevant options.
26288 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26290         * config/rs6000/rs6000.c (rs6000_option_override_internal):
26291         Display warning message for -mno-speculate-indirect-jumps.
26293 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
26295         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26296         Undocumented.
26297         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26299 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
26301         PR tree-optimization/84225
26302         * tree-eh.c (find_trapping_overflow): Only call
26303         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26305 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
26307         PR target/84145
26308         * config/i386/i386.c: Reimplement the check of possible options
26309         -mibt/-mshstk conbination. Change error messages.
26310         * doc/invoke.texi: Fix a typo: remove extra '='.
26312 2018-02-06  Marek Polacek  <polacek@redhat.com>
26314         PR tree-optimization/84228
26315         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26317 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
26319         PR target/82641
26320         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26321         emitted arch directives.
26322         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26323         __ARM_FEATURE_COPROC before changing architectures.
26325 2018-02-06  Richard Biener  <rguenther@suse.de>
26327         * config/i386/i386.c (print_reg): Fix typo.
26328         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26330 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
26332         * configure: Regenerate.
26334 2018-02-05  Martin Sebor  <msebor@redhat.com>
26336         PR tree-optimization/83369
26337         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26338         inlining context.
26340 2018-02-05  Martin Liska  <mliska@suse.cz>
26342         * doc/invoke.texi: Cherry-pick upstream r323995.
26344 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
26346         * ira.c (ira_init_register_move_cost): Adjust comment.
26348 2018-02-05  Martin Liska  <mliska@suse.cz>
26350         PR gcov-profile/84137
26351         * doc/gcov.texi: Fix typo in documentation.
26353 2018-02-05  Martin Liska  <mliska@suse.cz>
26355         PR gcov-profile/83879
26356         * doc/gcov.texi: Document necessity of --dynamic-list-data when
26357         using dlopen functionality.
26359 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
26361         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26362         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26363         _mm_maskz_range_ss, _mm_mask_range_round_ss,
26364         _mm_maskz_range_round_ss): New intrinsics.
26365         (__builtin_ia32_rangesd128_round)
26366         (__builtin_ia32_rangess128_round): Remove.
26367         (__builtin_ia32_rangesd128_mask_round,
26368         __builtin_ia32_rangess128_mask_round): New builtins.
26369         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26370         __builtin_ia32_rangess128_round): Remove.
26371         (__builtin_ia32_rangesd128_mask_round,
26372         __builtin_ia32_rangess128_mask_round): New builtins.
26373         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26374         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26375         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26376         "<round_saeonly_constraint>")): Changed to ...
26377         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26378         "<round_saeonly_scalar_constraint>")): ... this.
26379         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26380         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26381         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26382         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26383         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26385 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
26387         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26388         options.
26389         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26390         Remove all values except native, 8540 and 8548.
26392 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
26394         * config/i386/i386.c (ix86_output_function_return): Pass
26395         INVALID_REGNUM, instead of -1, as invalid register number to
26396         indirect_thunk_name and output_indirect_thunk.
26398 2018-02-02  Julia Koval  <julia.koval@intel.com>
26400         * config.gcc: Add -march=icelake.
26401         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26402         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26403         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26404         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26405         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26406         (processor_target_table): Add icelake.
26407         (ix86_option_override_internal): Handle new PTAs.
26408         (get_builtin_code_for_version): Handle icelake.
26409         (M_INTEL_COREI7_ICELAKE): New.
26410         (fold_builtin_cpu): Handle icelake.
26411         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26412         * doc/invoke.texi: Add -march=icelake.
26414 2018-02-02  Julia Koval  <julia.koval@intel.com>
26416         * config/i386/i386.c (ix86_option_override_internal): Change flags type
26417         to wide_int_bitmask.
26418         * wide-int-bitmask.h: New.
26420 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
26422         PR target/84066
26423         * config/i386/i386.md: Replace Pmode with word_mode in
26424         builtin_setjmp_setup and builtin_longjmp to support x32.
26426 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
26428         PR target/56010
26429         PR target/83743
26430         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26431         #include "opts.h".
26432         (rs6000_supported_cpu_names): New static variable.
26433         (linux_cpu_translation_table): Likewise.
26434         (elf_platform) <cpu>: Define new static variable and use it.
26435         Translate kernel AT_PLATFORM name to canonical name if needed.
26436         Error if platform name is unknown.
26438 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
26440         PR target/84089
26441         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26443 2018-02-01  Jeff Law  <law@redhat.com>
26445         PR target/84128
26446         * config/i386/i386.c (release_scratch_register_on_entry): Add new
26447         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
26448         the scratch if RELEASE_VIA_POP is false.
26449         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26450         If we have to save a temporary register, decrement SIZE appropriately.
26451         Pass new arguments to release_scratch_register_on_entry.
26452         (ix86_adjust_stack_and_probe): Likewise.
26453         (ix86_emit_probe_stack_range): Pass new arguments to
26454         release_scratch_register_on_entry.
26456 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
26458         PR rtl-optimization/84157
26459         * combine.c (change_zero_ext): Use REG_P predicate in
26460         front of HARD_REGISTER_P predicate.
26462 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
26464         * config/avr/avr.c (avr_option_override): Move disabling of
26465         -fdelete-null-pointer-checks to...
26466         * common/config/avr/avr-common.c (avr_option_optimization_table):
26467         ...here.
26469 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26471         PR tree-optimization/81635
26472         * tree-data-ref.c (split_constant_offset_1): For types that
26473         wrap on overflow, try to use range info to prove that wrapping
26474         cannot occur.
26476 2018-02-01  Renlin Li  <renlin.li@arm.com>
26478         PR target/83370
26479         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26480         TAILCALL_ADDR_REGS.
26481         (aarch64_register_move_cost): Likewise.
26482         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26483         TAILCALL_ADDR_REGS.
26484         (REG_CLASS_NAMES): Likewise.
26485         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26486         TAILCALL_ADDR_REGS. Remove IP registers.
26487         * config/aarch64/aarch64.md (Ucs): Update register constraint.
26489 2018-02-01  Richard Biener  <rguenther@suse.de>
26491         * domwalk.h (dom_walker::dom_walker): Add additional constructor
26492         for specifying RPO order and allow NULL for that.
26493         * domwalk.c (dom_walker::dom_walker): Likewise.
26494         (dom_walker::walk): Handle NULL RPO order.
26495         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26496         in RPO order.
26497         (rewrite_update_dom_walker): Likewise.
26498         (mark_def_dom_walker): Likewise.
26500 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26502         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26503         (aarch64_maybe_expand_sve_subreg_move): Declare.
26504         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26505         * config/aarch64/predicates.md (aarch64_any_register_operand): New
26506         predicate.
26507         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26508         that are semantically a reverse operation.
26509         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26510         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26511         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26512         functions.
26513         (aarch64_can_change_mode_class): For big-endian, forbid changes
26514         between two SVE modes if they have different element sizes.
26516 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26518         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26519         the TImode handling for big-endian targets.
26521 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26523         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26524         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
26525         not just bytes.
26526         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26527         Remove BSWAP handing for big-endian targets and use the form of
26528         LD1RQ appropariate for the mode.
26530 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26532         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26533         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26534         duplicated element.
26536 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26538         PR tearget/83845
26539         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26540         check for operands that need to go through aarch64_sve_reload_be.
26542 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
26544         PR tree-optimization/81661
26545         PR tree-optimization/84117
26546         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26547         * tree-eh.c: Include gimplify.h.
26548         (find_trapping_overflow, replace_trapping_overflow,
26549         rewrite_to_non_trapping_overflow): New functions.
26550         * tree-vect-loop.c: Include tree-eh.h.
26551         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26552         * tree-data-ref.c: Include tree-eh.h.
26553         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26555 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
26557         PR rtl-optimization/84123
26558         * combine.c (change_zero_ext): Check if hard register satisfies
26559         can_change_dest_mode before calling gen_lowpart_SUBREG.
26561 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
26563         PR target/82444
26564         * ira.c (ira_init_register_move_cost): Remove assert.
26566 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26568         PR rtl-optimization/84071
26569         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26570         * doc/tm.texi: Regenerate.
26572 2018-01-31  Richard Biener  <rguenther@suse.de>
26574         PR tree-optimization/84132
26575         * tree-data-ref.c (analyze_miv_subscript): Properly
26576         check whether evolution_function_is_affine_multivariate_p
26577         before calling gcd_of_steps_may_divide_p.
26579 2018-01-31  Julia Koval  <julia.koval@intel.com>
26581         PR target/83618
26582         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26583         * config/i386/i386.md (rdpid_rex64) New.
26584         (rdpid): Make 32bit only.
26586 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
26588         PR lto/84105
26589         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26590         an IDENTIFIER_NODE for FUNCTION_TYPE's.
26592 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26594         Revert
26595         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26597         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26599 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26601         PR rtl-optimization/84071
26602         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26603         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26605 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
26607         * config/arc/arc.c (arc_handle_aux_attribute): New function.
26608         (arc_attribute_table): Add 'aux' attribute.
26609         (arc_in_small_data_p): Consider aux like variables.
26610         (arc_is_aux_reg_p): New function.
26611         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26612         (arc_get_aux_arg): New function.
26613         (prepare_move_operands): Handle aux-register access.
26614         (arc_handle_aux_attribute): New function.
26615         * doc/extend.texi (ARC Variable attributes): Add subsection.
26617 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
26619         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26620         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26621         (arc_attribute_table): Add 'uncached' attribute.
26622         (arc_print_operand): Print '.di' flag for uncached memory
26623         accesses.
26624         (arc_in_small_data_p): Do not consider for small data the uncached
26625         types.
26626         (arc_is_uncached_mem_p): New function.
26627         * config/arc/predicates.md (compact_store_memory_operand): Check
26628         for uncached memory accesses.
26629         (nonvol_nonimm_operand): Likewise.
26630         * doc/extend.texi (ARC Type Attribute): New subsection.
26632 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
26634         PR c/84100
26635         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26636         falign-loops=): Add Optimization flag.
26638 2018-01-30  Jeff Law  <law@redhat.com>
26640         PR target/84064
26641         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26642         INT_REGISTERS_SAVED.  Check it prior to calling
26643         get_scratch_register_on_entry.
26644         (ix86_adjust_stack_and_probe): Similarly.
26645         (ix86_emit_probe_stack_range): Similarly.
26646         (ix86_expand_prologue): Corresponding changes.
26648 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26650         PR target/40411
26651         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26652         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26654 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
26656         PR target/84112
26657         * lra-constraints.c (curr_insn_transform): Process AND in the
26658         address.
26660 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
26662         PR rtl-optimization/83986
26663         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26664         dependence against last_pending_memory_flush in addition to
26665         pending_jump_insns.
26667 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
26669         PR tree-optimization/81611
26670         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26671         copies.
26673 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26675         PR target/83758
26676         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26677         a reg rtx.
26679 2018-01-30  Richard Biener  <rguenther@suse.de>
26680             Jakub Jelinek  <jakub@redhat.com>
26682         PR tree-optimization/84111
26683         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26684         inner loops added during recursion, as they don't have up-to-date
26685         SSA form.
26687 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
26689         PR ipa/81360
26690         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26691         (can_inline_edge_by_limits_p): ... here.
26692         (can_early_inline_edge_p, check_callers,
26693         update_caller_keys, update_callee_keys, recursive_inlining,
26694         add_new_edges_to_heap, speculation_useful_p,
26695         inline_small_functions,
26696         inline_small_functions, flatten_function,
26697         inline_to_all_callers_1): Update.
26699 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
26701         * profile-count.c (profile_count::combine_with_ipa_count): Handle
26702         zeros correctly.
26704 2018-01-30  Richard Biener  <rguenther@suse.de>
26706         PR tree-optimization/83008
26707         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26708         invariant and constant vector uses in stmts when they need
26709         more than one stmt.
26711 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26713         PR bootstrap/84017
26714         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26715         * configure: Regenerate.
26717 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26719         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26720         pattern.
26721         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26722         Use gen_rtx_REG rather than gen_lowpart.
26724 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26726         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26727         rather than 0 when creating partial subregs.
26729 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26731         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26732         of usage.
26734 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
26736         PR target/81550
26737         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26738         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26739         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26740         flags.  This restores the settings used before the 2017-07-24.
26741         Turning off pre increment/decrement/modify allows IVOPTS to
26742         optimize DF/SF loops where the index is an int.
26744 2018-01-29  Richard Biener  <rguenther@suse.de>
26745             Kelvin Nilsen  <kelvin@gcc.gnu.org>
26747         PR bootstrap/80867
26748         * tree-vect-stmts.c (vectorizable_call): Don't call
26749         targetm.vectorize_builtin_md_vectorized_function if callee is
26750         NULL.
26752 2018-01-22  Carl Love  <cel@us.ibm.com>
26754         * doc/extend.tex: Fix typo in second arg in
26755         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26757 2018-01-29  Richard Biener  <rguenther@suse.de>
26759         PR tree-optimization/84086
26760         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
26761         (flush_ssaname_freelist): When SSA names were released reset
26762         the SCEV hash table.
26764 2018-01-29  Richard Biener  <rguenther@suse.de>
26766         PR tree-optimization/84057
26767         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
26768         removed paths when removing edges.
26770 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
26772         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
26773         -mfunction-return=@var{choice}.
26775 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26777         PR diagnostic/84034
26778         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
26779         Handle CR like TAB.
26780         (layout::print_source_line): Likewise.
26781         (test_get_line_width_without_trailing_whitespace): Add test cases.
26783 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
26785         PR middle-end/84040
26786         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
26787         debug insns.
26789 2018-01-26  Jim Wilson  <jimw@sifive.com>
26791         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
26793         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
26794         specified.
26796 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26798         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
26799         and CMP + SUB-immediate -> SUBS.
26801 2018-01-26  Martin Sebor  <msebor@redhat.com>
26803         PR tree-optimization/83896
26804         * tree-ssa-strlen.c (get_string_len): Rename...
26805         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
26806         Avoid assuming length is constant.
26807         (handle_char_store): Use HOST_WIDE_INT for string length.
26809 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
26811         PR target/81763
26812         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
26813         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
26815 2018-01-26  Richard Biener  <rguenther@suse.de>
26817         PR rtl-optimization/84003
26818         * dse.c (record_store): Only record redundant stores when
26819         the earlier store aliases at least all accesses the later one does.
26821 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
26823         PR rtl-optimization/83985
26824         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
26825         REG_CFA_RESTORE insns.
26826         (delete_unmarked_insns): Don't ignore separate shrink wrapping
26827         REG_CFA_RESTORE insns here.
26829         PR c/83989
26830         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
26831         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
26833 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26835         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
26836         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
26837         (arc_init): Likewise.
26838         (arc_override_options): Likewise.
26839         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
26840         value.
26841         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
26842         support.
26843         * config/arc/arc.h (TARGET_DBNZ): Define.
26844         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
26845         properly set the tune attribute.
26846         (dbnz): Use TARGET_DBNZ guard.
26847         * config/arc/arc.opt (mtune): Add core3 option.
26849 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26851         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
26852         recognize new pic like addresses.
26853         (arc_delegitimize_address): Clean up.
26855 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26857         * config/arc/arc-arches.def: Option mrf16 valid for all
26858         architectures.
26859         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
26860         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
26861         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
26862         * config/arc/arc-tables.opt: Regenerate.
26863         * config/arc/arc.c (arc_conditional_register_usage): Handle
26864         reduced register file case.
26865         (arc_file_start): Set must have build attributes.
26866         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
26867         mrf16 option value.
26868         * config/arc/arc.opt (mrf16): Add new option.
26869         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
26870         * config/arc/genmultilib.awk: Handle new mrf16 option.
26871         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
26872         * config/arc/t-multilib: Regenerate.
26873         * doc/invoke.texi (ARC Options): Document mrf16 option.
26875 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26877         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
26878         * config/arc/arc.c (arc_handle_secure_attribute): New function.
26879         (arc_attribute_table): Add 'secure_call' attribute.
26880         (arc_print_operand): Print secure call operand.
26881         (arc_function_ok_for_sibcall): Don't optimize tail calls when
26882         secure.
26883         (arc_is_secure_call_p): New function.  * config/arc/arc.md
26884         (call_i): Add support for sjli instruction.
26885         (call_value_i): Likewise.
26886         * config/arc/constraints.md (Csc): New constraint.
26888 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26889             John Eric Martin  <John.Martin@emmicro-us.com>
26891         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
26892         * config/arc/arc.c (_arc_jli_section): New struct.
26893         (arc_jli_section): New type.
26894         (rc_jli_sections): New static variable.
26895         (arc_handle_jli_attribute): New function.
26896         (arc_attribute_table): Add jli_always and jli_fixed attribute.
26897         (arc_file_end): New function.
26898         (TARGET_ASM_FILE_END): Define.
26899         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
26900         (arc_add_jli_section): New function.
26901         (jli_call_scan): Likewise.
26902         (arc_reorg): Call jli_call_scan.
26903         (arc_output_addsi): Remove 'S' from printing asm operand.
26904         (arc_is_jli_call_p): New function.
26905         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
26906         operand.
26907         (movhi_insn): Likewise.
26908         (movsi_insn): Likewise.
26909         (movsi_set_cc_insn): Likewise.
26910         (loadqi_update): Likewise.
26911         (load_zeroextendqisi_update): Likewise.
26912         (load_signextendqisi_update): Likewise.
26913         (loadhi_update): Likewise.
26914         (load_zeroextendhisi_update): Likewise.
26915         (load_signextendhisi_update): Likewise.
26916         (loadsi_update): Likewise.
26917         (loadsf_update): Likewise.
26918         (movsicc_insn): Likewise.
26919         (bset_insn): Likewise.
26920         (bxor_insn): Likewise.
26921         (bclr_insn): Likewise.
26922         (bmsk_insn): Likewise.
26923         (bicsi3_insn): Likewise.
26924         (cmpsi_cc_c_insn): Likewise.
26925         (movsi_ne): Likewise.
26926         (movsi_cond_exec): Likewise.
26927         (clrsbsi2): Likewise.
26928         (norm_f): Likewise.
26929         (normw): Likewise.
26930         (swap): Likewise.
26931         (divaw): Likewise.
26932         (flag): Likewise.
26933         (sr): Likewise.
26934         (kflag): Likewise.
26935         (ffs): Likewise.
26936         (ffs_f): Likewise.
26937         (fls): Likewise.
26938         (call_i): Remove 'S' asm letter, add jli instruction.
26939         (call_value_i): Likewise.
26940         * config/arc/arc.op (mjli-always): New option.
26941         * config/arc/constraints.md (Cji): New constraint.
26942         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
26943         operand.
26944         (subsf3_fpx): Likewise.
26945         (mulsf3_fpx): Likewise.
26946         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
26947         asm operand.
26948         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
26949         function attrbutes.
26950         * doc/invoke.texi (ARC): Document mjli-always option.
26952 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
26954         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
26955         avoid addition with 0 and use incw and decw where possible.
26957 2018-01-26  Richard Biener  <rguenther@suse.de>
26959         PR tree-optimization/81082
26960         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
26961         association if it requires casting to unsigned.
26962         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
26963         from fold_plusminus_mult_expr to catch important cases late when
26964         range info is available.
26966 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26968         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
26969         * configure.ac (hidden_linkonce): New test.
26970         * configure: Regenerate.
26971         * config.in: Regenerate.
26973 2018-01-26  Julia Koval  <julia.koval@intel.com>
26975         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
26976         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
26977         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
26978         _mm_mask_bitshuffle_epi64_mask): Fix type.
26979         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
26980         USI_FTYPE_V4DI_V4DI_USI): Remove.
26981         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
26982         __builtin_ia32_vpshufbitqmb256_mask,
26983         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
26984         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
26985         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
26987 2018-01-26  Alan Modra  <amodra@gmail.com>
26989         PR target/84033
26990         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
26991         UNSPEC_VBPERMQ.  Sort other unspecs.
26993 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
26995         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
26997 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
26999         PR middle-end/83055
27000         * predict.c (drop_profile): Do not push/pop cfun; update also
27001         node->count.
27002         (handle_missing_profiles): Fix logic looking for zero profiles.
27004 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
27006         PR middle-end/83977
27007         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
27008         on functions with #pragma omp declare simd or functions with simd
27009         attribute.
27010         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
27011         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
27012         Remove trailing \n from warning_at calls.
27014 2018-01-25  Tom de Vries  <tom@codesourcery.com>
27016         PR target/84028
27017         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27018         for neutered workers.
27020 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
27022         PR target/68467
27023         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
27024         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
27026 2018-01-24  Jeff Law  <law@redhat.com>
27028         PR target/83994
27029         * i386.c (get_probe_interval): Move to earlier point.
27030         (ix86_compute_frame_layout): If -fstack-clash-protection and
27031         the frame is larger than the probe interval, then use pushes
27032         to save registers rather than reg->mem moves.
27033         (ix86_expand_prologue): Remove conditional for int_registers_saved
27034         assertion.
27036 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
27038         PR target/84014
27039         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
27040         min/max for never referenced object.
27042 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
27044         PR middle-end/83977
27045         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
27046         here.
27047         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
27048         attributes from DECL_ATTRIBUTES (decl) without affecting
27049         DECL_ATTRIBUTES (current_function_decl).
27050         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
27051         functions with non-NULL DECL_ABSTRACT_ORIGIN.
27053 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
27055         PR tree-optimization/83979
27056         * fold-const.c (fold_comparison): Use constant_boolean_node
27057         instead of boolean_{true,false}_node.
27059 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
27061         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
27062         with zero counts.
27064 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27066         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27067         Simplify the clause that sets the length attribute.
27068         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27069         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
27070         clause that sets the length attribute.
27071         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27073 2018-01-24  Tom de Vries  <tom@codesourcery.com>
27075         PR target/83589
27076         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
27077         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
27078         Add strict parameter.
27079         (prevent_branch_around_nothing): Insert dummy insn between branch to
27080         label and label with no ptx insn inbetween.
27081         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
27083 2018-01-24  Tom de Vries  <tom@codesourcery.com>
27085         PR target/81352
27086         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27087         for neutered threads in warp.
27088         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
27090 2018-01-24  Richard Biener  <rguenther@suse.de>
27092         PR tree-optimization/83176
27093         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
27094         operands.
27096 2018-01-24  Richard Biener  <rguenther@suse.de>
27098         PR tree-optimization/82819
27099         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
27100         code generating pluses that are no-ops in the target precision.
27102 2018-01-24  Richard Biener  <rguenther@suse.de>
27104         PR middle-end/84000
27105         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
27107 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
27109         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
27110         to merge probabilities.
27111         * predict.c (probably_never_executed): Also mark as cold functions
27112         with global 0 profile and guessed local profile.
27113         * profile-count.c (profile_probability::combine_with_count): New
27114         member function.
27115         * profile-count.h (profile_probability::operator*,
27116         profile_probability::operator*=, profile_probability::operator/,
27117         profile_probability::operator/=): Reduce precision to adjusted
27118         and set value to guessed on contradictory divisions.
27119         (profile_probability::combine_with_freq): Remove.
27120         (profile_probability::combine_wiht_count): Declare.
27121         (profile_count::force_nonzero):: Set to adjusted.
27122         (profile_count::probability_in):: Set quality to adjusted.
27123         * tree-ssa-tail-merge.c (replace_block_by): Use
27124         combine_with_count.
27126 2018-01-23  Andrew Waterman  <andrew@sifive.com>
27127             Jim Wilson  <jimw@sifive.com>
27129         * config/riscv/riscv.c (riscv_stack_boundary): New.
27130         (riscv_option_override): Set riscv_stack_boundary.  Handle
27131         riscv_preferred_stack_boundary_arg.
27132         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
27133         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
27134         (STACK_BOUNDARY): Set to riscv_stack_boundary.
27135         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
27136         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
27137         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
27139 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
27141         PR target/83905
27142         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
27143         of struct ix86_frame.
27144         (ix86_expand_epilogue): Likewise.  Add a local variable for
27145         the reg_save_offset field in struct ix86_frame.
27147 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
27149         PR tree-optimization/82604
27150         * tree-loop-distribution.c (enum partition_kind): New enum item
27151         PKIND_PARTIAL_MEMSET.
27152         (partition_builtin_p): Support above new enum item.
27153         (generate_code_for_partition): Ditto.
27154         (compute_access_range): Differentiate cases that equality can be
27155         proven at all loops, the innermost loops or no loops.
27156         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
27157         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
27158         (finalize_partitions, distribute_loop): Don't fuse partition of
27159         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
27160         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
27161         parloop is enabled.
27163 2018-01-23  Martin Liska  <mliska@suse.cz>
27165         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
27166         order to ignore the predictor.
27167         (PRED_POLYMORPHIC_CALL): Likewise.
27168         (PRED_RECURSIVE_CALL): Likewise.
27170 2018-01-23  Martin Liska  <mliska@suse.cz>
27172         * tree-profile.c (tree_profiling): Print function header to
27173         aware reader which function we are working on.
27174         * value-prof.c (gimple_find_values_to_profile): Do not print
27175         not interesting value histograms.
27177 2018-01-23  Martin Liska  <mliska@suse.cz>
27179         * profile-count.h (enum profile_quality): Add
27180         profile_uninitialized as the first value. Do not number values
27181         as they are zero based.
27182         (profile_count::verify): Update sanity check.
27183         (profile_probability::verify): Likewise.
27185 2018-01-23  Nathan Sidwell  <nathan@acm.org>
27187         * doc/invoke.texi (ffor-scope): Deprecate.
27189 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
27191         PR tree-optimization/83510
27192         * domwalk.c (set_all_edges_as_executable): New function.
27193         (dom_walker::dom_walker): Convert bool param
27194         "skip_unreachable_blocks" to enum reachability.  Move setup of
27195         edge flags to set_all_edges_as_executable and only do it when
27196         reachability is REACHABLE_BLOCKS.
27197         * domwalk.h (enum dom_walker::reachability): New enum.
27198         (dom_walker::dom_walker): Convert bool param
27199         "skip_unreachable_blocks" to enum reachability.
27200         (set_all_edges_as_executable): New decl.
27201         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
27202         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
27203         "reachability".
27204         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
27205         but converting true to REACHABLE_BLOCKS.
27206         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
27207         * tree-vrp.c
27208         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
27209         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
27210         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
27211         REACHABLE_BLOCKS.
27212         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
27213         if check_all_array_refs will be called.
27215 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
27217         * tree.c (selftest::test_location_wrappers): Add more test
27218         coverage.
27220 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
27222         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27223         (selftest::test_bit_in_range): Likewise.
27225 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
27227         PR testsuite/83888
27228         * doc/sourcebuild.texi (vect_float): Say that the selector
27229         only describes the situation when -funsafe-math-optimizations is on.
27230         (vect_float_strict): Document.
27232 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
27234         PR tree-optimization/83965
27235         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27236         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27237         instead of checking only for a reduction.
27238         (vect_recog_widen_sum_pattern): Likewise.
27240 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
27242         * predict.c (probably_never_executed): Only use precise profile info.
27243         (compute_function_frequency): Skip after inlining hack since we now
27244         have quality checking.
27246 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
27248         * profile-count.h (profile_probability::very_unlikely,
27249         profile_probability::unlikely, profile_probability::even): Set
27250         precision to guessed.
27252 2018-01-23  Richard Biener  <rguenther@suse.de>
27254         PR tree-optimization/83963
27255         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27256         Properly terminate dominator walk when crossing the exit edge not
27257         when visiting its source block.
27259 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
27261         PR c++/83918
27262         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27263         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27265 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
27267         PR tree-optimization/83957
27268         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
27269         semicolon after for body surrounded by braces.
27271         PR tree-optimization/83081
27272         * profile-count.h (profile_probability::split): New method.
27273         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27274         Use profile_probability::split.
27275         (do_compare_rtx_and_jump): Fix adjustment of probabilities
27276         when splitting a single conditional jump into 2.
27278 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
27280         PR tree-optimization/69452
27281         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27282         decl.
27284 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27286         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27287         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27288         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27290 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27292         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27293         declaration.
27294         * config/rl78/rl78.md (movdi): New define_expand.
27295         * config/rl78/rl78.c (rl78_split_movdi): New function.
27297 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
27299         PR target/83862
27300         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27301         no longer used.
27302         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27303         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27304         128-bit to produce an UNSPEC move to get the double word with the
27305         signbit and then a shift directly to do signbit.
27306         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27307         implementation with a new version that just does either a direct
27308         move or a regular move.  Move memory interface to separate insns.
27309         Move insns so they are next to the expander.
27310         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27311         with signbit move.  Split big and little endian case.
27312         (signbit<mode>2_dm_mem_le): Likewise.
27313         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27314         (signbit<mode>2_dm2): Likewise.
27316 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27318         * config/rl78/rl78.md (anddi3): New define_expand.
27320 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27322         * config/rl78/rl78.md (umindi3): New define_expand.
27324 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27326         * config/rl78/rl78.md (smindi3): New define_expand.
27328 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27330         * config/rl78/rl78.md (smaxdi3): New define_expand.
27332 2018-01-22  Carl Love  <cel@us.ibm.com>
27334         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27335         LVX_V1TI): Add macro expansion.
27336         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27337         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27338         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27339         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27340         Change check to determine if the instruction is a byte reversing
27341         entry.  Fix typo in comment.
27342         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27343         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27344         Add def_builtin calls for new builtins.
27345         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27346         Add define_insn expansion.
27348 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27350         * config/rl78/rl78.md (umaxdi3): New define_expand.
27352 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27354         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27355         for non-QImode registers.
27357 2018-01-22  Richard Biener  <rguenther@suse.de>
27359         PR tree-optimization/83963
27360         * graphite-scop-detection.c (scop_detection::get_sese): Delay
27361         including the loop exit block.
27362         (scop_detection::merge_sese): Likewise.
27363         (scop_detection::add_scop): Do it here instead.
27365 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27367         * doc/sourcebuild.texi (arm_softfloat): Document.
27369 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
27371         PR gcc/77734
27372         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27373         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27374         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27376 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27377             David Edelsohn  <dje.gcc@gmail.com>
27379         PR target/83946
27380         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27381         Change "crset eq" to "crset 2".
27382         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27383         (*call_indirect_aix<mode>_nospec): Likewise.
27384         (*call_value_indirect_aix<mode>_nospec): Likewise.
27385         (*call_indirect_elfv2<mode>_nospec): Likewise.
27386         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27387         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27388         change assembly output from . to $.
27389         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27390         (indirect_jump<mode>_nospec): Change assembly output from . to $.
27391         (*tablejump<mode>_internal1_nospec): Likewise.
27393 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
27395         PR target/80870
27396         * config/sh/sh_optimize_sett_clrt.cc:
27397         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27399 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
27401         PR tree-optimization/83940
27402         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27403         offset_dt to vect_constant_def rather than vect_unknown_def_type.
27404         (vect_check_load_store_mask): Add a mask_dt_out parameter and
27405         use it to pass back the definition type.
27406         (vect_check_store_rhs): Likewise rhs_dt_out.
27407         (vect_build_gather_load_calls): Add a mask_dt argument and use
27408         it instead of a call to vect_is_simple_use.
27409         (vectorizable_store): Update calls to vect_check_load_store_mask
27410         and vect_check_store_rhs.  Use the dt returned by the latter instead
27411         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
27412         instead of calls to vect_is_simple_use.  Pass the scalar rather
27413         than the vector operand to vect_is_simple_use when handling
27414         second and subsequent copies of an rhs value.
27415         (vectorizable_load): Update calls to vect_check_load_store_mask
27416         and vect_build_gather_load_calls.  Use the cached mask_dt and
27417         gs_info.offset_dt instead of calls to vect_is_simple_use.
27419 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
27421         PR middle-end/83945
27422         * tree-emutls.c: Include gimplify.h.
27423         (lower_emutls_2): New function.
27424         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27425         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27426         it before further processing.
27428         PR target/83930
27429         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27430         UINTVAL (trueop1) instead of INTVAL (op1).
27432 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
27434         PR debug/81570
27435         PR debug/83728
27436         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27437         INCOMING_FRAME_SP_OFFSET if not defined.
27438         (scan_trace): Add ENTRY argument.  If true and
27439         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27440         emit a note to adjust the CFA offset.
27441         (create_cfi_notes): Adjust scan_trace callers.
27442         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27443         INCOMING_FRAME_SP_OFFSET in the CIE.
27444         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27445         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27446         Likewise.
27447         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27448         * doc/tm.texi: Regenerated.
27450 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27452         PR rtl-optimization/83147
27453         * lra-constraints.c (remove_inheritance_pseudos): Use
27454         lra_substitute_pseudo_within_insn.
27456 2018-01-19  Tom de Vries  <tom@codesourcery.com>
27457             Cesar Philippidis  <cesar@codesourcery.com>
27459         PR target/83920
27460         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27462 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
27464         PR target/83790
27465         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27466         spaces for function labels.
27468 2018-01-19  Martin Liska  <mliska@suse.cz>
27470         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27471         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27472         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27473         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27474         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27475         (PRED_CONST_RETURN): Change from 69 to 65.
27476         (PRED_NULL_RETURN): Change from 91 to 71.
27477         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27478         (PRED_LOOP_GUARD): Change from 66 to 73.
27480 2018-01-19  Martin Liska  <mliska@suse.cz>
27482         * predict.c (predict_insn_def): Add new assert.
27483         (struct branch_predictor): Change type to signed integer.
27484         (test_prediction_value_range): Amend test to cover
27485         PROB_UNINITIALIZED.
27486         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27487         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27488         (PRED_LOOP_ITERATIONS_MAX): Likewise.
27489         (PRED_LOOP_IV_COMPARE): Likewise.
27490         * predict.h (PROB_UNINITIALIZED): Define new constant.
27492 2018-01-19  Martin Liska  <mliska@suse.cz>
27494         * predict.c (dump_prediction): Add new format for
27495         analyze_brprob.py script which is enabled with -details
27496         suboption.
27497         * profile-count.h (precise_p): New function.
27499 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
27501         PR tree-optimization/83922
27502         * tree-vect-loop.c (vect_verify_full_masking): Return false if
27503         there are no statements that need masking.
27504         (vect_active_double_reduction_p): New function.
27505         (vect_analyze_loop_operations): Use it when handling phis that
27506         are not in the loop header.
27508 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
27510         PR tree-optimization/83914
27511         * tree-vect-loop.c (vectorizable_induction): Don't convert
27512         init_expr or apply the peeling adjustment for inductions
27513         that are nested within the vectorized loop.
27515 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27517         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27518         instead of NEG.
27520 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
27522         PR sanitizer/81715
27523         PR testsuite/83882
27524         * function.h (gimplify_parameters): Add gimple_seq * argument.
27525         * function.c: Include gimple.h and options.h.
27526         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27527         for the added local temporaries if needed.
27528         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27529         if there are any parameter cleanups, wrap whole body into a
27530         try/finally with the cleanups.
27532 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
27534         PR target/82964
27535         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27536         Use GET_MODE_CLASS for scalar floating point.
27538 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
27540         PR ipa/82256
27541         patch by PaX Team
27542         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27543         Fix call of call_cgraph_insertion_hooks.
27545 2018-01-18  Martin Sebor  <msebor@redhat.com>
27547         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27549 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
27551         PR ipa/83619
27552         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27553         frequencies.
27555 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
27557         PR other/70268
27558         * common.opt: (-ffile-prefix-map): New option.
27559         * opts.c (common_handle_option): Defer it.
27560         * opts-global.c (handle_common_deferred_options): Handle it.
27561         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27562         * file-prefix-map.h: New file.
27563         (remap_debug_filename, add_debug_prefix_map): ...here.
27564         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27565         * final.c (debug_prefix_map, add_debug_prefix_map
27566         remap_debug_filename): Move to...
27567         * file-prefix-map.c: New file.
27568         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27569         generalize, get rid of alloca(), use strrchr() instead of strchr().
27570         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27571         Implement in terms of add_prefix_map().
27572         (remap_macro_filename, remap_debug_filename): Implement in term of
27573         remap_filename().
27574         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27575         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27576         * dbxout.c: Include file-prefix-map.h.
27577         * varasm.c: Likewise.
27578         * vmsdbgout.c: Likewise.
27579         * xcoffout.c: Likewise.
27580         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27581         * doc/cppopts.texi (-fmacro-prefix-map): Document.
27582         * doc/invoke.texi (-ffile-prefix-map): Document.
27583         (-fdebug-prefix-map): Update description.
27585 2018-01-18  Martin Liska  <mliska@suse.cz>
27587         * config/i386/i386.c (indirect_thunk_name): Document that also
27588         lfence is emitted.
27589         (output_indirect_thunk): Document why both instructions
27590         (pause and lfence) are generated.
27592 2018-01-18  Richard Biener  <rguenther@suse.de>
27594         PR tree-optimization/83887
27595         * graphite-scop-detection.c
27596         (scop_detection::get_nearest_dom_with_single_entry): Remove.
27597         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27598         (scop_detection::merge_sese): Re-implement with a flood-fill
27599         algorithm that properly finds a SESE region if it exists.
27601 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
27603         PR c/61240
27604         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27605         pointer_diff optimizations use view_convert instead of convert.
27607 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27609         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27610         Generate different code for -mno-speculate-indirect-jumps.
27611         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27612         (*call_indirect_aix<mode>): Disable for
27613         -mno-speculate-indirect-jumps.
27614         (*call_indirect_aix<mode>_nospec): New define_insn.
27615         (*call_value_indirect_aix<mode>): Disable for
27616         -mno-speculate-indirect-jumps.
27617         (*call_value_indirect_aix<mode>_nospec): New define_insn.
27618         (*sibcall_nonlocal_sysv<mode>): Generate different code for
27619         -mno-speculate-indirect-jumps.
27620         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27622 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
27624         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27625         long double type, set the flags for noting the default long double
27626         type, even if we don't pass or return a long double type.
27628 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
27630         PR ipa/83051
27631         * ipa-inline.c (flatten_function): Do not overwrite final inlining
27632         failure.
27634 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
27636         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27637         support for merge[hl].
27638         (fold_mergehl_helper): New helper function.
27639         (tree-vector-builder.h): New #include for tree_vector_builder usage.
27640         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27641         (altivec_vmrglw_direct): Add xxmrglw insn.
27643 2018-01-17  Andrew Waterman  <andrew@sifive.com>
27645         * config/riscv/riscv.c (riscv_conditional_register_usage): If
27646         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27648 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
27650         PR lto/83121
27651         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27652         call the lto_location_cache before reading the
27653         DECL_SOURCE_LOCATION of the types.
27655 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
27656             Richard Sandiford  <richard.sandiford@linaro.org>
27658         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27659         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27660         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27661         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27662         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27663         Add declaration.
27664         * config/aarch64/constraints.md (aarch64_movti_operand):
27665         Limit immediates.
27666         * config/aarch64/predicates.md (Uti): Add new constraint.
27668 2018-01-17  Carl Love  <cel@us.ibm.com>
27670         * config/rs6000/vsx.md (define_expand xl_len_r,
27671         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27672         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27673         lxvll.
27674         (define_expand, define_insn): Move the shift left from  the
27675         define_insn to the define_expand for lxvl and stxvl instructions.
27676         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27677         and XL_LEN_R definitions to PURE.
27679 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
27681         * config/i386/i386.c (indirect_thunk_name): Declare regno
27682         as unsigned int.  Compare regno with INVALID_REGNUM.
27683         (output_indirect_thunk): Ditto.
27684         (output_indirect_thunk_function): Ditto.
27685         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
27686         in the call to output_indirect_thunk_function.
27688 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
27690         PR middle-end/83884
27691         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27692         rather than the size of inner_type to determine the stack slot size
27693         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27695 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
27697         PR target/83546
27698         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27699         to PTA_SILVERMONT.
27701 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
27703         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27704         endian Linux systems to optionally enable multilibs for selecting
27705         the long double type if the user configured an explicit type.
27706         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27707         have no long double multilibs if not defined.
27708         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27709         warn if the user used -mabi={ieee,ibm}longdouble and we built
27710         multilibs for long double.
27711         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27712         appropriate multilib option.
27713         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27714         multilib options.
27715         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27716         for building long double multilibs.
27717         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27719 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
27721         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27722         copies.
27724         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27725         64 bits.
27726         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27727         128 bits.
27729         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27730         variables.
27732         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27733         return value.
27735 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
27737         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27738         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27740 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27742         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27743         different rtl trees depending on TARGET_64BIT.
27744         (rs6000_gen_lvx): Likewise.
27746 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
27748         * config/visium/visium.md (nop): Tweak comment.
27749         (hazard_nop): Likewise.
27751 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27753         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27754         -mspeculate-indirect-jumps.
27755         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27756         for -mno-speculate-indirect-jumps.
27757         (*call_indirect_elfv2<mode>_nospec): New define_insn.
27758         (*call_value_indirect_elfv2<mode>): Disable for
27759         -mno-speculate-indirect-jumps.
27760         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
27761         (indirect_jump): Emit different RTL for
27762         -mno-speculate-indirect-jumps.
27763         (*indirect_jump<mode>): Disable for
27764         -mno-speculate-indirect-jumps.
27765         (*indirect_jump<mode>_nospec): New define_insn.
27766         (tablejump): Emit different RTL for
27767         -mno-speculate-indirect-jumps.
27768         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
27769         (tablejumpsi_nospec): New define_expand.
27770         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
27771         (tablejumpdi_nospec): New define_expand.
27772         (*tablejump<mode>_internal1): Disable for
27773         -mno-speculate-indirect-jumps.
27774         (*tablejump<mode>_internal1_nospec): New define_insn.
27775         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
27776         option.
27778 2018-01-16  Artyom Skrobov tyomitch@gmail.com
27780         * caller-save.c (insert_save): Drop unnecessary parameter.  All
27781         callers updated.
27783 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
27784             Richard Biener  <rguenth@suse.de>
27786         PR libgomp/83590
27787         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
27788         return early, inline manually is_gimple_sizepos.  Make sure if we
27789         call gimplify_expr we don't end up with a gimple constant.
27790         * tree.c (variably_modified_type_p): Don't return true for
27791         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
27792         * gimplify.h (is_gimple_sizepos): Remove.
27794 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27796         PR tree-optimization/83857
27797         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
27798         vectorizable_live_operation for pure SLP statements.
27799         (vectorizable_live_operation): Handle PHIs.
27801 2018-01-16  Richard Biener  <rguenther@suse.de>
27803         PR tree-optimization/83867
27804         * tree-vect-stmts.c (vect_transform_stmt): Precompute
27805         nested_in_vect_loop_p since the scalar stmt may get invalidated.
27807 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
27809         PR c/83844
27810         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
27811         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
27812         If off is not INTEGER_CST, issue a may not be aligned warning
27813         rather than isn't aligned.  Use isn%'t rather than isn't.
27814         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
27815         into MULT_EXPR.
27816         <case MULT_EXPR>: Improve the case when bottom and one of the
27817         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
27818         operand, in that case check if the other operand is multiple of
27819         bottom divided by the INTEGER_CST operand.
27821 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27823         PR target/83858
27824         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
27825         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
27826         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
27827         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
27828         * config/pa/pa.c (pa_function_arg_advance): Likewise.
27829         (pa_function_arg, pa_arg_partial_bytes): Likewise.
27830         (pa_function_arg_size): New function.
27832 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27834         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
27835         in a separate statement.
27837 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27839         PR tree-optimization/83847
27840         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
27841         group gathers and scatters.
27843 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
27845         PR rtl-optimization/86620
27846         * params.def (max-sched-ready-insns): Bump minimum value to 1.
27848         PR rtl-optimization/83213
27849         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
27850         to last if both are JUMP_INSNs.
27852         PR tree-optimization/83843
27853         * gimple-ssa-store-merging.c
27854         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
27855         store_immediate_info for bswap/nop orig_stores.
27857 2018-01-15  Andrew Waterman  <andrew@sifive.com>
27859         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
27860         !TARGET_MUL.
27861         <UDIV>: Increase cost if !TARGET_DIV.
27863 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
27865         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
27866         (define_attr "cr_logical_3op"): New.
27867         (cceq_ior_compare): Adjust.
27868         (cceq_ior_compare_complement): Adjust.
27869         (*cceq_rev_compare): Adjust.
27870         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
27871         (is_cracked_insn): Adjust.
27872         (insn_must_be_first_in_group): Adjust.
27873         * config/rs6000/40x.md: Adjust.
27874         * config/rs6000/440.md: Adjust.
27875         * config/rs6000/476.md: Adjust.
27876         * config/rs6000/601.md: Adjust.
27877         * config/rs6000/603.md: Adjust.
27878         * config/rs6000/6xx.md: Adjust.
27879         * config/rs6000/7450.md: Adjust.
27880         * config/rs6000/7xx.md: Adjust.
27881         * config/rs6000/8540.md: Adjust.
27882         * config/rs6000/cell.md: Adjust.
27883         * config/rs6000/e300c2c3.md: Adjust.
27884         * config/rs6000/e500mc.md: Adjust.
27885         * config/rs6000/e500mc64.md: Adjust.
27886         * config/rs6000/e5500.md: Adjust.
27887         * config/rs6000/e6500.md: Adjust.
27888         * config/rs6000/mpc.md: Adjust.
27889         * config/rs6000/power4.md: Adjust.
27890         * config/rs6000/power5.md: Adjust.
27891         * config/rs6000/power6.md: Adjust.
27892         * config/rs6000/power7.md: Adjust.
27893         * config/rs6000/power8.md: Adjust.
27894         * config/rs6000/power9.md: Adjust.
27895         * config/rs6000/rs64.md: Adjust.
27896         * config/rs6000/titan.md: Adjust.
27898 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27900         * config/i386/predicates.md (indirect_branch_operand): Rewrite
27901         ix86_indirect_branch_register logic.
27903 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27905         * config/i386/constraints.md (Bs): Update
27906         ix86_indirect_branch_register check.  Don't check
27907         ix86_indirect_branch_register with GOT_memory_operand.
27908         (Bw): Likewise.
27909         * config/i386/predicates.md (GOT_memory_operand): Don't check
27910         ix86_indirect_branch_register here.
27911         (GOT32_symbol_operand): Likewise.
27913 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27915         * config/i386/predicates.md (constant_call_address_operand):
27916         Rewrite ix86_indirect_branch_register logic.
27917         (sibcall_insn_operand): Likewise.
27919 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27921         * config/i386/constraints.md (Bs): Replace
27922         ix86_indirect_branch_thunk_register with
27923         ix86_indirect_branch_register.
27924         (Bw): Likewise.
27925         * config/i386/i386.md (indirect_jump): Likewise.
27926         (tablejump): Likewise.
27927         (*sibcall_memory): Likewise.
27928         (*sibcall_value_memory): Likewise.
27929         Peepholes of indirect call and jump via memory: Likewise.
27930         * config/i386/i386.opt: Likewise.
27931         * config/i386/predicates.md (indirect_branch_operand): Likewise.
27932         (GOT_memory_operand): Likewise.
27933         (call_insn_operand): Likewise.
27934         (sibcall_insn_operand): Likewise.
27935         (GOT32_symbol_operand): Likewise.
27937 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
27939         PR middle-end/83837
27940         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
27941         type rather than type addr's type points to.
27942         (expand_omp_atomic_mutex): Likewise.
27943         (expand_omp_atomic): Likewise.
27945 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27947         PR target/83839
27948         * config/i386/i386.c (output_indirect_thunk_function): Use
27949         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
27950         for  __x86_return_thunk.
27952 2018-01-15  Richard Biener  <rguenther@suse.de>
27954         PR middle-end/83850
27955         * expmed.c (extract_bit_field_1): Fix typo.
27957 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27959         PR target/83687
27960         * config/arm/iterators.md (VF): New mode iterator.
27961         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
27962         Remove integer-related logic from pattern.
27963         (neon_vabd<mode>_3): Likewise.
27965 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
27967         PR middle-end/82694
27968         * common.opt (fstrict-overflow): No longer an alias.
27969         (fwrapv-pointer): New option.
27970         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
27971         also for pointer types based on flag_wrapv_pointer.
27972         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
27973         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
27974         opts->x_flag_wrapv got set.
27975         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
27976         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
27977         POINTER_TYPE_OVERFLOW_UNDEFINED.
27978         * match.pd: Likewise in address comparison pattern.
27979         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
27981 2018-01-15  Richard Biener  <rguenther@suse.de>
27983         PR lto/83804
27984         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
27985         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
27986         Reset type names to their identifier if their TYPE_DECL doesn't
27987         have linkage (and thus is used for ODR and devirt).
27988         (save_debug_info_for_decl): Remove.
27989         (save_debug_info_for_type): Likewise.
27990         (add_tree_to_fld_list): Adjust.
27991         * tree-pretty-print.c (dump_generic_node): Make dumping of
27992         type names more robust.
27994 2018-01-15  Richard Biener  <rguenther@suse.de>
27996         * BASE-VER: Bump to 8.0.1.
27998 2018-01-14  Martin Sebor  <msebor@redhat.com>
28000         PR other/83508
28001         * builtins.c (check_access): Avoid warning when the no-warning bit
28002         is set.
28004 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
28006         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
28007         * ira-color (allocno_hard_regs_compare): Likewise.
28009 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
28011         PR target/83013
28012         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
28013         Use .pushsection/.popsection.
28015 2018-01-14  Martin Sebor  <msebor@redhat.com>
28017         PR c++/81327
28018         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
28020 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
28022         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
28023         entry from extra_headers.
28024         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
28025         extra_headers, make the list bitwise identical to the i?86-*-* one.
28027 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
28029         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
28030         -mcmodel=large with -mindirect-branch=thunk,
28031         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
28032         -mfunction-return=thunk-extern.
28033         * doc/invoke.texi: Document -mcmodel=large is incompatible with
28034         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
28035         -mfunction-return=thunk and -mfunction-return=thunk-extern.
28037 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
28039         * config/i386/i386.c (print_reg): Print the name of the full
28040         integer register without '%'.
28041         (ix86_print_operand): Handle 'V'.
28042         * doc/extend.texi: Document 'V' modifier.
28044 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
28046         * config/i386/constraints.md (Bs): Disallow memory operand for
28047         -mindirect-branch-register.
28048         (Bw): Likewise.
28049         * config/i386/predicates.md (indirect_branch_operand): Likewise.
28050         (GOT_memory_operand): Likewise.
28051         (call_insn_operand): Likewise.
28052         (sibcall_insn_operand): Likewise.
28053         (GOT32_symbol_operand): Likewise.
28054         * config/i386/i386.md (indirect_jump): Call convert_memory_address
28055         for -mindirect-branch-register.
28056         (tablejump): Likewise.
28057         (*sibcall_memory): Likewise.
28058         (*sibcall_value_memory): Likewise.
28059         Disallow peepholes of indirect call and jump via memory for
28060         -mindirect-branch-register.
28061         (*call_pop): Replace m with Bw.
28062         (*call_value_pop): Likewise.
28063         (*sibcall_pop_memory): Replace m with Bs.
28064         * config/i386/i386.opt (mindirect-branch-register): New option.
28065         * doc/invoke.texi: Document -mindirect-branch-register option.
28067 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
28069         * config/i386/i386-protos.h (ix86_output_function_return): New.
28070         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
28071         set function_return_type.
28072         (indirect_thunk_name): Add ret_p to indicate thunk for function
28073         return.
28074         (output_indirect_thunk_function): Pass false to
28075         indirect_thunk_name.
28076         (ix86_output_indirect_branch_via_reg): Likewise.
28077         (ix86_output_indirect_branch_via_push): Likewise.
28078         (output_indirect_thunk_function): Create alias for function
28079         return thunk if regno < 0.
28080         (ix86_output_function_return): New function.
28081         (ix86_handle_fndecl_attribute): Handle function_return.
28082         (ix86_attribute_table): Add function_return.
28083         * config/i386/i386.h (machine_function): Add
28084         function_return_type.
28085         * config/i386/i386.md (simple_return_internal): Use
28086         ix86_output_function_return.
28087         (simple_return_internal_long): Likewise.
28088         * config/i386/i386.opt (mfunction-return=): New option.
28089         (indirect_branch): Mention -mfunction-return=.
28090         * doc/extend.texi: Document function_return function attribute.
28091         * doc/invoke.texi: Document -mfunction-return= option.
28093 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
28095         * config/i386/i386-opts.h (indirect_branch): New.
28096         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
28097         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
28098         with local indirect jump when converting indirect call and jump.
28099         (ix86_set_indirect_branch_type): New.
28100         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
28101         (indirectlabelno): New.
28102         (indirect_thunk_needed): Likewise.
28103         (indirect_thunk_bnd_needed): Likewise.
28104         (indirect_thunks_used): Likewise.
28105         (indirect_thunks_bnd_used): Likewise.
28106         (INDIRECT_LABEL): Likewise.
28107         (indirect_thunk_name): Likewise.
28108         (output_indirect_thunk): Likewise.
28109         (output_indirect_thunk_function): Likewise.
28110         (ix86_output_indirect_branch_via_reg): Likewise.
28111         (ix86_output_indirect_branch_via_push): Likewise.
28112         (ix86_output_indirect_branch): Likewise.
28113         (ix86_output_indirect_jmp): Likewise.
28114         (ix86_code_end): Call output_indirect_thunk_function if needed.
28115         (ix86_output_call_insn): Call ix86_output_indirect_branch if
28116         needed.
28117         (ix86_handle_fndecl_attribute): Handle indirect_branch.
28118         (ix86_attribute_table): Add indirect_branch.
28119         * config/i386/i386.h (machine_function): Add indirect_branch_type
28120         and has_local_indirect_jump.
28121         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
28122         to true.
28123         (tablejump): Likewise.
28124         (*indirect_jump): Use ix86_output_indirect_jmp.
28125         (*tablejump_1): Likewise.
28126         (simple_return_indirect_internal): Likewise.
28127         * config/i386/i386.opt (mindirect-branch=): New option.
28128         (indirect_branch): New.
28129         (keep): Likewise.
28130         (thunk): Likewise.
28131         (thunk-inline): Likewise.
28132         (thunk-extern): Likewise.
28133         * doc/extend.texi: Document indirect_branch function attribute.
28134         * doc/invoke.texi: Document -mindirect-branch= option.
28136 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
28138         PR ipa/83051
28139         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
28141 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
28143         * ipa-inline.c (want_inline_small_function_p): Return false if
28144         inlining has already failed with CIF_FINAL_ERROR.
28145         (update_caller_keys): Call want_inline_small_function_p before
28146         can_inline_edge_p.
28147         (update_callee_keys): Likewise.
28149 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
28151         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
28152         New function.
28153         (rs6000_quadword_masked_address_p): Likewise.
28154         (quad_aligned_load_p): Likewise.
28155         (quad_aligned_store_p): Likewise.
28156         (const_load_sequence_p): Add comment to describe the outer-most loop.
28157         (mimic_memory_attributes_and_flags): New function.
28158         (rs6000_gen_stvx): Likewise.
28159         (replace_swapped_aligned_store): Likewise.
28160         (rs6000_gen_lvx): Likewise.
28161         (replace_swapped_aligned_load): Likewise.
28162         (replace_swapped_load_constant): Capitalize argument name in
28163         comment describing this function.
28164         (rs6000_analyze_swaps): Add a third pass to search for vector loads
28165         and stores that access quad-word aligned addresses and replace
28166         with stvx or lvx instructions when appropriate.
28167         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
28168         New function prototype.
28169         (rs6000_quadword_masked_address_p): Likewise.
28170         (rs6000_gen_lvx): Likewise.
28171         (rs6000_gen_stvx): Likewise.
28172         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
28173         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
28174         when memory address is aligned.
28175         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
28176         this split to select lvx instruction when memory address is aligned.
28177         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
28178         instruction when memory address is aligned.
28179         (*vsx_le_perm_load_v16qi): Likewise.
28180         (four unnamed splitters): Modify to select the stvx instruction
28181         when memory is aligned.
28183 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
28185         * predict.c (determine_unlikely_bbs): Handle correctly BBs
28186         which appears in the queue multiple times.
28188 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28189             Alan Hayward  <alan.hayward@arm.com>
28190             David Sherwood  <david.sherwood@arm.com>
28192         * tree-vectorizer.h (vec_lower_bound): New structure.
28193         (_loop_vec_info): Add check_nonzero and lower_bounds.
28194         (LOOP_VINFO_CHECK_NONZERO): New macro.
28195         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
28196         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
28197         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
28198         fields.  Make seg_len the distance travelled, not including the
28199         access size.
28200         (dr_direction_indicator): Declare.
28201         (dr_zero_step_indicator): Likewise.
28202         (dr_known_forward_stride_p): Likewise.
28203         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
28204         tree-ssanames.h.
28205         (runtime_alias_check_p): Allow runtime alias checks with
28206         variable strides.
28207         (operator ==): Compare access_size and align.
28208         (prune_runtime_alias_test_list): Rework for new distinction between
28209         the access_size and seg_len.
28210         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
28211         segment lengths.
28212         (get_segment_min_max): New function.
28213         (create_intersect_range_checks): Use it.
28214         (dr_step_indicator): New function.
28215         (dr_direction_indicator): Likewise.
28216         (dr_zero_step_indicator): Likewise.
28217         (dr_known_forward_stride_p): Likewise.
28218         * tree-loop-distribution.c (data_ref_segment_size): Return
28219         DR_STEP * (niters - 1).
28220         (compute_alias_check_pairs): Update call to the dr_with_seg_len
28221         constructor.
28222         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28223         (vect_preserves_scalar_order_p): New function, split out from...
28224         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
28225         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28226         (vect_vfa_access_size): New function.
28227         (vect_vfa_align): Likewise.
28228         (vect_compile_time_alias): Take access_size_a and access_b arguments.
28229         (dump_lower_bound): New function.
28230         (vect_check_lower_bound): Likewise.
28231         (vect_small_gap_p): Likewise.
28232         (vectorizable_with_step_bound_p): Likewise.
28233         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28234         depencies if the vectorization factor is 1.  Convert the checks
28235         for nonzero steps into checks on the bounds of DR_STEP.  Try using
28236         a bunds check for variable steps if the minimum required step is
28237         relatively small. Update calls to the dr_with_seg_len
28238         constructor and to vect_compile_time_alias.
28239         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28240         function.
28241         (vect_loop_versioning): Call it.
28242         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28243         when retrying.
28244         (vect_estimate_min_profitable_iters): Account for any bounds checks.
28246 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28247             Alan Hayward  <alan.hayward@arm.com>
28248             David Sherwood  <david.sherwood@arm.com>
28250         * doc/sourcebuild.texi (vect_scatter_store): Document.
28251         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28252         optabs.
28253         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28254         Document.
28255         * genopinit.c (main): Add supports_vec_scatter_store and
28256         supports_vec_scatter_store_cached to target_optabs.
28257         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28258         IFN_MASK_SCATTER_STORE.
28259         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28260         functions.
28261         * internal-fn.h (internal_store_fn_p): Declare.
28262         (internal_fn_stored_value_index): Likewise.
28263         * internal-fn.c (scatter_store_direct): New macro.
28264         (expand_scatter_store_optab_fn): New function.
28265         (direct_scatter_store_optab_supported_p): New macro.
28266         (internal_store_fn_p): New function.
28267         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28268         IFN_MASK_SCATTER_STORE.
28269         (internal_fn_mask_index): Likewise.
28270         (internal_fn_stored_value_index): New function.
28271         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28272         for scatter stores.
28273         * optabs-query.h (supports_vec_scatter_store_p): Declare.
28274         * optabs-query.c (supports_vec_scatter_store_p): New function.
28275         * tree-vectorizer.h (vect_get_store_rhs): Declare.
28276         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28277         true for scatter stores.
28278         (vect_gather_scatter_fn_p): Handle scatter stores too.
28279         (vect_check_gather_scatter): Consider using scatter stores if
28280         supports_vec_scatter_store_p.
28281         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28282         scatter stores too.
28283         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28284         internal_fn_stored_value_index.
28285         (check_load_store_masking): Handle scatter stores too.
28286         (vect_get_store_rhs): Make public.
28287         (vectorizable_call): Use internal_store_fn_p.
28288         (vectorizable_store): Handle scatter store internal functions.
28289         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28290         when deciding whether the end of the group has been reached.
28291         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28292         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28293         (mask_scatter_store<mode>): New insns.
28295 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28296             Alan Hayward  <alan.hayward@arm.com>
28297             David Sherwood  <david.sherwood@arm.com>
28299         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28300         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28301         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28302         function.
28303         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28304         Use vect_truncate_gather_scatter_offset if we can't treat the
28305         operation as a normal gather load or scatter store.
28306         (get_group_load_store_type): Take the gather_scatter_info
28307         as argument.  Try using a gather load or scatter store for
28308         single-element groups.
28309         (get_load_store_type): Update calls to get_group_load_store_type
28310         and vect_use_strided_gather_scatters_p.
28312 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28313             Alan Hayward  <alan.hayward@arm.com>
28314             David Sherwood  <david.sherwood@arm.com>
28316         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28317         optional tree argument.
28318         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28319         null target hooks.
28320         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28321         but continue to use the current value as a fallback.
28322         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28323         to compare the updates.
28324         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28325         (get_load_store_type): Use it when handling a strided access.
28326         (vect_get_strided_load_store_ops): New function.
28327         (vect_get_data_ptr_increment): Likewise.
28328         (vectorizable_load): Handle strided gather loads.  Always pass
28329         a step to vect_create_data_ref_ptr and bump_vector_ptr.
28331 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28332             Alan Hayward  <alan.hayward@arm.com>
28333             David Sherwood  <david.sherwood@arm.com>
28335         * doc/md.texi (gather_load@var{m}): Document.
28336         (mask_gather_load@var{m}): Likewise.
28337         * genopinit.c (main): Add supports_vec_gather_load and
28338         supports_vec_gather_load_cached to target_optabs.
28339         * optabs-tree.c (init_tree_optimization_optabs): Use
28340         ggc_cleared_alloc to allocate target_optabs.
28341         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28342         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28343         functions.
28344         * internal-fn.h (internal_load_fn_p): Declare.
28345         (internal_gather_scatter_fn_p): Likewise.
28346         (internal_fn_mask_index): Likewise.
28347         (internal_gather_scatter_fn_supported_p): Likewise.
28348         * internal-fn.c (gather_load_direct): New macro.
28349         (expand_gather_load_optab_fn): New function.
28350         (direct_gather_load_optab_supported_p): New macro.
28351         (direct_internal_fn_optab): New function.
28352         (internal_load_fn_p): Likewise.
28353         (internal_gather_scatter_fn_p): Likewise.
28354         (internal_fn_mask_index): Likewise.
28355         (internal_gather_scatter_fn_supported_p): Likewise.
28356         * optabs-query.c (supports_at_least_one_mode_p): New function.
28357         (supports_vec_gather_load_p): Likewise.
28358         * optabs-query.h (supports_vec_gather_load_p): Declare.
28359         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28360         and memory_type field.
28361         (NUM_PATTERNS): Bump to 15.
28362         * tree-vect-data-refs.c: Include internal-fn.h.
28363         (vect_gather_scatter_fn_p): New function.
28364         (vect_describe_gather_scatter_call): Likewise.
28365         (vect_check_gather_scatter): Try using internal functions for
28366         gather loads.  Recognize existing calls to a gather load function.
28367         (vect_analyze_data_refs): Consider using gather loads if
28368         supports_vec_gather_load_p.
28369         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28370         (vect_get_gather_scatter_offset_type): Likewise.
28371         (vect_convert_mask_for_vectype): Likewise.
28372         (vect_add_conversion_to_patterm): Likewise.
28373         (vect_try_gather_scatter_pattern): Likewise.
28374         (vect_recog_gather_scatter_pattern): New pattern recognizer.
28375         (vect_vect_recog_func_ptrs): Add it.
28376         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28377         internal_fn_mask_index and internal_gather_scatter_fn_p.
28378         (check_load_store_masking): Take the gather_scatter_info as an
28379         argument and handle gather loads.
28380         (vect_get_gather_scatter_ops): New function.
28381         (vectorizable_call): Check internal_load_fn_p.
28382         (vectorizable_load): Likewise.  Handle gather load internal
28383         functions.
28384         (vectorizable_store): Update call to check_load_store_masking.
28385         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28386         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28387         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28388         (aarch64_gather_scale_operand_d): New predicates.
28389         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28390         (mask_gather_load<mode>): New insns.
28392 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28393             Alan Hayward  <alan.hayward@arm.com>
28394             David Sherwood  <david.sherwood@arm.com>
28396         * optabs.def (fold_left_plus_optab): New optab.
28397         * doc/md.texi (fold_left_plus_@var{m}): Document.
28398         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28399         * internal-fn.c (fold_left_direct): Define.
28400         (expand_fold_left_optab_fn): Likewise.
28401         (direct_fold_left_optab_supported_p): Likewise.
28402         * fold-const-call.c (fold_const_fold_left): New function.
28403         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28404         * tree-parloops.c (valid_reduction_p): New function.
28405         (gather_scalar_reductions): Use it.
28406         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28407         (vect_finish_replace_stmt): Declare.
28408         * tree-vect-loop.c (fold_left_reduction_fn): New function.
28409         (needs_fold_left_reduction_p): New function, split out from...
28410         (vect_is_simple_reduction): ...here.  Accept reductions that
28411         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28412         (vect_force_simple_reduction): Also store the reduction type in
28413         the assignment's STMT_VINFO_REDUC_TYPE.
28414         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28415         (merge_with_identity): New function.
28416         (vect_expand_fold_left): Likewise.
28417         (vectorize_fold_left_reduction): Likewise.
28418         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
28419         scalar phi in place for it.  Check for target support and reject
28420         cases that would reassociate the operation.  Defer the transform
28421         phase to vectorize_fold_left_reduction.
28422         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28423         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28424         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28426 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28428         * tree-if-conv.c (predicate_mem_writes): Remove redundant
28429         call to ifc_temp_var.
28431 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28432             Alan Hayward  <alan.hayward@arm.com>
28433             David Sherwood  <david.sherwood@arm.com>
28435         * target.def (legitimize_address_displacement): Take the original
28436         offset as a poly_int.
28437         * targhooks.h (default_legitimize_address_displacement): Update
28438         accordingly.
28439         * targhooks.c (default_legitimize_address_displacement): Likewise.
28440         * doc/tm.texi: Regenerate.
28441         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28442         as an argument, moving assert of ad->disp == ad->disp_term to...
28443         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
28444         Try calling targetm.legitimize_address_displacement before expanding
28445         the address rather than afterwards, and adjust for the new interface.
28446         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28447         Match the new hook interface.  Handle SVE addresses.
28448         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28449         new hook interface.
28451 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28453         * Makefile.in (OBJS): Add early-remat.o.
28454         * target.def (select_early_remat_modes): New hook.
28455         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28456         * doc/tm.texi: Regenerate.
28457         * targhooks.h (default_select_early_remat_modes): Declare.
28458         * targhooks.c (default_select_early_remat_modes): New function.
28459         * timevar.def (TV_EARLY_REMAT): New timevar.
28460         * passes.def (pass_early_remat): New pass.
28461         * tree-pass.h (make_pass_early_remat): Declare.
28462         * early-remat.c: New file.
28463         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28464         function.
28465         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28467 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28468             Alan Hayward  <alan.hayward@arm.com>
28469             David Sherwood  <david.sherwood@arm.com>
28471         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28472         vfm1 with a bound_epilog parameter.
28473         (vect_do_peeling): Update calls accordingly, and move the prologue
28474         call earlier in the function.  Treat the base bound_epilog as 0 for
28475         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
28476         this base when peeling for gaps.
28477         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28478         with fully-masked loops.
28479         (vect_estimate_min_profitable_iters): Handle the single peeled
28480         iteration in that case.
28482 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28483             Alan Hayward  <alan.hayward@arm.com>
28484             David Sherwood  <david.sherwood@arm.com>
28486         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28487         single-element interleaving even if the size is not a power of 2.
28488         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28489         accesses for single-element interleaving if the group size is
28490         not a power of 2.
28492 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28493             Alan Hayward  <alan.hayward@arm.com>
28494             David Sherwood  <david.sherwood@arm.com>
28496         * doc/md.texi (fold_extract_last_@var{m}): Document.
28497         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28498         * optabs.def (fold_extract_last_optab): New optab.
28499         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28500         * internal-fn.c (fold_extract_direct): New macro.
28501         (expand_fold_extract_optab_fn): Likewise.
28502         (direct_fold_extract_optab_supported_p): Likewise.
28503         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28504         * tree-vect-loop.c (vect_model_reduction_cost): Handle
28505         EXTRACT_LAST_REDUCTION.
28506         (get_initial_def_for_reduction): Do not create an initial vector
28507         for EXTRACT_LAST_REDUCTION reductions.
28508         (vectorizable_reduction): Leave the scalar phi in place for
28509         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
28510         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
28511         epilogue code for EXTRACT_LAST_REDUCTION and defer the
28512         transform phase to vectorizable_condition.
28513         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28514         split out from...
28515         (vect_finish_stmt_generation): ...here.
28516         (vect_finish_replace_stmt): New function.
28517         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28518         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28519         pattern.
28520         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28522 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28523             Alan Hayward  <alan.hayward@arm.com>
28524             David Sherwood  <david.sherwood@arm.com>
28526         * doc/md.texi (extract_last_@var{m}): Document.
28527         * optabs.def (extract_last_optab): New optab.
28528         * internal-fn.def (EXTRACT_LAST): New internal function.
28529         * internal-fn.c (cond_unary_direct): New macro.
28530         (expand_cond_unary_optab_fn): Likewise.
28531         (direct_cond_unary_optab_supported_p): Likewise.
28532         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28533         loops using EXTRACT_LAST.
28534         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28535         (extract_last_<mode>): ...this optab.
28536         (vec_extract<mode><Vel>): Update accordingly.
28538 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28539             Alan Hayward  <alan.hayward@arm.com>
28540             David Sherwood  <david.sherwood@arm.com>
28542         * target.def (empty_mask_is_expensive): New hook.
28543         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28544         * doc/tm.texi: Regenerate.
28545         * targhooks.h (default_empty_mask_is_expensive): Declare.
28546         * targhooks.c (default_empty_mask_is_expensive): New function.
28547         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28548         if the target says that empty masks are expensive.
28549         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28550         New function.
28551         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28553 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28554             Alan Hayward  <alan.hayward@arm.com>
28555             David Sherwood  <david.sherwood@arm.com>
28557         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28558         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28559         (vect_use_loop_mask_for_alignment_p): New function.
28560         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28561         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28562         niters_skip argument.  Make sure that the first niters_skip elements
28563         of the first iteration are inactive.
28564         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28565         Update call to vect_set_loop_masks_directly.
28566         (get_misalign_in_elems): New function, split out from...
28567         (vect_gen_prolog_loop_niters): ...here.
28568         (vect_update_init_of_dr): Take a code argument that specifies whether
28569         the adjustment should be added or subtracted.
28570         (vect_update_init_of_drs): Likewise.
28571         (vect_prepare_for_masked_peels): New function.
28572         (vect_do_peeling): Skip prologue peeling if we're using a mask
28573         instead.  Update call to vect_update_inits_of_drs.
28574         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28575         mask_skip_niters.
28576         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28577         alignment.  Do not include the number of peeled iterations in
28578         the minimum threshold in that case.
28579         (vectorizable_induction): Adjust the start value down by
28580         LOOP_VINFO_MASK_SKIP_NITERS iterations.
28581         (vect_transform_loop): Call vect_prepare_for_masked_peels.
28582         Take the number of skipped iterations into account when calculating
28583         the loop bounds.
28584         * tree-vect-stmts.c (vect_gen_while_not): New function.
28586 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28587             Alan Hayward  <alan.hayward@arm.com>
28588             David Sherwood  <david.sherwood@arm.com>
28590         * doc/sourcebuild.texi (vect_fully_masked): Document.
28591         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28592         default value to 0.
28593         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28594         split out from...
28595         (vect_analyze_loop_2): ...here. Don't check the vectorization
28596         factor against the number of loop iterations if the loop is
28597         fully-masked.
28599 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28600             Alan Hayward  <alan.hayward@arm.com>
28601             David Sherwood  <david.sherwood@arm.com>
28603         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28604         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28605         (dump_groups): Update accordingly.
28606         (iv_use::mem_type): New member variable.
28607         (address_p): New function.
28608         (record_use): Add a mem_type argument and initialize the new
28609         mem_type field.
28610         (record_group_use): Add a mem_type argument.  Use address_p.
28611         Remove obsolete null checks of base_object.  Update call to record_use.
28612         (find_interesting_uses_op): Update call to record_group_use.
28613         (find_interesting_uses_cond): Likewise.
28614         (find_interesting_uses_address): Likewise.
28615         (get_mem_type_for_internal_fn): New function.
28616         (find_address_like_use): Likewise.
28617         (find_interesting_uses_stmt): Try find_address_like_use before
28618         calling find_interesting_uses_op.
28619         (addr_offset_valid_p): Use the iv mem_type field as the type
28620         of the addressed memory.
28621         (add_autoinc_candidates): Likewise.
28622         (get_address_cost): Likewise.
28623         (split_small_address_groups_p): Use address_p.
28624         (split_address_groups): Likewise.
28625         (add_iv_candidate_for_use): Likewise.
28626         (autoinc_possible_for_pair): Likewise.
28627         (rewrite_groups): Likewise.
28628         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28629         (determine_group_iv_cost): Update after split of USE_ADDRESS.
28630         (get_alias_ptr_type_for_ptr_address): New function.
28631         (rewrite_use_address): Rewrite address uses in calls that were
28632         identified by find_address_like_use.
28634 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28635             Alan Hayward  <alan.hayward@arm.com>
28636             David Sherwood  <david.sherwood@arm.com>
28638         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28639         TARGET_MEM_REFs.
28640         * gimple-expr.h (is_gimple_addressable: Likewise.
28641         * gimple-expr.c (is_gimple_address): Likewise.
28642         * internal-fn.c (expand_call_mem_ref): New function.
28643         (expand_mask_load_optab_fn): Use it.
28644         (expand_mask_store_optab_fn): Likewise.
28646 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28647             Alan Hayward  <alan.hayward@arm.com>
28648             David Sherwood  <david.sherwood@arm.com>
28650         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28651         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28652         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28653         (cond_umax@var{mode}): Document.
28654         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28655         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28656         (cond_umin_optab, cond_umax_optab): New optabs.
28657         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28658         (COND_IOR, COND_XOR): New internal functions.
28659         * internal-fn.h (get_conditional_internal_fn): Declare.
28660         * internal-fn.c (cond_binary_direct): New macro.
28661         (expand_cond_binary_optab_fn): Likewise.
28662         (direct_cond_binary_optab_supported_p): Likewise.
28663         (get_conditional_internal_fn): New function.
28664         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28665         Cope with reduction statements that are vectorized as calls rather
28666         than assignments.
28667         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28668         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28669         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28670         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28671         (UNSPEC_COND_EOR): New unspecs.
28672         (optab): Add mappings for them.
28673         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28674         (sve_int_op, sve_fp_op): New int attributes.
28676 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28677             Alan Hayward  <alan.hayward@arm.com>
28678             David Sherwood  <david.sherwood@arm.com>
28680         * optabs.def (while_ult_optab): New optab.
28681         * doc/md.texi (while_ult@var{m}@var{n}): Document.
28682         * internal-fn.def (WHILE_ULT): New internal function.
28683         * internal-fn.h (direct_internal_fn_supported_p): New override
28684         that takes two types as argument.
28685         * internal-fn.c (while_direct): New macro.
28686         (expand_while_optab_fn): New function.
28687         (convert_optab_supported_p): Likewise.
28688         (direct_while_optab_supported_p): New macro.
28689         * wide-int.h (wi::udiv_ceil): New function.
28690         * tree-vectorizer.h (rgroup_masks): New structure.
28691         (vec_loop_masks): New typedef.
28692         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28693         and fully_masked_p.
28694         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28695         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28696         (vect_max_vf): New function.
28697         (slpeel_make_loop_iterate_ntimes): Delete.
28698         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28699         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28700         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28701         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28702         internal-fn.h, stor-layout.h and optabs-query.h.
28703         (vect_set_loop_mask): New function.
28704         (add_preheader_seq): Likewise.
28705         (add_header_seq): Likewise.
28706         (interleave_supported_p): Likewise.
28707         (vect_maybe_permute_loop_masks): Likewise.
28708         (vect_set_loop_masks_directly): Likewise.
28709         (vect_set_loop_condition_masked): Likewise.
28710         (vect_set_loop_condition_unmasked): New function, split out from
28711         slpeel_make_loop_iterate_ntimes.
28712         (slpeel_make_loop_iterate_ntimes): Rename to..
28713         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
28714         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28715         (vect_do_peeling): Update call accordingly.
28716         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28717         loops.
28718         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28719         mask_compare_type, can_fully_mask_p and fully_masked_p.
28720         (release_vec_loop_masks): New function.
28721         (_loop_vec_info): Use it to free the loop masks.
28722         (can_produce_all_loop_masks_p): New function.
28723         (vect_get_max_nscalars_per_iter): Likewise.
28724         (vect_verify_full_masking): Likewise.
28725         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28726         retries, and free the mask rgroups before retrying.  Check loop-wide
28727         reasons for disallowing fully-masked loops.  Make the final decision
28728         about whether use a fully-masked loop or not.
28729         (vect_estimate_min_profitable_iters): Do not assume that peeling
28730         for the number of iterations will be needed for fully-masked loops.
28731         (vectorizable_reduction): Disable fully-masked loops.
28732         (vectorizable_live_operation): Likewise.
28733         (vect_halve_mask_nunits): New function.
28734         (vect_double_mask_nunits): Likewise.
28735         (vect_record_loop_mask): Likewise.
28736         (vect_get_loop_mask): Likewise.
28737         (vect_transform_loop): Handle the case in which the final loop
28738         iteration might handle a partial vector.  Call vect_set_loop_condition
28739         instead of slpeel_make_loop_iterate_ntimes.
28740         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28741         (check_load_store_masking): New function.
28742         (prepare_load_store_mask): Likewise.
28743         (vectorizable_store): Handle fully-masked loops.
28744         (vectorizable_load): Likewise.
28745         (supportable_widening_operation): Use vect_halve_mask_nunits for
28746         booleans.
28747         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28748         (vect_gen_while): New function.
28749         * config/aarch64/aarch64.md (umax<mode>3): New expander.
28750         (aarch64_uqdec<mode>): New insn.
28752 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28753             Alan Hayward  <alan.hayward@arm.com>
28754             David Sherwood  <david.sherwood@arm.com>
28756         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28757         (reduc_xor_scal_optab): New optabs.
28758         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
28759         (reduc_xor_scal_@var{m}): Document.
28760         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
28761         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
28762         internal functions.
28763         * fold-const-call.c (fold_const_call): Handle them.
28764         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
28765         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
28766         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
28767         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
28768         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
28769         (UNSPEC_XORV): New unspecs.
28770         (optab): Add entries for them.
28771         (BITWISEV): New int iterator.
28772         (bit_reduc_op): New int attributes.
28774 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28775             Alan Hayward  <alan.hayward@arm.com>
28776             David Sherwood  <david.sherwood@arm.com>
28778         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
28779         * internal-fn.def (VEC_SHL_INSERT): New internal function.
28780         * optabs.def (vec_shl_insert_optab): New optab.
28781         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
28782         (duplicate_and_interleave): Likewise.
28783         * tree-vect-loop.c: Include internal-fn.h.
28784         (neutral_op_for_slp_reduction): New function, split out from
28785         get_initial_defs_for_reduction.
28786         (get_initial_def_for_reduction): Handle option 2 for variable-length
28787         vectors by loading the neutral value into a vector and then shifting
28788         the initial value into element 0.
28789         (get_initial_defs_for_reduction): Replace the code argument with
28790         the neutral value calculated by neutral_op_for_slp_reduction.
28791         Use gimple_build_vector for constant-length vectors.
28792         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
28793         but the first group_size elements have a neutral value.
28794         Use duplicate_and_interleave otherwise.
28795         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
28796         Update call to get_initial_defs_for_reduction.  Handle SLP
28797         reductions for variable-length vectors by creating one vector
28798         result for each scalar result, with the elements associated
28799         with other scalar results stubbed out with the neutral value.
28800         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
28801         Require IFN_VEC_SHL_INSERT for double reductions on
28802         variable-length vectors, or SLP reductions that have
28803         a neutral value.  Require can_duplicate_and_interleave_p
28804         support for variable-length unchained SLP reductions if there
28805         is no neutral value, such as for MIN/MAX reductions.  Also require
28806         the number of vector elements to be a multiple of the number of
28807         SLP statements when doing variable-length unchained SLP reductions.
28808         Update call to vect_create_epilog_for_reduction.
28809         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
28810         and remove initial values.
28811         (duplicate_and_interleave): Make public.
28812         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
28813         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
28815 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28816             Alan Hayward  <alan.hayward@arm.com>
28817             David Sherwood  <david.sherwood@arm.com>
28819         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
28820         (can_duplicate_and_interleave_p): New function.
28821         (vect_get_and_check_slp_defs): Take the vector of statements
28822         rather than just the current one.  Remove excess parentheses.
28823         Restriction rejectinon of vect_constant_def and vect_external_def
28824         for variable-length vectors to boolean types, or types for which
28825         can_duplicate_and_interleave_p is false.
28826         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
28827         (duplicate_and_interleave): New function.
28828         (vect_get_constant_vectors): Use gimple_build_vector for
28829         constant-length vectors and suitable variable-length constant
28830         vectors.  Use duplicate_and_interleave for other variable-length
28831         vectors.  Don't defer the update when inserting new statements.
28833 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28834             Alan Hayward  <alan.hayward@arm.com>
28835             David Sherwood  <david.sherwood@arm.com>
28837         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
28838         min_profitable_iters doesn't go negative.
28840 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28841             Alan Hayward  <alan.hayward@arm.com>
28842             David Sherwood  <david.sherwood@arm.com>
28844         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
28845         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
28846         * optabs.def (vec_mask_load_lanes_optab): New optab.
28847         (vec_mask_store_lanes_optab): Likewise.
28848         * internal-fn.def (MASK_LOAD_LANES): New internal function.
28849         (MASK_STORE_LANES): Likewise.
28850         * internal-fn.c (mask_load_lanes_direct): New macro.
28851         (mask_store_lanes_direct): Likewise.
28852         (expand_mask_load_optab_fn): Handle masked operations.
28853         (expand_mask_load_lanes_optab_fn): New macro.
28854         (expand_mask_store_optab_fn): Handle masked operations.
28855         (expand_mask_store_lanes_optab_fn): New macro.
28856         (direct_mask_load_lanes_optab_supported_p): Likewise.
28857         (direct_mask_store_lanes_optab_supported_p): Likewise.
28858         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
28859         parameter.
28860         (vect_load_lanes_supported): Likewise.
28861         * tree-vect-data-refs.c (strip_conversion): New function.
28862         (can_group_stmts_p): Likewise.
28863         (vect_analyze_data_ref_accesses): Use it instead of checking
28864         for a pair of assignments.
28865         (vect_store_lanes_supported): Take a masked_p parameter.
28866         (vect_load_lanes_supported): Likewise.
28867         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
28868         vect_store_lanes_supported and vect_load_lanes_supported.
28869         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
28870         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
28871         parameter.  Don't allow gaps for masked accesses.
28872         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
28873         and vect_load_lanes_supported.
28874         (get_load_store_type): Take a masked_p parameter and update
28875         call to get_group_load_store_type.
28876         (vectorizable_store): Update call to get_load_store_type.
28877         Handle IFN_MASK_STORE_LANES.
28878         (vectorizable_load): Update call to get_load_store_type.
28879         Handle IFN_MASK_LOAD_LANES.
28881 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28882             Alan Hayward  <alan.hayward@arm.com>
28883             David Sherwood  <david.sherwood@arm.com>
28885         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
28886         modes for SVE.
28887         * config/aarch64/aarch64-protos.h
28888         (aarch64_sve_struct_memory_operand_p): Declare.
28889         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
28890         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
28891         (VPRED, vpred): Handle SVE structure modes.
28892         * config/aarch64/constraints.md (Utx): New constraint.
28893         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
28894         (aarch64_sve_struct_nonimmediate_operand): New predicates.
28895         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
28896         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
28897         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
28898         structure modes.  Split into pieces after RA.
28899         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
28900         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
28901         New patterns.
28902         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
28903         SVE structure modes.
28904         (aarch64_classify_address): Likewise.
28905         (sizetochar): Move earlier in file.
28906         (aarch64_print_operand): Handle SVE register lists.
28907         (aarch64_array_mode): New function.
28908         (aarch64_sve_struct_memory_operand_p): Likewise.
28909         (TARGET_ARRAY_MODE): Redefine.
28911 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28912             Alan Hayward  <alan.hayward@arm.com>
28913             David Sherwood  <david.sherwood@arm.com>
28915         * target.def (array_mode): New target hook.
28916         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
28917         * doc/tm.texi: Regenerate.
28918         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
28919         * hooks.c (hook_optmode_mode_uhwi_none): New function.
28920         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
28921         targetm.array_mode.
28922         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
28923         type sizes.
28925 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28926             Alan Hayward  <alan.hayward@arm.com>
28927             David Sherwood  <david.sherwood@arm.com>
28929         * fold-const.c (fold_binary_loc): Check the argument types
28930         rather than the result type when testing for a vector operation.
28932 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28934         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
28935         * doc/tm.texi: Regenerate.
28937 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28938             Alan Hayward  <alan.hayward@arm.com>
28939             David Sherwood  <david.sherwood@arm.com>
28941         * doc/invoke.texi (-msve-vector-bits=): Document new option.
28942         (sve): Document new AArch64 extension.
28943         * doc/md.texi (w): Extend the description of the AArch64
28944         constraint to include SVE vectors.
28945         (Upl, Upa): Document new AArch64 predicate constraints.
28946         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
28947         enum.
28948         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
28949         (msve-vector-bits=): New option.
28950         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
28951         SVE when these are disabled.
28952         (sve): New extension.
28953         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
28954         modes.  Adjust their number of units based on aarch64_sve_vg.
28955         (MAX_BITSIZE_MODE_ANY_MODE): Define.
28956         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
28957         aarch64_addr_query_type.
28958         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
28959         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
28960         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
28961         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
28962         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
28963         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
28964         (aarch64_simd_imm_zero_p): Delete.
28965         (aarch64_check_zero_based_sve_index_immediate): Declare.
28966         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28967         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28968         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28969         (aarch64_sve_float_mul_immediate_p): Likewise.
28970         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28971         rather than an rtx.
28972         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
28973         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
28974         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
28975         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
28976         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
28977         (aarch64_regmode_natural_size): Likewise.
28978         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
28979         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
28980         left one place.
28981         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
28982         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
28983         for VG and the SVE predicate registers.
28984         (V_ALIASES): Add a "z"-prefixed alias.
28985         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
28986         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
28987         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
28988         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
28989         (REG_CLASS_NAMES): Add entries for them.
28990         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
28991         and the predicate registers.
28992         (aarch64_sve_vg): Declare.
28993         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
28994         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
28995         (REGMODE_NATURAL_SIZE): Define.
28996         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
28997         SVE macros.
28998         * config/aarch64/aarch64.c: Include cfgrtl.h.
28999         (simd_immediate_info): Add a constructor for series vectors,
29000         and an associated step field.
29001         (aarch64_sve_vg): New variable.
29002         (aarch64_dbx_register_number): Handle VG and the predicate registers.
29003         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
29004         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
29005         (VEC_ANY_DATA, VEC_STRUCT): New constants.
29006         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
29007         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
29008         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
29009         (aarch64_get_mask_mode): New functions.
29010         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
29011         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
29012         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
29013         predicate modes and predicate registers.  Explicitly restrict
29014         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
29015         to store a vector mode if it is recognized by
29016         aarch64_classify_vector_mode.
29017         (aarch64_regmode_natural_size): New function.
29018         (aarch64_hard_regno_caller_save_mode): Return the original mode
29019         for predicates.
29020         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
29021         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
29022         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
29023         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
29024         functions.
29025         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
29026         does not overlap dest if the function is frame-related.  Handle
29027         SVE constants.
29028         (aarch64_split_add_offset): New function.
29029         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
29030         them aarch64_add_offset.
29031         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
29032         and update call to aarch64_sub_sp.
29033         (aarch64_add_cfa_expression): New function.
29034         (aarch64_expand_prologue): Pass extra temporary registers to the
29035         functions above.  Handle the case in which we need to emit new
29036         DW_CFA_expressions for registers that were originally saved
29037         relative to the stack pointer, but now have to be expressed
29038         relative to the frame pointer.
29039         (aarch64_output_mi_thunk): Pass extra temporary registers to the
29040         functions above.
29041         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
29042         IP0 and IP1 values for SVE frames.
29043         (aarch64_expand_vec_series): New function.
29044         (aarch64_expand_sve_widened_duplicate): Likewise.
29045         (aarch64_expand_sve_const_vector): Likewise.
29046         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
29047         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
29048         into the register, rather than emitting a SET directly.
29049         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
29050         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
29051         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
29052         (offset_9bit_signed_scaled_p): New functions.
29053         (aarch64_replicate_bitmask_imm): New function.
29054         (aarch64_bitmask_imm): Use it.
29055         (aarch64_cannot_force_const_mem): Reject expressions involving
29056         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
29057         (aarch64_classify_index): Handle SVE indices, by requiring
29058         a plain register index with a scale that matches the element size.
29059         (aarch64_classify_address): Handle SVE addresses.  Assert that
29060         the mode of the address is VOIDmode or an integer mode.
29061         Update call to aarch64_classify_symbol.
29062         (aarch64_classify_symbolic_expression): Update call to
29063         aarch64_classify_symbol.
29064         (aarch64_const_vec_all_in_range_p): New function.
29065         (aarch64_print_vector_float_operand): Likewise.
29066         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
29067         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
29068         and the FP immediates 1.0 and 0.5.
29069         (aarch64_print_address_internal): Handle SVE addresses.
29070         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
29071         (aarch64_regno_regclass): Handle predicate registers.
29072         (aarch64_secondary_reload): Handle big-endian reloads of SVE
29073         data modes.
29074         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
29075         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
29076         (aarch64_convert_sve_vector_bits): New function.
29077         (aarch64_override_options): Use it to handle -msve-vector-bits=.
29078         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29079         rather than an rtx.
29080         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
29081         Handle SVE vector and predicate modes.  Accept VL-based constants
29082         that need only one temporary register, and VL offsets that require
29083         no temporary registers.
29084         (aarch64_conditional_register_usage): Mark the predicate registers
29085         as fixed if SVE isn't available.
29086         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
29087         Return true for SVE vector and predicate modes.
29088         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
29089         rather than an unsigned int.  Handle SVE modes.
29090         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
29091         SVE modes.
29092         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
29093         if SVE is enabled.
29094         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29095         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29096         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29097         (aarch64_sve_float_mul_immediate_p): New functions.
29098         (aarch64_sve_valid_immediate): New function.
29099         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
29100         Explicitly reject structure modes.  Check for INDEX constants.
29101         Handle PTRUE and PFALSE constants.
29102         (aarch64_check_zero_based_sve_index_immediate): New function.
29103         (aarch64_simd_imm_zero_p): Delete.
29104         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
29105         vector modes.  Accept constants in the range of CNT[BHWD].
29106         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
29107         ask for an Advanced SIMD mode.
29108         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
29109         (aarch64_simd_vector_alignment): Handle SVE predicates.
29110         (aarch64_vectorize_preferred_vector_alignment): New function.
29111         (aarch64_simd_vector_alignment_reachable): Use it instead of
29112         the vector size.
29113         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
29114         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
29115         functions.
29116         (MAX_VECT_LEN): Delete.
29117         (expand_vec_perm_d): Add a vec_flags field.
29118         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
29119         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
29120         (aarch64_evpc_ext): Don't apply a big-endian lane correction
29121         for SVE modes.
29122         (aarch64_evpc_rev): Rename to...
29123         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
29124         (aarch64_evpc_rev_global): New function.
29125         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
29126         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
29127         MAX_VECT_LEN.
29128         (aarch64_evpc_sve_tbl): New function.
29129         (aarch64_expand_vec_perm_const_1): Update after rename of
29130         aarch64_evpc_rev.  Handle SVE permutes too, trying
29131         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
29132         than aarch64_evpc_tbl.
29133         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
29134         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
29135         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
29136         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
29137         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
29138         (aarch64_expand_sve_vcond): New functions.
29139         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
29140         of aarch64_vector_mode_p.
29141         (aarch64_dwarf_poly_indeterminate_value): New function.
29142         (aarch64_compute_pressure_classes): Likewise.
29143         (aarch64_can_change_mode_class): Likewise.
29144         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
29145         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
29146         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
29147         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
29148         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
29149         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
29150         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
29151         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
29152         constraints.
29153         (Dn, Dl, Dr): Accept const as well as const_vector.
29154         (Dz): Likewise.  Compare against CONST0_RTX.
29155         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
29156         of "vector" where appropriate.
29157         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
29158         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
29159         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
29160         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
29161         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
29162         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
29163         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
29164         (v_int_equiv): Extend to SVE modes.
29165         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
29166         mode attributes.
29167         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
29168         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
29169         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
29170         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
29171         (SVE_COND_FP_CMP): New int iterators.
29172         (perm_hilo): Handle the new unpack unspecs.
29173         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
29174         attributes.
29175         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
29176         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
29177         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
29178         (aarch64_equality_operator, aarch64_constant_vector_operand)
29179         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
29180         (aarch64_sve_nonimmediate_operand): Likewise.
29181         (aarch64_sve_general_operand): Likewise.
29182         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
29183         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
29184         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
29185         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
29186         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
29187         (aarch64_sve_float_arith_immediate): Likewise.
29188         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
29189         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
29190         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
29191         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
29192         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
29193         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
29194         (aarch64_sve_float_arith_operand): Likewise.
29195         (aarch64_sve_float_arith_with_sub_operand): Likewise.
29196         (aarch64_sve_float_mul_operand): Likewise.
29197         (aarch64_sve_vec_perm_operand): Likewise.
29198         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
29199         (aarch64_mov_operand): Accept const_poly_int and const_vector.
29200         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
29201         as well as const_vector.
29202         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
29203         in file.  Use CONST0_RTX and CONSTM1_RTX.
29204         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
29205         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
29206         Use aarch64_simd_imm_zero.
29207         * config/aarch64/aarch64-sve.md: New file.
29208         * config/aarch64/aarch64.md: Include it.
29209         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
29210         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
29211         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
29212         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
29213         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
29214         (sve): New attribute.
29215         (enabled): Disable instructions with the sve attribute unless
29216         TARGET_SVE.
29217         (movqi, movhi): Pass CONST_POLY_INT operaneds through
29218         aarch64_expand_mov_immediate.
29219         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
29220         CNT[BHSD] immediates.
29221         (movti): Split CONST_POLY_INT moves into two halves.
29222         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29223         Split additions that need a temporary here if the destination
29224         is the stack pointer.
29225         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29226         (*add<mode>3_poly_1): New instruction.
29227         (set_clobber_cc): New expander.
29229 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29231         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29232         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
29233         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29234         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29235         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
29236         Change innermode from fixed_mode_size to machine_mode.
29237         (simplify_subreg): Update call accordingly.  Handle a constant-sized
29238         subreg of a variable-length CONST_VECTOR.
29240 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29241             Alan Hayward  <alan.hayward@arm.com>
29242             David Sherwood  <david.sherwood@arm.com>
29244         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29245         (add_offset_to_base): New function, split out from...
29246         (create_mem_ref): ...here.  When handling a scale other than 1,
29247         check first whether the address is valid without the offset.
29248         Add it into the base if so, leaving the index and scale as-is.
29250 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
29252         PR c++/83778
29253         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29254         fold_for_warn before checking if arg2 is INTEGER_CST.
29256 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
29258         * config/rs6000/predicates.md (load_multiple_operation): Delete.
29259         (store_multiple_operation): Delete.
29260         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29261         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29262         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29263         guarded by TARGET_STRING.
29264         (rs6000_output_load_multiple): Delete.
29265         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29266         OPTION_MASK_STRING / TARGET_STRING handling.
29267         (print_operand) <'N', 'O'>: Add comment that these are unused now.
29268         (const rs6000_opt_masks) <"string">: Change mask to 0.
29269         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29270         (MASK_STRING): Delete.
29271         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29272         parts.  Simplify.
29273         (load_multiple): Delete.
29274         (*ldmsi8): Delete.
29275         (*ldmsi7): Delete.
29276         (*ldmsi6): Delete.
29277         (*ldmsi5): Delete.
29278         (*ldmsi4): Delete.
29279         (*ldmsi3): Delete.
29280         (store_multiple): Delete.
29281         (*stmsi8): Delete.
29282         (*stmsi7): Delete.
29283         (*stmsi6): Delete.
29284         (*stmsi5): Delete.
29285         (*stmsi4): Delete.
29286         (*stmsi3): Delete.
29287         (movmemsi_8reg): Delete.
29288         (corresponding unnamed define_insn): Delete.
29289         (movmemsi_6reg): Delete.
29290         (corresponding unnamed define_insn): Delete.
29291         (movmemsi_4reg): Delete.
29292         (corresponding unnamed define_insn): Delete.
29293         (movmemsi_2reg): Delete.
29294         (corresponding unnamed define_insn): Delete.
29295         (movmemsi_1reg): Delete.
29296         (corresponding unnamed define_insn): Delete.
29297         * config/rs6000/rs6000.opt (mno-string): New.
29298         (mstring): Replace by deprecation warning stub.
29299         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29301 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
29303         * regrename.c (regrename_do_replace): If replacing the same
29304         reg multiple times, try to reuse last created gen_raw_REG.
29306         PR debug/81155
29307         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29308         main to workaround a bug in GDB.
29310 2018-01-12  Tom de Vries  <tom@codesourcery.com>
29312         PR target/83737
29313         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29315 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
29317         PR rtl-optimization/80481
29318         * ira-color.c (get_cap_member): New function.
29319         (allocnos_conflict_by_live_ranges_p): Use it.
29320         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29321         (setup_slot_coalesced_allocno_live_ranges): Ditto.
29323 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
29325         PR target/83628
29326         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29327         (*saddl_se_1): Ditto.
29328         (*ssubsi_1): Ditto.
29329         (*ssubl_se_1): Ditto.
29331 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29333         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29334         rather than wi::to_widest for DR_INITs.
29335         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29336         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29337         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29338         INTEGER_CSTs.
29339         (vect_analyze_group_access_1): Note that here.
29341 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29343         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29344         polynomial type sizes.
29346 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29348         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29349         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29350         (gimple_add_tmp_var): Likewise.
29352 2018-01-12  Martin Liska  <mliska@suse.cz>
29354         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29355         (gimple_alloc_sizes): Likewise.
29356         (dump_gimple_statistics): Use PRIu64 in printf format.
29357         * gimple.h: Change uint64_t to int.
29359 2018-01-12  Martin Liska  <mliska@suse.cz>
29361         * tree-core.h: Use uint64_t instead of int.
29362         * tree.c (tree_node_counts): Likewise.
29363         (tree_node_sizes): Likewise.
29364         (dump_tree_statistics): Use PRIu64 in printf format.
29366 2018-01-12  Martin Liska  <mliska@suse.cz>
29368         * Makefile.in: As qsort_chk is implemented in vec.c, add
29369         vec.o to linkage of gencfn-macros.
29370         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29371         passing the info to record_node_allocation_statistics.
29372         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29373         and pass the info.
29374         * ggc-common.c (struct ggc_usage): Add operator== and use
29375         it in operator< and compare function.
29376         * mem-stats.h (struct mem_usage): Likewise.
29377         * vec.c (struct vec_usage): Remove operator< and compare
29378         function. Can be simply inherited.
29380 2018-01-12  Martin Jambor  <mjambor@suse.cz>
29382         PR target/81616
29383         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29384         * tree-ssa-math-opts.c: Include domwalk.h.
29385         (convert_mult_to_fma_1): New function.
29386         (fma_transformation_info): New type.
29387         (fma_deferring_state): Likewise.
29388         (cancel_fma_deferring): New function.
29389         (result_of_phi): Likewise.
29390         (last_fma_candidate_feeds_initial_phi): Likewise.
29391         (convert_mult_to_fma): Added deferring logic, split actual
29392         transformation to convert_mult_to_fma_1.
29393         (math_opts_dom_walker): New type.
29394         (math_opts_dom_walker::after_dom_children): New method, body moved
29395         here from pass_optimize_widening_mul::execute, added deferring logic
29396         bits.
29397         (pass_optimize_widening_mul::execute): Moved most of code to
29398         math_opts_dom_walker::after_dom_children.
29399         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29400         * config/i386/i386.c (ix86_option_override_internal): Added
29401         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29403 2018-01-12  Richard Biener  <rguenther@suse.de>
29405         PR debug/83157
29406         * dwarf2out.c (gen_variable_die): Do not reset old_die for
29407         inline instance vars.
29409 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
29411         PR target/81819
29412         * config/rx/rx.c (rx_is_restricted_memory_address):
29413         Handle SUBREG case.
29415 2018-01-12  Richard Biener  <rguenther@suse.de>
29417         PR tree-optimization/80846
29418         * target.def (split_reduction): New target hook.
29419         * targhooks.c (default_split_reduction): New function.
29420         * targhooks.h (default_split_reduction): Declare.
29421         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29422         target requests first reduce vectors by combining low and high
29423         parts.
29424         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29425         (get_vectype_for_scalar_type_and_size): Export.
29426         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29427         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29428         * doc/tm.texi: Regenerate.
29429         * config/i386/i386.c (ix86_split_reduction): Implement
29430         TARGET_VECTORIZE_SPLIT_REDUCTION.
29432 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
29434         PR target/83368
29435         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29436         in PIC mode except for TARGET_VXWORKS_RTP.
29437         * config/sparc/sparc.c: Include cfgrtl.h.
29438         (TARGET_INIT_PIC_REG): Define.
29439         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29440         (sparc_pic_register_p): New predicate.
29441         (sparc_legitimate_address_p): Use it.
29442         (sparc_legitimize_pic_address): Likewise.
29443         (sparc_delegitimize_address): Likewise.
29444         (sparc_mode_dependent_address_p): Likewise.
29445         (gen_load_pcrel_sym): Remove 4th parameter.
29446         (load_got_register): Adjust call to above.  Remove obsolete stuff.
29447         (sparc_expand_prologue): Do not call load_got_register here.
29448         (sparc_flat_expand_prologue): Likewise.
29449         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29450         (sparc_use_pseudo_pic_reg): New function.
29451         (sparc_init_pic_reg): Likewise.
29452         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29453         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29455 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
29457         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29458         Add item for branch_cost.
29460 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
29462         PR rtl-optimization/83565
29463         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29464         not extend the result to a larger mode for rotate operations.
29465         (num_sign_bit_copies1): Likewise.
29467 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29469         PR target/40411
29470         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29471         -symbolic.
29472         Use values-Xc.o for -pedantic.
29473         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29475 2018-01-12  Martin Liska  <mliska@suse.cz>
29477         PR ipa/83054
29478         * ipa-devirt.c (final_warning_record::grow_type_warnings):
29479         New function.
29480         (possible_polymorphic_call_targets): Use it.
29481         (ipa_devirt): Likewise.
29483 2018-01-12  Martin Liska  <mliska@suse.cz>
29485         * profile-count.h (enum profile_quality): Use 0 as invalid
29486         enum value of profile_quality.
29488 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
29490         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29491         -mext-string options.
29493 2018-01-12  Richard Biener  <rguenther@suse.de>
29495         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29496         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29497         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29498         Likewise.
29499         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29501 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
29503         * configure.ac (--with-long-double-format): Add support for the
29504         configuration option to change the default long double format on
29505         PowerPC systems.
29506         * config.gcc (powerpc*-linux*-*): Likewise.
29507         * configure: Regenerate.
29508         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29509         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29510         used without modification.
29512 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29514         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29515         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29516         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29517         MISC_BUILTIN_SPEC_BARRIER.
29518         (rs6000_init_builtins): Likewise.
29519         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29520         enum value.
29521         (speculation_barrier): New define_insn.
29522         * doc/extend.texi: Document __builtin_speculation_barrier.
29524 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
29526         PR target/83203
29527         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29528         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29529         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29530         iterators.
29531         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
29532         integral modes instead of "ss" and "sd".
29533         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29534         vectors with 32-bit and 64-bit elements.
29535         (vecdupssescalarmodesuffix): New mode attribute.
29536         (vec_dup<mode>): Use it.
29538 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
29540         PR target/83330
29541         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29542         frame if argument is passed on stack.
29544 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
29546         PR target/82682
29547         * ree.c (combine_reaching_defs): Optimize also
29548         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29549         reg2=any_extend(exp); reg1=reg2;, formatting fix.
29551 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
29553         PR middle-end/83189
29554         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29556 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
29558         PR middle-end/83718
29559         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29560         after they are computed.
29562 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
29564         PR tree-optimization/83695
29565         * gimple-loop-linterchange.cc
29566         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29567         reset cached scev information after interchange.
29568         (pass_linterchange::execute): Remove call to scev_reset_htab.
29570 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29572         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29573         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29574         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29575         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29576         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29577         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29578         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29579         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29580         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29581         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29582         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29583         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29584         (V_lane_reg): Likewise.
29585         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29586         New define_expand.
29587         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29588         (vfmal_lane_low<mode>_intrinsic,
29589         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29590         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29591         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29592         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29593         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29594         vfmsl_lane_high<mode>_intrinsic): New define_insns.
29596 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29598         * config/arm/arm-cpus.in (fp16fml): New feature.
29599         (ALL_SIMD): Add fp16fml.
29600         (armv8.2-a): Add fp16fml as an option.
29601         (armv8.3-a): Likewise.
29602         (armv8.4-a): Add fp16fml as part of fp16.
29603         * config/arm/arm.h (TARGET_FP16FML): Define.
29604         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29605         when appropriate.
29606         * config/arm/arm-modes.def (V2HF): Define.
29607         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29608         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29609         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29610         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29611         vfmsl_low, vfmsl_high): New set of builtins.
29612         * config/arm/iterators.md (PLUSMINUS): New code iterator.
29613         (vfml_op): New code attribute.
29614         (VFMLHALVES): New int iterator.
29615         (VFML, VFMLSEL): New mode attributes.
29616         (V_reg): Define mapping for V2HF.
29617         (V_hi, V_lo): New mode attributes.
29618         (VF_constraint): Likewise.
29619         (vfml_half, vfml_half_selector): New int attributes.
29620         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29621         define_expand.
29622         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29623         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29624         New define_insn.
29625         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29626         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29627         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29628         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
29629         documentation.
29630         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29631         Document new effective target and option set.
29633 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29635         * config/arm/arm-cpus.in (armv8_4): New feature.
29636         (ARMv8_4a): New fgroup.
29637         (armv8.4-a): New arch.
29638         * config/arm/arm-tables.opt: Regenerate.
29639         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29640         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29641         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29642         Add matching rules for -march=armv8.4-a and extensions.
29643         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29645 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
29647         PR target/81821
29648         * config/rx/rx.md (BW): New mode attribute.
29649         (sync_lock_test_and_setsi): Add mode suffix to insn output.
29651 2018-01-11  Richard Biener  <rguenther@suse.de>
29653         PR tree-optimization/83435
29654         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29655         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29656         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29658 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29659             Alan Hayward  <alan.hayward@arm.com>
29660             David Sherwood  <david.sherwood@arm.com>
29662         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29663         field.
29664         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
29665         (aarch64_print_address_internal): Use it to check for a zero offset.
29667 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29668             Alan Hayward  <alan.hayward@arm.com>
29669             David Sherwood  <david.sherwood@arm.com>
29671         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29672         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29673         Return a poly_int64 rather than a HOST_WIDE_INT.
29674         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29675         rather than a HOST_WIDE_INT.
29676         * config/aarch64/aarch64.h (aarch64_frame): Protect with
29677         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
29678         hard_fp_offset, frame_size, initial_adjust, callee_offset and
29679         final_offset from HOST_WIDE_INT to poly_int64.
29680         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29681         to_constant when getting the number of units in an Advanced SIMD
29682         mode.
29683         (aarch64_builtin_vectorized_function): Check for a constant number
29684         of units.
29685         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29686         GET_MODE_SIZE.
29687         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29688         attribute instead of GET_MODE_NUNITS.
29689         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29690         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29691         GET_MODE_SIZE for fixed-size registers.
29692         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29693         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29694         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29695         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29696         (aarch64_print_operand, aarch64_print_address_internal)
29697         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29698         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29699         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29700         Handle polynomial GET_MODE_SIZE.
29701         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
29702         wider than SImode without modification.
29703         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29704         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29705         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29706         passing and returning SVE modes.
29707         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29708         rather than GEN_INT.
29709         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29710         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29711         (aarch64_allocate_and_probe_stack_space): Likewise.
29712         (aarch64_layout_frame): Cope with polynomial offsets.
29713         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29714         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
29715         polynomial offsets.
29716         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29717         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29718         poly_int64 rather than a HOST_WIDE_INT.
29719         (aarch64_get_separate_components, aarch64_process_components)
29720         (aarch64_expand_prologue, aarch64_expand_epilogue)
29721         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29722         (aarch64_anchor_offset): New function, split out from...
29723         (aarch64_legitimize_address): ...here.
29724         (aarch64_builtin_vectorization_cost): Handle polynomial
29725         TYPE_VECTOR_SUBPARTS.
29726         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29727         GET_MODE_NUNITS.
29728         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29729         number of elements from the PARALLEL rather than the mode.
29730         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29731         rather than GET_MODE_BITSIZE.
29732         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29733         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29734         (aarch64_expand_vec_perm_const_1): Handle polynomial
29735         d->perm.length () and d->perm elements.
29736         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
29737         Apply to_constant to d->perm elements.
29738         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29739         polynomial CONST_VECTOR_NUNITS.
29740         (aarch64_move_pointer): Take amount as a poly_int64 rather
29741         than an int.
29742         (aarch64_progress_pointer): Avoid temporary variable.
29743         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29744         the mode attribute instead of GET_MODE.
29746 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29747             Alan Hayward  <alan.hayward@arm.com>
29748             David Sherwood  <david.sherwood@arm.com>
29750         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29751         x exists before using it.
29752         (aarch64_add_constant_internal): Rename to...
29753         (aarch64_add_offset_1): ...this.  Replace regnum with separate
29754         src and dest rtxes.  Handle the case in which they're different,
29755         including when the offset is zero.  Replace scratchreg with an rtx.
29756         Use 2 additions if there is no spare register into which we can
29757         move a 16-bit constant.
29758         (aarch64_add_constant): Delete.
29759         (aarch64_add_offset): Replace reg with separate src and dest
29760         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
29761         Use aarch64_add_offset_1.
29762         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
29763         an rtx rather than an int.  Take the delta as a poly_int64
29764         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
29765         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
29766         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
29767         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
29768         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
29769         and aarch64_add_sp.
29770         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
29771         aarch64_add_constant.
29773 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29775         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
29776         Use scalar_float_mode.
29778 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29780         * config/aarch64/aarch64-simd.md
29781         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
29782         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
29783         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
29784         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
29785         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
29786         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
29787         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
29788         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
29789         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
29790         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
29792 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
29794         PR target/83514
29795         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
29796         targ_options->x_arm_arch_string is non NULL.
29798 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
29800         * config/aarch64/aarch64.h
29801         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
29803 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
29805         PR target/82096
29806         * expmed.c (emit_store_flag_force): Swap if const op0
29807         and change VOIDmode to mode of op0.
29809 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29811         PR rtl-optimization/83761
29812         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
29813         than bytes to mode_for_size.
29815 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29817         PR middle-end/83189
29818         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
29819         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
29820         profile.
29822 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29824         PR middle-end/83575
29825         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
29826         when in layout mode.
29827         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
29828         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
29829         partition fixup.
29831 2018-01-10  Michael Collison  <michael.collison@arm.com>
29833         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
29834         * config/aarch64/aarch64-option-extension.def: Add
29835         AARCH64_OPT_EXTENSION of 'fp16fml'.
29836         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29837         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
29838         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
29839         * config/aarch64/constraints.md (Ui7): New constraint.
29840         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
29841         (VFMLA_SEL_W): Ditto.
29842         (f16quad): Ditto.
29843         (f16mac1): Ditto.
29844         (VFMLA16_LOW): New int iterator.
29845         (VFMLA16_HIGH): Ditto.
29846         (UNSPEC_FMLAL): New unspec.
29847         (UNSPEC_FMLSL): Ditto.
29848         (UNSPEC_FMLAL2): Ditto.
29849         (UNSPEC_FMLSL2): Ditto.
29850         (f16mac): New code attribute.
29851         * config/aarch64/aarch64-simd-builtins.def
29852         (aarch64_fmlal_lowv2sf): Ditto.
29853         (aarch64_fmlsl_lowv2sf): Ditto.
29854         (aarch64_fmlalq_lowv4sf): Ditto.
29855         (aarch64_fmlslq_lowv4sf): Ditto.
29856         (aarch64_fmlal_highv2sf): Ditto.
29857         (aarch64_fmlsl_highv2sf): Ditto.
29858         (aarch64_fmlalq_highv4sf): Ditto.
29859         (aarch64_fmlslq_highv4sf): Ditto.
29860         (aarch64_fmlal_lane_lowv2sf): Ditto.
29861         (aarch64_fmlsl_lane_lowv2sf): Ditto.
29862         (aarch64_fmlal_laneq_lowv2sf): Ditto.
29863         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
29864         (aarch64_fmlalq_lane_lowv4sf): Ditto.
29865         (aarch64_fmlsl_lane_lowv4sf): Ditto.
29866         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
29867         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
29868         (aarch64_fmlal_lane_highv2sf): Ditto.
29869         (aarch64_fmlsl_lane_highv2sf): Ditto.
29870         (aarch64_fmlal_laneq_highv2sf): Ditto.
29871         (aarch64_fmlsl_laneq_highv2sf): Ditto.
29872         (aarch64_fmlalq_lane_highv4sf): Ditto.
29873         (aarch64_fmlsl_lane_highv4sf): Ditto.
29874         (aarch64_fmlalq_laneq_highv4sf): Ditto.
29875         (aarch64_fmlsl_laneq_highv4sf): Ditto.
29876         * config/aarch64/aarch64-simd.md:
29877         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
29878         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29879         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
29880         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29881         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
29882         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
29883         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
29884         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
29885         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
29886         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
29887         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
29888         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
29889         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
29890         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
29891         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
29892         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
29893         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
29894         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
29895         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
29896         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
29897         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
29898         (vfmlsl_low_u32): Ditto.
29899         (vfmlalq_low_u32): Ditto.
29900         (vfmlslq_low_u32): Ditto.
29901         (vfmlal_high_u32): Ditto.
29902         (vfmlsl_high_u32): Ditto.
29903         (vfmlalq_high_u32): Ditto.
29904         (vfmlslq_high_u32): Ditto.
29905         (vfmlal_lane_low_u32): Ditto.
29906         (vfmlsl_lane_low_u32): Ditto.
29907         (vfmlal_laneq_low_u32): Ditto.
29908         (vfmlsl_laneq_low_u32): Ditto.
29909         (vfmlalq_lane_low_u32): Ditto.
29910         (vfmlslq_lane_low_u32): Ditto.
29911         (vfmlalq_laneq_low_u32): Ditto.
29912         (vfmlslq_laneq_low_u32): Ditto.
29913         (vfmlal_lane_high_u32): Ditto.
29914         (vfmlsl_lane_high_u32): Ditto.
29915         (vfmlal_laneq_high_u32): Ditto.
29916         (vfmlsl_laneq_high_u32): Ditto.
29917         (vfmlalq_lane_high_u32): Ditto.
29918         (vfmlslq_lane_high_u32): Ditto.
29919         (vfmlalq_laneq_high_u32): Ditto.
29920         (vfmlslq_laneq_high_u32): Ditto.
29921         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
29922         (AARCH64_FL_FOR_ARCH8_4): New.
29923         (AARCH64_ISA_F16FML): New ISA flag.
29924         (TARGET_F16FML): New feature flag for fp16fml.
29925         (doc/invoke.texi): Document new fp16fml option.
29927 2018-01-10  Michael Collison  <michael.collison@arm.com>
29929         * config/aarch64/aarch64-builtins.c:
29930         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
29931         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29932         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
29933         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
29934         (AARCH64_ISA_SHA3): New ISA flag.
29935         (TARGET_SHA3): New feature flag for sha3.
29936         * config/aarch64/iterators.md (sha512_op): New int attribute.
29937         (CRYPTO_SHA512): New int iterator.
29938         (UNSPEC_SHA512H): New unspec.
29939         (UNSPEC_SHA512H2): Ditto.
29940         (UNSPEC_SHA512SU0): Ditto.
29941         (UNSPEC_SHA512SU1): Ditto.
29942         * config/aarch64/aarch64-simd-builtins.def
29943         (aarch64_crypto_sha512hqv2di): New builtin.
29944         (aarch64_crypto_sha512h2qv2di): Ditto.
29945         (aarch64_crypto_sha512su0qv2di): Ditto.
29946         (aarch64_crypto_sha512su1qv2di): Ditto.
29947         (aarch64_eor3qv8hi): Ditto.
29948         (aarch64_rax1qv2di): Ditto.
29949         (aarch64_xarqv2di): Ditto.
29950         (aarch64_bcaxqv8hi): Ditto.
29951         * config/aarch64/aarch64-simd.md:
29952         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
29953         (aarch64_crypto_sha512su0qv2di): Ditto.
29954         (aarch64_crypto_sha512su1qv2di): Ditto.
29955         (aarch64_eor3qv8hi): Ditto.
29956         (aarch64_rax1qv2di): Ditto.
29957         (aarch64_xarqv2di): Ditto.
29958         (aarch64_bcaxqv8hi): Ditto.
29959         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
29960         (vsha512h2q_u64): Ditto.
29961         (vsha512su0q_u64): Ditto.
29962         (vsha512su1q_u64): Ditto.
29963         (veor3q_u16): Ditto.
29964         (vrax1q_u64): Ditto.
29965         (vxarq_u64): Ditto.
29966         (vbcaxq_u16): Ditto.
29967         * config/arm/types.md (crypto_sha512): New type attribute.
29968         (crypto_sha3): Ditto.
29969         (doc/invoke.texi): Document new sha3 option.
29971 2018-01-10  Michael Collison  <michael.collison@arm.com>
29973         * config/aarch64/aarch64-builtins.c:
29974         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
29975         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29976         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
29977         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
29978         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
29979         (AARCH64_ISA_SM4): New ISA flag.
29980         (TARGET_SM4): New feature flag for sm4.
29981         * config/aarch64/aarch64-simd-builtins.def
29982         (aarch64_sm3ss1qv4si): Ditto.
29983         (aarch64_sm3tt1aq4si): Ditto.
29984         (aarch64_sm3tt1bq4si): Ditto.
29985         (aarch64_sm3tt2aq4si): Ditto.
29986         (aarch64_sm3tt2bq4si): Ditto.
29987         (aarch64_sm3partw1qv4si): Ditto.
29988         (aarch64_sm3partw2qv4si): Ditto.
29989         (aarch64_sm4eqv4si): Ditto.
29990         (aarch64_sm4ekeyqv4si): Ditto.
29991         * config/aarch64/aarch64-simd.md:
29992         (aarch64_sm3ss1qv4si): Ditto.
29993         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
29994         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
29995         (aarch64_sm4eqv4si): Ditto.
29996         (aarch64_sm4ekeyqv4si): Ditto.
29997         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
29998         (sm3part_op): Ditto.
29999         (CRYPTO_SM3TT): Ditto.
30000         (CRYPTO_SM3PART): Ditto.
30001         (UNSPEC_SM3SS1): New unspec.
30002         (UNSPEC_SM3TT1A): Ditto.
30003         (UNSPEC_SM3TT1B): Ditto.
30004         (UNSPEC_SM3TT2A): Ditto.
30005         (UNSPEC_SM3TT2B): Ditto.
30006         (UNSPEC_SM3PARTW1): Ditto.
30007         (UNSPEC_SM3PARTW2): Ditto.
30008         (UNSPEC_SM4E): Ditto.
30009         (UNSPEC_SM4EKEY): Ditto.
30010         * config/aarch64/constraints.md (Ui2): New constraint.
30011         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
30012         * config/arm/types.md (crypto_sm3): New type attribute.
30013         (crypto_sm4): Ditto.
30014         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
30015         (vsm3tt1aq_u32): Ditto.
30016         (vsm3tt1bq_u32): Ditto.
30017         (vsm3tt2aq_u32): Ditto.
30018         (vsm3tt2bq_u32): Ditto.
30019         (vsm3partw1q_u32): Ditto.
30020         (vsm3partw2q_u32): Ditto.
30021         (vsm4eq_u32): Ditto.
30022         (vsm4ekeyq_u32): Ditto.
30023         (doc/invoke.texi): Document new sm4 option.
30025 2018-01-10  Michael Collison  <michael.collison@arm.com>
30027         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
30028         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
30029         (AARCH64_FL_FOR_ARCH8_4): New.
30030         (AARCH64_FL_V8_4): New flag.
30031         (doc/invoke.texi): Document new armv8.4-a option.
30033 2018-01-10  Michael Collison  <michael.collison@arm.com>
30035         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30036         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
30037         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
30038         * config/aarch64/aarch64-option-extension.def: Add
30039         AARCH64_OPT_EXTENSION of 'sha2'.
30040         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
30041         (crypto): Disable sha2 and aes if crypto disabled.
30042         (crypto): Enable aes and sha2 if enabled.
30043         (simd): Disable sha2 and aes if simd disabled.
30044         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
30045         New flags.
30046         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
30047         (TARGET_SHA2): New feature flag for sha2.
30048         (TARGET_AES): New feature flag for aes.
30049         * config/aarch64/aarch64-simd.md:
30050         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
30051         conditional on TARGET_AES.
30052         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
30053         (aarch64_crypto_sha1hsi): Make pattern conditional
30054         on TARGET_SHA2.
30055         (aarch64_crypto_sha1hv4si): Ditto.
30056         (aarch64_be_crypto_sha1hv4si): Ditto.
30057         (aarch64_crypto_sha1su1v4si): Ditto.
30058         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
30059         (aarch64_crypto_sha1su0v4si): Ditto.
30060         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
30061         (aarch64_crypto_sha256su0v4si): Ditto.
30062         (aarch64_crypto_sha256su1v4si): Ditto.
30063         (doc/invoke.texi): Document new aes and sha2 options.
30065 2018-01-10  Martin Sebor  <msebor@redhat.com>
30067         PR tree-optimization/83781
30068         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
30069         as string arrays.
30071 2018-01-11  Martin Sebor  <msebor@gmail.com>
30072             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
30074         PR tree-optimization/83501
30075         PR tree-optimization/81703
30077         * tree-ssa-strlen.c (get_string_cst): Rename...
30078         (get_string_len): ...to this.  Handle global constants.
30079         (handle_char_store): Adjust.
30081 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
30082             Jim Wilson  <jimw@sifive.com>
30084         * config/riscv/riscv-protos.h (riscv_output_return): New.
30085         * config/riscv/riscv.c (struct machine_function): New naked_p field.
30086         (riscv_attribute_table, riscv_output_return),
30087         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
30088         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
30089         (riscv_compute_frame_info): Only compute frame->mask if not a naked
30090         function.
30091         (riscv_expand_prologue): Add early return for naked function.
30092         (riscv_expand_epilogue): Likewise.
30093         (riscv_function_ok_for_sibcall): Return false for naked function.
30094         (riscv_set_current_function): New.
30095         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
30096         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
30097         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
30098         * doc/extend.texi (RISC-V Function Attributes): New.
30100 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
30102         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
30103         check for 128-bit long double before checking TCmode.
30104         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
30105         128-bit long doubles before checking TFmode or TCmode.
30106         (FLOAT128_IBM_P): Likewise.
30108 2018-01-10  Martin Sebor  <msebor@redhat.com>
30110         PR tree-optimization/83671
30111         * builtins.c (c_strlen): Unconditionally return zero for the empty
30112         string.
30113         Use -Warray-bounds for warnings.
30114         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
30115         for non-constant array indices with COMPONENT_REF, arrays of
30116         arrays, and pointers to arrays.
30117         (gimple_fold_builtin_strlen): Determine and set length range for
30118         non-constant character arrays.
30120 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
30122         PR middle-end/81897
30123         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
30124         empty blocks.
30126 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
30128         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
30130 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
30132         PR target/83399
30133         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
30134         VECTOR_MEM_ALTIVEC_OR_VSX_P.
30135         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
30136         indexed_or_indirect_operand predicate.
30137         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
30138         (*vsx_le_perm_load_v8hi): Likewise.
30139         (*vsx_le_perm_load_v16qi): Likewise.
30140         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
30141         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
30142         (*vsx_le_perm_store_v8hi): Likewise.
30143         (*vsx_le_perm_store_v16qi): Likewise.
30144         (eight unnamed splitters): Likewise.
30146 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
30148         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
30149         * config/rs6000/emmintrin.h: Likewise.
30150         * config/rs6000/mmintrin.h: Likewise.
30151         * config/rs6000/xmmintrin.h: Likewise.
30153 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
30155         PR c++/43486
30156         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
30157         "public_flag".
30158         * tree.c (tree_nop_conversion): Return true for location wrapper
30159         nodes.
30160         (maybe_wrap_with_location): New function.
30161         (selftest::check_strip_nops): New function.
30162         (selftest::test_location_wrappers): New function.
30163         (selftest::tree_c_tests): Call it.
30164         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
30165         (maybe_wrap_with_location): New decl.
30166         (EXPR_LOCATION_WRAPPER_P): New macro.
30167         (location_wrapper_p): New inline function.
30168         (tree_strip_any_location_wrapper): New inline function.
30170 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
30172         PR target/83735
30173         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
30174         stack_realign_offset for the largest alignment of stack slot
30175         actually used.
30176         (ix86_find_max_used_stack_alignment): New function.
30177         (ix86_finalize_stack_frame_flags): Use it.  Set
30178         max_used_stack_alignment if we don't realign stack.
30179         * config/i386/i386.h (machine_function): Add
30180         max_used_stack_alignment.
30182 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
30184         * config/arm/arm.opt (-mbranch-cost): New option.
30185         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
30186         account.
30188 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
30190         PR target/83629
30191         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
30192         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
30194 2018-01-10  Richard Biener  <rguenther@suse.de>
30196         PR debug/83765
30197         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
30198         early out so it also covers the case where we have a non-NULL
30199         origin.
30201 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
30203         PR tree-optimization/83753
30204         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
30205         for non-strided grouped accesses if the number of elements is 1.
30207 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
30209         PR target/81616
30210         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
30211         * i386.h (TARGET_USE_GATHER): Define.
30212         * x86-tune.def (X86_TUNE_USE_GATHER): New.
30214 2018-01-10  Martin Liska  <mliska@suse.cz>
30216         PR bootstrap/82831
30217         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
30218         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
30219         partitioning.
30220         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30221         CLEANUP_NO_PARTITIONING is not set.
30223 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
30225         * doc/rtl.texi: Remove documentation of (const ...) wrappers
30226         for vectors, as a partial revert of r254296.
30227         * rtl.h (const_vec_p): Delete.
30228         (const_vec_duplicate_p): Don't test for vector CONSTs.
30229         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30230         * expmed.c (make_tree): Likewise.
30232         Revert:
30233         * common.md (E, F): Use CONSTANT_P instead of checking for
30234         CONST_VECTOR.
30235         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30236         checking for CONST_VECTOR.
30238 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
30240         PR middle-end/83575
30241         * predict.c (force_edge_cold): Handle in more sane way edges
30242         with no prediction.
30244 2018-01-09  Carl Love  <cel@us.ibm.com>
30246         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30247         V4SI, V4SF types.
30248         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30249         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30250         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30251         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
30252         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30253         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
30254         * config/rs6000/rs6000-protos.h: Add extern defition for
30255         rs6000_generate_float2_double_code.
30256         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30257         function.
30258         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30259         (float2_v2df): Add define_expand.
30261 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
30263         PR target/83628
30264         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30265         op_mode in the force_to_mode call.
30267 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
30269         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30270         instead of checking each element individually.
30271         (aarch64_evpc_uzp): Likewise.
30272         (aarch64_evpc_zip): Likewise.
30273         (aarch64_evpc_ext): Likewise.
30274         (aarch64_evpc_rev): Likewise.
30275         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30276         instead of checking each element individually.  Return true without
30277         generating rtl if
30278         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30279         whether all selected elements come from the same input, instead of
30280         checking each element individually.  Remove calls to gen_rtx_REG,
30281         start_sequence and end_sequence and instead assert that no rtl is
30282         generated.
30284 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
30286         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30287         order of HIGH and CONST checks.
30289 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
30291         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30292         if the destination isn't an SSA_NAME.
30294 2018-01-09  Richard Biener  <rguenther@suse.de>
30296         PR tree-optimization/83668
30297         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30298         move prologue...
30299         (canonicalize_loop_form): ... here, renamed from ...
30300         (canonicalize_loop_closed_ssa_form): ... this and amended to
30301         swap successor edges for loop exit blocks to make us use
30302         the RPO order we need for initial schedule generation.
30304 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
30306         PR tree-optimization/64811
30307         * match.pd: When optimizing comparisons with Inf, avoid
30308         introducing or losing exceptions from comparisons with NaN.
30310 2018-01-09  Martin Liska  <mliska@suse.cz>
30312         PR sanitizer/82517
30313         * asan.c (shadow_mem_size): Add gcc_assert.
30315 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
30317         Don't save registers in main().
30319         PR target/83738
30320         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30321         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30322         * config/avr/avr.c (avr_set_current_function): Don't error if
30323         naked, OS_task or OS_main are specified at the same time.
30324         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30325         OS_main.
30326         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30327         attribute.
30328         * common/config/avr/avr-common.c (avr_option_optimization_table):
30329         Switch on -mmain-is-OS_task for optimizing compilations.
30331 2018-01-09  Richard Biener  <rguenther@suse.de>
30333         PR tree-optimization/83572
30334         * graphite.c: Include cfganal.h.
30335         (graphite_transform_loops): Connect infinite loops to exit
30336         and remove fake edges at the end.
30338 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
30340         * ipa-inline.c (edge_badness): Revert accidental checkin.
30342 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
30344         PR ipa/80763
30345         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30346         symbols; not inline clones.
30348 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
30350         PR target/83507
30351         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30352         hard registers.  Formatting fixes.
30354         PR preprocessor/83722
30355         * gcc.c (try_generate_repro): Pass
30356         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30357         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30358         do_report_bug.
30360 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
30361             Kito Cheng  <kito.cheng@gmail.com>
30363         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30364         (riscv_leaf_function_p): Delete.
30365         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30367 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30369         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30370         function.
30371         (do_ifelse): New function.
30372         (do_isel): New function.
30373         (do_sub3): New function.
30374         (do_add3): New function.
30375         (do_load_mask_compare): New function.
30376         (do_overlap_load_compare): New function.
30377         (expand_compare_loop): New function.
30378         (expand_block_compare): Call expand_compare_loop() when appropriate.
30379         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30380         option description.
30381         (-mblock-compare-inline-loop-limit): New option.
30383 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30385         PR target/83677
30386         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30387         Reverse order of second and third operands in first alternative.
30388         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30389         of first and second elements in UNSPEC_VPERMR vector.
30390         (altivec_expand_vec_perm_le): Likewise.
30392 2018-01-08  Jeff Law  <law@redhat.com>
30394         PR rtl-optimizatin/81308
30395         * tree-switch-conversion.c (cfg_altered): New file scoped static.
30396         (process_switch): If group_case_labels makes a change, then set
30397         cfg_altered.
30398         (pass_convert_switch::execute): If a switch is converted, then
30399         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
30401         PR rtl-optimization/81308
30402         * recog.c (split_all_insns): Conditionally cleanup the CFG after
30403         splitting insns.
30405 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
30407         PR target/83663 - Revert r255946
30408         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30409         generation for cases where splatting a value is not useful.
30410         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30411         across a vec_duplicate and a paradoxical subreg forming a vector
30412         mode to a vec_concat.
30414 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30416         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30417         -march=armv8.3-a variants.
30418         * config/arm/t-multilib: Likewise.
30419         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
30421 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30423         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30424         to generate rtl.
30425         (cceq_ior_compare_complement): Give it a name so I can use it, and
30426         change boolean_or_operator predicate to boolean_operator so it can
30427         be used to generate a crand.
30428         (eqne): New code iterator.
30429         (bd/bd_neg): New code_attrs.
30430         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30431         a single define_insn.
30432         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30433         decrement (bdnzt/bdnzf/bdzt/bdzf).
30434         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30435         with the new names of the branch decrement patterns, and added the
30436         names of the branch decrement conditional patterns.
30438 2018-01-08  Richard Biener  <rguenther@suse.de>
30440         PR tree-optimization/83563
30441         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30442         cache.
30444 2018-01-08  Richard Biener  <rguenther@suse.de>
30446         PR middle-end/83713
30447         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30449 2018-01-08  Richard Biener  <rguenther@suse.de>
30451         PR tree-optimization/83685
30452         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30453         references to abnormals.
30455 2018-01-08  Richard Biener  <rguenther@suse.de>
30457         PR lto/83719
30458         * dwarf2out.c (output_indirect_strings): Handle empty
30459         skeleton_debug_str_hash.
30460         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30462 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
30464         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30465         (emit_store_direct): Likewise.
30466         (arc_trampoline_adjust_address): Likewise.
30467         (arc_asm_trampoline_template): New function.
30468         (arc_initialize_trampoline): Use asm_trampoline_template.
30469         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30470         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30471         * config/arc/arc.md (flush_icache): Delete pattern.
30473 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
30475         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30476         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30477         munaligned-access.
30479 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30481         PR target/83681
30482         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30483         by not USED_FOR_TARGET.
30484         (make_pass_resolve_sw_modes): Likewise.
30486 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30488         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30489         USED_FOR_TARGET.
30491 2018-01-08  Richard Biener  <rguenther@suse.de>
30493         PR middle-end/83580
30494         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30496 2018-01-08  Richard Biener  <rguenther@suse.de>
30498         PR middle-end/83517
30499         * match.pd ((t * 2) / 2) -> t): Add missing :c.
30501 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
30503         PR middle-end/81897
30504         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30505         basic blocks with a small number of successors.
30506         (convert_control_dep_chain_into_preds): Improve handling of
30507         forwarder blocks.
30508         (dump_predicates): Split apart into...
30509         (dump_pred_chain): ...here...
30510         (dump_pred_info): ...and here.
30511         (can_one_predicate_be_invalidated_p): Add debugging printfs.
30512         (can_chain_union_be_invalidated_p): Improve check for invalidation
30513         of paths.
30514         (uninit_uses_cannot_happen): Avoid unnecessary if
30515         convert_control_dep_chain_into_preds yielded nothing.
30517 2018-01-06  Martin Sebor  <msebor@redhat.com>
30519         PR tree-optimization/83640
30520         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30521         subtracting negative offset from size.
30522         (builtin_access::overlap): Adjust offset bounds of the access to fall
30523         within the size of the object if possible.
30525 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
30527         PR rtl-optimization/83699
30528         * expmed.c (extract_bit_field_1): Restrict the vector usage of
30529         extract_bit_field_as_subreg to cases in which the extracted
30530         value is also a vector.
30532         * lra-constraints.c (process_alt_operands): Test for the equivalence
30533         substitutions when detecting a possible reload cycle.
30535 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
30537         PR debug/83480
30538         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30539         by default if flag_selective_schedling{,2}.  Formatting fixes.
30541         PR rtl-optimization/83682
30542         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30543         if it has non-VECTOR_MODE element mode.
30544         (vec_duplicate_p): Likewise.
30546         PR middle-end/83694
30547         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30548         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30550 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
30552         PR target/83604
30553         * config/i386/i386-builtin.def
30554         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30555         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30556         Require also OPTION_MASK_ISA_AVX512F in addition to
30557         OPTION_MASK_ISA_GFNI.
30558         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30559         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30560         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30561         to OPTION_MASK_ISA_GFNI.
30562         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30563         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30564         OPTION_MASK_ISA_AVX512BW.
30565         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30566         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30567         addition to OPTION_MASK_ISA_GFNI.
30568         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30569         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30570         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30571         to OPTION_MASK_ISA_GFNI.
30572         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30573         a requirement for all ISAs rather than any of them with a few
30574         exceptions.
30575         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30576         processing.
30577         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30578         bitmasks to be enabled with 3 exceptions, instead of requiring any
30579         enabled ISA with lots of exceptions.
30580         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30581         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30582         Change avx512bw in isa attribute to avx512f.
30583         * config/i386/sgxintrin.h: Add license boilerplate.
30584         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
30585         to __AVX512F__ and __AVX512VL to __AVX512VL__.
30586         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30587         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30588         defined.
30589         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30590         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30591         temporarily sse2 rather than sse if not enabled already.
30593         PR target/83604
30594         * config/i386/sse.md (VI248_VLBW): Rename to ...
30595         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
30596         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30597         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30598         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30599         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30600         mode iterator instead of VI248_VLBW.
30602 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
30604         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30605         (record_modified): Skip clobbers; add debug output.
30606         (param_change_prob): Use sreal frequencies.
30608 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
30610         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30611         punt for user-aligned variables.
30613 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
30615         * tree-chrec.c (chrec_contains_symbols): Return true for
30616         POLY_INT_CST.
30618 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
30620         PR target/82439
30621         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30622         of (x|y) == x for BICS pattern.
30624 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
30626         PR tree-optimization/83605
30627         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30628         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30629         can throw.
30631 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30633         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30634         * config/epiphany/rtems.h: New file.
30636 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30637             Uros Bizjak  <ubizjak@gmail.com>
30639         PR target/83554
30640         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30641         QIreg_operand instead of register_operand predicate.
30642         * config/i386/i386.c (ix86_rop_should_change_byte_p,
30643         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30644         comments instead of -fmitigate[-_]rop.
30646 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
30648         PR bootstrap/81926
30649         * cgraphunit.c (symbol_table::compile): Switch to text_section
30650         before calling assembly_start debug hook.
30651         * run-rtl-passes.c (run_rtl_passes): Likewise.
30652         Include output.h.
30654 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30656         * tree-vrp.c (extract_range_from_binary_expr_1): Check
30657         range_int_cst_p rather than !symbolic_range_p before calling
30658         extract_range_from_multiplicative_op_1.
30660 2018-01-04  Jeff Law  <law@redhat.com>
30662         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30663         redundant test in assertion.
30665 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30667         * doc/rtl.texi: Document machine_mode wrapper classes.
30669 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30671         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30672         using tree_to_uhwi.
30674 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30676         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30677         the VEC_PERM_EXPR fold to fail.
30679 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30681         PR debug/83585
30682         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30683         to switched_sections.
30685 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30687         PR target/83680
30688         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30689         test for d.testing.
30691 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
30693         PR target/83387
30694         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30695         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30697 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30699         PR debug/83666
30700         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30701         is BLKmode and bitpos not zero or mode change is needed.
30703 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30705         PR target/83675
30706         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30707         TARGET_VIS2.
30709 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
30711         PR target/83628
30712         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30713         instead of MULT rtx.  Update all corresponding splitters.
30714         (*saddl_se): Ditto.
30715         (*ssub<modesuffix>): Ditto.
30716         (*ssubl_se): Ditto.
30717         (*cmp_sadd_di): Update split patterns.
30718         (*cmp_sadd_si): Ditto.
30719         (*cmp_sadd_sidi): Ditto.
30720         (*cmp_ssub_di): Ditto.
30721         (*cmp_ssub_si): Ditto.
30722         (*cmp_ssub_sidi): Ditto.
30723         * config/alpha/predicates.md (const23_operand): New predicate.
30724         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30725         Look for ASHIFT, not MULT inner operand.
30726         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30728 2018-01-04  Martin Liska  <mliska@suse.cz>
30730         PR gcov-profile/83669
30731         * gcov.c (output_intermediate_file): Add version to intermediate
30732         gcov file.
30733         * doc/gcov.texi: Document new field 'version' in intermediate
30734         file format. Fix location of '-k' option of gcov command.
30736 2018-01-04  Martin Liska  <mliska@suse.cz>
30738         PR ipa/82352
30739         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30741 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30743         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30745 2018-01-03  Martin Sebor  <msebor@redhat.com>
30747         PR tree-optimization/83655
30748         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30749         checking calls with invalid arguments.
30751 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30753         * tree-vect-stmts.c (vect_get_store_rhs): New function.
30754         (vectorizable_mask_load_store): Delete.
30755         (vectorizable_call): Return false for masked loads and stores.
30756         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
30757         instead of gimple_assign_rhs1.
30758         (vectorizable_load): Handle IFN_MASK_LOAD.
30759         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
30761 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30763         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
30764         split out from..,
30765         (vectorizable_mask_load_store): ...here.
30766         (vectorizable_load): ...and here.
30768 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30770         * tree-vect-stmts.c (vect_build_all_ones_mask)
30771         (vect_build_zero_merge_argument): New functions, split out from...
30772         (vectorizable_load): ...here.
30774 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30776         * tree-vect-stmts.c (vect_check_store_rhs): New function,
30777         split out from...
30778         (vectorizable_mask_load_store): ...here.
30779         (vectorizable_store): ...and here.
30781 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30783         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
30784         split out from...
30785         (vectorizable_mask_load_store): ...here.
30787 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30789         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
30790         (vect_model_store_cost): Take a vec_load_store_type instead of a
30791         vect_def_type.
30792         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
30793         (vect_model_store_cost): Take a vec_load_store_type instead of a
30794         vect_def_type.
30795         (vectorizable_mask_load_store): Update accordingly.
30796         (vectorizable_store): Likewise.
30797         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
30799 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30801         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
30802         IFN_MASK_LOAD calls here rather than...
30803         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
30805 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30806             Alan Hayward  <alan.hayward@arm.com>
30807             David Sherwood  <david.sherwood@arm.com>
30809         * expmed.c (extract_bit_field_1): For vector extracts,
30810         fall back to extract_bit_field_as_subreg if vec_extract
30811         isn't available.
30813 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30814             Alan Hayward  <alan.hayward@arm.com>
30815             David Sherwood  <david.sherwood@arm.com>
30817         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
30818         they are variable or constant sized.
30819         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
30820         slots for constant-sized data.
30822 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30823             Alan Hayward  <alan.hayward@arm.com>
30824             David Sherwood  <david.sherwood@arm.com>
30826         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
30827         handling COND_EXPRs with boolean comparisons, try to find a better
30828         basis for the mask type than the boolean itself.
30830 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30832         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
30833         is calculated and how it can be overridden.
30834         * genmodes.c (max_bitsize_mode_any_mode): New variable.
30835         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
30836         if defined.
30837         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
30838         if nonzero.
30840 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30841             Alan Hayward  <alan.hayward@arm.com>
30842             David Sherwood  <david.sherwood@arm.com>
30844         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
30845         Remove the mode argument.
30846         (aarch64_simd_valid_immediate): Remove the mode and inverse
30847         arguments.
30848         * config/aarch64/iterators.md (bitsize): New iterator.
30849         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
30850         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
30851         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
30852         aarch64_simd_valid_immediate.
30853         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
30854         (aarch64_reg_or_bic_imm): Likewise.
30855         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
30856         with an insn_type enum and msl with a modifier_type enum.
30857         Replace element_width with a scalar_mode.  Change the shift
30858         to unsigned int.  Add constructors for scalar_float_mode and
30859         scalar_int_mode elements.
30860         (aarch64_vect_float_const_representable_p): Delete.
30861         (aarch64_can_const_movi_rtx_p)
30862         (aarch64_simd_scalar_immediate_valid_for_move)
30863         (aarch64_simd_make_constant): Update call to
30864         aarch64_simd_valid_immediate.
30865         (aarch64_advsimd_valid_immediate_hs): New function.
30866         (aarch64_advsimd_valid_immediate): Likewise.
30867         (aarch64_simd_valid_immediate): Remove mode and inverse
30868         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
30869         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
30870         and aarch64_float_const_representable_p on the result.
30871         (aarch64_output_simd_mov_immediate): Remove mode argument.
30872         Update call to aarch64_simd_valid_immediate and use of
30873         simd_immediate_info.
30874         (aarch64_output_scalar_simd_mov_immediate): Update call
30875         accordingly.
30877 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30878             Alan Hayward  <alan.hayward@arm.com>
30879             David Sherwood  <david.sherwood@arm.com>
30881         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
30882         (mode_nunits): Likewise CONST_MODE_NUNITS.
30883         * machmode.def (ADJUST_NUNITS): Document.
30884         * genmodes.c (mode_data::need_nunits_adj): New field.
30885         (blank_mode): Update accordingly.
30886         (adj_nunits): New variable.
30887         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
30888         parameter.
30889         (emit_mode_size_inline): Set need_bytesize_adj for all modes
30890         listed in adj_nunits.
30891         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
30892         listed in adj_nunits.  Don't emit case statements for such modes.
30893         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
30894         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
30895         nothing if adj_nunits is nonnull.
30896         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
30897         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
30898         (emit_mode_fbit): Update use of print_maybe_const_decl.
30899         (emit_move_size): Likewise.  Treat the array as non-const
30900         if adj_nunits.
30901         (emit_mode_adjustments): Handle adj_nunits.
30903 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30905         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
30906         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
30907         (VECTOR_MODES): Use it.
30908         (make_vector_modes): Take the prefix as an argument.
30910 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30911             Alan Hayward  <alan.hayward@arm.com>
30912             David Sherwood  <david.sherwood@arm.com>
30914         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
30915         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
30916         for MODE_VECTOR_BOOL.
30917         * machmode.def (VECTOR_BOOL_MODE): Document.
30918         * genmodes.c (VECTOR_BOOL_MODE): New macro.
30919         (make_vector_bool_mode): New function.
30920         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
30921         MODE_VECTOR_BOOL.
30922         * lto-streamer-in.c (lto_input_mode_table): Likewise.
30923         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
30924         Likewise.
30925         * stor-layout.c (int_mode_for_mode): Likewise.
30926         * tree.c (build_vector_type_for_mode): Likewise.
30927         * varasm.c (output_constant_pool_2): Likewise.
30928         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
30929         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
30930         for MODE_VECTOR_BOOL.
30931         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
30932         of mode class checks.
30933         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
30934         instead of a list of mode class checks.
30935         (expand_vector_scalar_condition): Likewise.
30936         (type_for_widest_vector_mode): Handle BImode as an inner mode.
30938 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30939             Alan Hayward  <alan.hayward@arm.com>
30940             David Sherwood  <david.sherwood@arm.com>
30942         * machmode.h (mode_size): Change from unsigned short to
30943         poly_uint16_pod.
30944         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
30945         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30946         or if measurement_type is not polynomial.
30947         (fixed_size_mode::includes_p): Check for constant-sized modes.
30948         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
30949         return a poly_uint16 rather than an unsigned short.
30950         (emit_mode_size): Change the type of mode_size from unsigned short
30951         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
30952         (emit_mode_adjustments): Cope with polynomial vector sizes.
30953         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30954         for GET_MODE_SIZE.
30955         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30956         for GET_MODE_SIZE.
30957         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
30958         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
30959         * caller-save.c (setup_save_areas): Likewise.
30960         (replace_reg_with_saved_mem): Likewise.
30961         * calls.c (emit_library_call_value_1): Likewise.
30962         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
30963         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
30964         (gen_lowpart_for_combine): Likewise.
30965         * convert.c (convert_to_integer_1): Likewise.
30966         * cse.c (equiv_constant, cse_insn): Likewise.
30967         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
30968         (cselib_subst_to_values): Likewise.
30969         * dce.c (word_dce_process_block): Likewise.
30970         * df-problems.c (df_word_lr_mark_ref): Likewise.
30971         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
30972         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
30973         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
30974         (rtl_for_decl_location): Likewise.
30975         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
30976         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
30977         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
30978         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
30979         (expand_expr_real_1): Likewise.
30980         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
30981         (pad_below): Likewise.
30982         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30983         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
30984         * ira.c (get_subreg_tracking_sizes): Likewise.
30985         * ira-build.c (ira_create_allocno_objects): Likewise.
30986         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
30987         (ira_sort_regnos_for_alter_reg): Likewise.
30988         * ira-costs.c (record_operand_costs): Likewise.
30989         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
30990         (resolve_simple_move): Likewise.
30991         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
30992         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
30993         (lra_constraints): Likewise.
30994         (CONST_POOL_OK_P): Reject variable-sized modes.
30995         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
30996         (add_pseudo_to_slot, lra_spill): Likewise.
30997         * omp-low.c (omp_clause_aligned_alignment): Likewise.
30998         * optabs-query.c (get_best_extraction_insn): Likewise.
30999         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31000         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
31001         (expand_mult_highpart, valid_multiword_target_p): Likewise.
31002         * recog.c (offsettable_address_addr_space_p): Likewise.
31003         * regcprop.c (maybe_mode_change): Likewise.
31004         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
31005         * regrename.c (build_def_use): Likewise.
31006         * regstat.c (dump_reg_info): Likewise.
31007         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
31008         (find_reloads, find_reloads_subreg_address): Likewise.
31009         * reload1.c (eliminate_regs_1): Likewise.
31010         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
31011         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
31012         (simplify_binary_operation_1, simplify_subreg): Likewise.
31013         * targhooks.c (default_function_arg_padding): Likewise.
31014         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
31015         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
31016         (verify_gimple_assign_ternary): Likewise.
31017         * tree-inline.c (estimate_move_cost): Likewise.
31018         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31019         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
31020         (get_address_cost_ainc): Likewise.
31021         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
31022         (vect_supportable_dr_alignment): Likewise.
31023         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31024         (vectorizable_reduction): Likewise.
31025         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
31026         (vectorizable_operation, vectorizable_load): Likewise.
31027         * tree.c (build_same_sized_truth_vector_type): Likewise.
31028         * valtrack.c (cleanup_auto_inc_dec): Likewise.
31029         * var-tracking.c (emit_note_insn_var_location): Likewise.
31030         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
31031         (ADDR_VEC_ALIGN): Likewise.
31033 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31034             Alan Hayward  <alan.hayward@arm.com>
31035             David Sherwood  <david.sherwood@arm.com>
31037         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
31038         unsigned short.
31039         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31040         or if measurement_type is polynomial.
31041         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
31042         * combine.c (make_extraction): Likewise.
31043         * dse.c (find_shift_sequence): Likewise.
31044         * dwarf2out.c (mem_loc_descriptor): Likewise.
31045         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
31046         (extract_bit_field, extract_low_bits): Likewise.
31047         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
31048         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
31049         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
31050         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
31051         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31052         * reload.c (find_reloads): Likewise.
31053         * reload1.c (alter_reg): Likewise.
31054         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
31055         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
31056         * tree-if-conv.c (predicate_mem_writes): Likewise.
31057         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
31058         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
31059         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
31060         * valtrack.c (dead_debug_insert_temp): Likewise.
31061         * varasm.c (mergeable_constant_section): Likewise.
31062         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
31064 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31065             Alan Hayward  <alan.hayward@arm.com>
31066             David Sherwood  <david.sherwood@arm.com>
31068         * expr.c (expand_assignment): Cope with polynomial mode sizes
31069         when assigning to a CONCAT.
31071 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31072             Alan Hayward  <alan.hayward@arm.com>
31073             David Sherwood  <david.sherwood@arm.com>
31075         * machmode.h (mode_precision): Change from unsigned short to
31076         poly_uint16_pod.
31077         (mode_to_precision): Return a poly_uint16 rather than an unsigned
31078         short.
31079         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
31080         or if measurement_type is not polynomial.
31081         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
31082         in which the mode is already known to be a scalar_int_mode.
31083         * genmodes.c (emit_mode_precision): Change the type of mode_precision
31084         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
31085         initializer.
31086         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31087         for GET_MODE_PRECISION.
31088         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31089         for GET_MODE_PRECISION.
31090         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
31091         as polynomial.
31092         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
31093         (expand_field_assignment, make_extraction): Likewise.
31094         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
31095         (get_last_value): Likewise.
31096         * convert.c (convert_to_integer_1): Likewise.
31097         * cse.c (cse_insn): Likewise.
31098         * expr.c (expand_expr_real_1): Likewise.
31099         * lra-constraints.c (simplify_operand_subreg): Likewise.
31100         * optabs-query.c (can_atomic_load_p): Likewise.
31101         * optabs.c (expand_atomic_load): Likewise.
31102         (expand_atomic_store): Likewise.
31103         * ree.c (combine_reaching_defs): Likewise.
31104         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
31105         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
31106         * tree.h (type_has_mode_precision_p): Likewise.
31107         * ubsan.c (instrument_si_overflow): Likewise.
31109 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31110             Alan Hayward  <alan.hayward@arm.com>
31111             David Sherwood  <david.sherwood@arm.com>
31113         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
31114         polynomial numbers of units.
31115         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
31116         (valid_vector_subparts_p): New function.
31117         (build_vector_type): Remove temporary shim and take the number
31118         of units as a poly_uint64 rather than an int.
31119         (build_opaque_vector_type): Take the number of units as a
31120         poly_uint64 rather than an int.
31121         * tree.c (build_vector_from_ctor): Handle polynomial
31122         TYPE_VECTOR_SUBPARTS.
31123         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
31124         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
31125         (build_vector_from_val): If the number of units is variable,
31126         use build_vec_duplicate_cst for constant operands and
31127         VEC_DUPLICATE_EXPR otherwise.
31128         (make_vector_type): Remove temporary is_constant ().
31129         (build_vector_type, build_opaque_vector_type): Take the number of
31130         units as a poly_uint64 rather than an int.
31131         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
31132         VECTOR_CST_NELTS.
31133         * cfgexpand.c (expand_debug_expr): Likewise.
31134         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
31135         (store_constructor, expand_expr_real_1): Likewise.
31136         (const_scalar_mask_from_tree): Likewise.
31137         * fold-const-call.c (fold_const_reduction): Likewise.
31138         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
31139         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
31140         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
31141         (fold_relational_const): Likewise.
31142         (native_interpret_vector): Likewise.  Change the size from an
31143         int to an unsigned int.
31144         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
31145         TYPE_VECTOR_SUBPARTS.
31146         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
31147         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
31148         duplicating a non-constant operand into a variable-length vector.
31149         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
31150         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
31151         * ipa-icf.c (sem_variable::equals): Likewise.
31152         * match.pd: Likewise.
31153         * omp-simd-clone.c (simd_clone_subparts): Likewise.
31154         * print-tree.c (print_node): Likewise.
31155         * stor-layout.c (layout_type): Likewise.
31156         * targhooks.c (default_builtin_vectorization_cost): Likewise.
31157         * tree-cfg.c (verify_gimple_comparison): Likewise.
31158         (verify_gimple_assign_binary): Likewise.
31159         (verify_gimple_assign_ternary): Likewise.
31160         (verify_gimple_assign_single): Likewise.
31161         * tree-pretty-print.c (dump_generic_node): Likewise.
31162         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31163         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
31164         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
31165         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
31166         (vect_shift_permute_load_chain): Likewise.
31167         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
31168         (expand_vector_condition, optimize_vector_constructor): Likewise.
31169         (lower_vec_perm, get_compute_type): Likewise.
31170         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31171         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
31172         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
31173         (vect_recog_mask_conversion_pattern): Likewise.
31174         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
31175         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
31176         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31177         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
31178         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
31179         (vectorizable_shift, vectorizable_operation, vectorizable_store)
31180         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
31181         (supportable_widening_operation): Likewise.
31182         (supportable_narrowing_operation): Likewise.
31183         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
31184         Likewise.
31185         * varasm.c (output_constant): Likewise.
31187 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31188             Alan Hayward  <alan.hayward@arm.com>
31189             David Sherwood  <david.sherwood@arm.com>
31191         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
31192         so that both the length == 3 and length != 3 cases set up their
31193         own permute vectors.  Add comments explaining why we know the
31194         number of elements is constant.
31195         (vect_permute_load_chain): Likewise.
31197 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31198             Alan Hayward  <alan.hayward@arm.com>
31199             David Sherwood  <david.sherwood@arm.com>
31201         * machmode.h (mode_nunits): Change from unsigned char to
31202         poly_uint16_pod.
31203         (ONLY_FIXED_SIZE_MODES): New macro.
31204         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
31205         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
31206         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
31207         New typedefs.
31208         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
31209         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
31210         or if measurement_type is not polynomial.
31211         * genmodes.c (ZERO_COEFFS): New macro.
31212         (emit_mode_nunits_inline): Make mode_nunits_inline return a
31213         poly_uint16.
31214         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
31215         Use ZERO_COEFFS when emitting initializers.
31216         * data-streamer.h (bp_pack_poly_value): New function.
31217         (bp_unpack_poly_value): Likewise.
31218         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31219         for GET_MODE_NUNITS.
31220         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31221         for GET_MODE_NUNITS.
31222         * tree.c (make_vector_type): Remove temporary shim and make
31223         the real function take the number of units as a poly_uint64
31224         rather than an int.
31225         (build_vector_type_for_mode): Handle polynomial nunits.
31226         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31227         * emit-rtl.c (const_vec_series_p_1): Likewise.
31228         (gen_rtx_CONST_VECTOR): Likewise.
31229         * fold-const.c (test_vec_duplicate_folding): Likewise.
31230         * genrecog.c (validate_pattern): Likewise.
31231         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31232         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31233         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31234         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31235         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31236         * rtlanal.c (subreg_get_info): Likewise.
31237         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31238         (vect_grouped_load_supported): Likewise.
31239         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31240         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31241         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31242         (simplify_const_unary_operation, simplify_binary_operation_1)
31243         (simplify_const_binary_operation, simplify_ternary_operation)
31244         (test_vector_ops_duplicate, test_vector_ops): Likewise.
31245         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31246         instead of CONST_VECTOR_NUNITS.
31247         * varasm.c (output_constant_pool_2): Likewise.
31248         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31249         explicit-encoded elements in the XVEC for variable-length vectors.
31251 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31253         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31255 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31256             Alan Hayward  <alan.hayward@arm.com>
31257             David Sherwood  <david.sherwood@arm.com>
31259         * coretypes.h (fixed_size_mode): Declare.
31260         (fixed_size_mode_pod): New typedef.
31261         * builtins.h (target_builtins::x_apply_args_mode)
31262         (target_builtins::x_apply_result_mode): Change type to
31263         fixed_size_mode_pod.
31264         * builtins.c (apply_args_size, apply_result_size, result_vector)
31265         (expand_builtin_apply_args_1, expand_builtin_apply)
31266         (expand_builtin_return): Update accordingly.
31268 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31270         * cse.c (hash_rtx_cb): Hash only the encoded elements.
31271         * cselib.c (cselib_hash_rtx): Likewise.
31272         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31273         CONST_VECTOR encoding.
31275 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31276             Jeff Law  <law@redhat.com>
31278         PR target/83641
31279         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31280         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31281         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31282         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31284         PR target/83641
31285         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31286         explicitly probe *sp in a noreturn function if there were any callee
31287         register saves or frame pointer is needed.
31289 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31291         PR debug/83621
31292         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31293         BLKmode for ternary, binary or unary expressions.
31295         PR debug/83645
31296         * var-tracking.c (delete_vta_debug_insn): New inline function.
31297         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31298         insns from get_insns () to NULL instead of each bb separately.
31299         Use delete_vta_debug_insn.  No longer static.
31300         (vt_debug_insns_local, variable_tracking_main_1): Adjust
31301         delete_vta_debug_insns callers.
31302         * rtl.h (delete_vta_debug_insns): Declare.
31303         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31304         instead of variable_tracking_main.
31306 2018-01-03  Martin Sebor  <msebor@redhat.com>
31308         PR tree-optimization/83603
31309         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31310         arguments past the endof the argument list in functions declared
31311         without a prototype.
31312         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31313         Avoid checking when arguments are null.
31315 2018-01-03  Martin Sebor  <msebor@redhat.com>
31317         PR c/83559
31318         * doc/extend.texi (attribute const): Fix a typo.
31319         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31320         issuing -Wsuggest-attribute for void functions.
31322 2018-01-03  Martin Sebor  <msebor@redhat.com>
31324         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31325         offset_int::from instead of wide_int::to_shwi.
31326         (maybe_diag_overlap): Remove assertion.
31327         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31328         * gimple-ssa-sprintf.c (format_directive): Same.
31329         (parse_directive): Same.
31330         (sprintf_dom_walker::compute_format_length): Same.
31331         (try_substitute_return_value): Same.
31333 2018-01-03  Jeff Law  <law@redhat.com>
31335         PR middle-end/83654
31336         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31337         non-constant residual for zero at runtime and avoid probing in
31338         that case.  Reorganize code for trailing problem to mirror handling
31339         of the residual.
31341 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31343         PR tree-optimization/83501
31344         * tree-ssa-strlen.c (get_string_cst): New.
31345         (handle_char_store): Call get_string_cst.
31347 2018-01-03  Martin Liska  <mliska@suse.cz>
31349         PR tree-optimization/83593
31350         * tree-ssa-strlen.c: Include tree-cfg.h.
31351         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31352         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31353         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31354         to false.
31355         (strlen_dom_walker::before_dom_children): Call
31356         gimple_purge_dead_eh_edges. Dump tranformation with details
31357         dump flags.
31358         (strlen_dom_walker::before_dom_children): Update call by adding
31359         new argument cleanup_eh.
31360         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31362 2018-01-03  Martin Liska  <mliska@suse.cz>
31364         PR ipa/83549
31365         * cif-code.def (VARIADIC_THUNK): New enum value.
31366         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31367         thunks.
31369 2018-01-03  Jan Beulich  <jbeulich@suse.com>
31371         * sse.md (mov<mode>_internal): Tighten condition for when to use
31372         vmovdqu<ssescalarsize> for TI and OI modes.
31374 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31376         Update copyright years.
31378 2018-01-03  Martin Liska  <mliska@suse.cz>
31380         PR ipa/83594
31381         * ipa-visibility.c (function_and_variable_visibility): Skip
31382         functions with noipa attribure.
31384 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31386         * gcc.c (process_command): Update copyright notice dates.
31387         * gcov-dump.c (print_version): Ditto.
31388         * gcov.c (print_version): Ditto.
31389         * gcov-tool.c (print_version): Ditto.
31390         * gengtype.c (create_file): Ditto.
31391         * doc/cpp.texi: Bump @copying's copyright year.
31392         * doc/cppinternals.texi: Ditto.
31393         * doc/gcc.texi: Ditto.
31394         * doc/gccint.texi: Ditto.
31395         * doc/gcov.texi: Ditto.
31396         * doc/install.texi: Ditto.
31397         * doc/invoke.texi: Ditto.
31399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31401         * vector-builder.h (vector_builder::m_full_nelts): Change from
31402         unsigned int to poly_uint64.
31403         (vector_builder::full_nelts): Update prototype accordingly.
31404         (vector_builder::new_vector): Likewise.
31405         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31406         (vector_builder::operator ==): Likewise.
31407         (vector_builder::finalize): Likewise.
31408         * int-vector-builder.h (int_vector_builder::int_vector_builder):
31409         Take the number of elements as a poly_uint64 rather than an
31410         unsigned int.
31411         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31412         from unsigned int to poly_uint64.
31413         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31414         (vec_perm_indices::new_vector): Likewise.
31415         (vec_perm_indices::length): Likewise.
31416         (vec_perm_indices::nelts_per_input): Likewise.
31417         (vec_perm_indices::input_nelts): Likewise.
31418         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31419         number of elements per input as a poly_uint64 rather than an
31420         unsigned int.  Use the original encoding for variable-length
31421         vectors, rather than clamping each individual element.
31422         For the second and subsequent elements in each pattern,
31423         clamp the step and base before clamping their sum.
31424         (vec_perm_indices::series_p): Handle polynomial element counts.
31425         (vec_perm_indices::all_in_range_p): Likewise.
31426         (vec_perm_indices_to_tree): Likewise.
31427         (vec_perm_indices_to_rtx): Likewise.
31428         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31429         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31430         (tree_vector_builder::new_binary_operation): Handle polynomial
31431         element counts.  Return false if we need to know the number
31432         of elements at compile time.
31433         * fold-const.c (fold_vec_perm): Punt if the number of elements
31434         isn't known at compile time.
31436 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31438         * vec-perm-indices.h (vec_perm_builder): Change element type
31439         from HOST_WIDE_INT to poly_int64.
31440         (vec_perm_indices::element_type): Update accordingly.
31441         (vec_perm_indices::clamp): Handle polynomial element_types.
31442         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31443         (vec_perm_indices::all_in_range_p): Likewise.
31444         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31445         than shwi trees.
31446         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31447         polynomial vec_perm_indices element types.
31448         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31449         * fold-const.c (fold_vec_perm): Likewise.
31450         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31451         * tree-vect-generic.c (lower_vec_perm): Likewise.
31452         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31453         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31454         element type to HOST_WIDE_INT.
31456 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31457             Alan Hayward  <alan.hayward@arm.com>
31458             David Sherwood  <david.sherwood@arm.com>
31460         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31461         rather than an int.  Use plus_constant.
31462         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31463         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31465 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31466             Alan Hayward  <alan.hayward@arm.com>
31467             David Sherwood  <david.sherwood@arm.com>
31469         * calls.c (emit_call_1, expand_call): Change struct_value_size from
31470         a HOST_WIDE_INT to a poly_int64.
31472 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31473             Alan Hayward  <alan.hayward@arm.com>
31474             David Sherwood  <david.sherwood@arm.com>
31476         * calls.c (load_register_parameters): Cope with polynomial
31477         mode sizes.  Require a constant size for BLKmode parameters
31478         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
31479         forces a parameter to be padded at the lsb end in order to
31480         fill a complete number of words, require the parameter size
31481         to be ordered wrt UNITS_PER_WORD.
31483 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31484             Alan Hayward  <alan.hayward@arm.com>
31485             David Sherwood  <david.sherwood@arm.com>
31487         * reload1.c (spill_stack_slot_width): Change element type
31488         from unsigned int to poly_uint64_pod.
31489         (alter_reg): Treat mode sizes as polynomial.
31491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31492             Alan Hayward  <alan.hayward@arm.com>
31493             David Sherwood  <david.sherwood@arm.com>
31495         * reload.c (complex_word_subreg_p): New function.
31496         (reload_inner_reg_of_subreg, push_reload): Use it.
31498 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31499             Alan Hayward  <alan.hayward@arm.com>
31500             David Sherwood  <david.sherwood@arm.com>
31502         * lra-constraints.c (process_alt_operands): Reject matched
31503         operands whose sizes aren't ordered.
31504         (match_reload): Refer to this check here.
31506 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31507             Alan Hayward  <alan.hayward@arm.com>
31508             David Sherwood  <david.sherwood@arm.com>
31510         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31511         that the mode size is in the set {1, 2, 4, 8, 16}.
31513 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31514             Alan Hayward  <alan.hayward@arm.com>
31515             David Sherwood  <david.sherwood@arm.com>
31517         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31518         Use plus_constant instead of gen_rtx_PLUS.
31520 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31521             Alan Hayward  <alan.hayward@arm.com>
31522             David Sherwood  <david.sherwood@arm.com>
31524         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31525         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31526         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31527         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31528         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31529         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31530         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31531         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31532         * config/i386/i386.c (ix86_push_rounding): ...this new function.
31533         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31534         a poly_int64.
31535         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31536         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31537         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31538         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31539         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31540         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31541         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31542         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31543         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31544         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31545         function.
31546         * expr.c (emit_move_resolve_push): Treat the input and result
31547         of PUSH_ROUNDING as a poly_int64.
31548         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31549         (emit_push_insn): Likewise.
31550         * lra-eliminations.c (mark_not_eliminable): Likewise.
31551         * recog.c (push_operand): Likewise.
31552         * reload1.c (elimination_effects): Likewise.
31553         * rtlanal.c (nonzero_bits1): Likewise.
31554         * calls.c (store_one_arg): Likewise.  Require the padding to be
31555         known at compile time.
31557 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31558             Alan Hayward  <alan.hayward@arm.com>
31559             David Sherwood  <david.sherwood@arm.com>
31561         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31562         Use plus_constant instead of gen_rtx_PLUS.
31564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31565             Alan Hayward  <alan.hayward@arm.com>
31566             David Sherwood  <david.sherwood@arm.com>
31568         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31569         rather than an int.
31571 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31572             Alan Hayward  <alan.hayward@arm.com>
31573             David Sherwood  <david.sherwood@arm.com>
31575         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31576         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31577         via stack temporaries.  Treat the mode size as polynomial too.
31579 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31580             Alan Hayward  <alan.hayward@arm.com>
31581             David Sherwood  <david.sherwood@arm.com>
31583         * expr.c (expand_expr_real_2): When handling conversions involving
31584         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31585         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
31586         as a poly_uint64 too.
31588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31589             Alan Hayward  <alan.hayward@arm.com>
31590             David Sherwood  <david.sherwood@arm.com>
31592         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
31594 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31595             Alan Hayward  <alan.hayward@arm.com>
31596             David Sherwood  <david.sherwood@arm.com>
31598         * combine.c (can_change_dest_mode): Handle polynomial
31599         REGMODE_NATURAL_SIZE.
31600         * expmed.c (store_bit_field_1): Likewise.
31601         * expr.c (store_constructor): Likewise.
31602         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31603         and polynomial REGMODE_NATURAL_SIZE.
31604         (gen_lowpart_common): Likewise.
31605         * reginfo.c (record_subregs_of_mode): Likewise.
31606         * rtlanal.c (read_modify_subreg_p): Likewise.
31608 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31609             Alan Hayward  <alan.hayward@arm.com>
31610             David Sherwood  <david.sherwood@arm.com>
31612         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31613         numbers of elements.
31615 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31616             Alan Hayward  <alan.hayward@arm.com>
31617             David Sherwood  <david.sherwood@arm.com>
31619         * match.pd: Cope with polynomial numbers of vector elements.
31621 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31622             Alan Hayward  <alan.hayward@arm.com>
31623             David Sherwood  <david.sherwood@arm.com>
31625         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31626         in a POINTER_PLUS_EXPR.
31628 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31629             Alan Hayward  <alan.hayward@arm.com>
31630             David Sherwood  <david.sherwood@arm.com>
31632         * omp-simd-clone.c (simd_clone_subparts): New function.
31633         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31634         (ipa_simd_modify_function_body): Likewise.
31636 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31637             Alan Hayward  <alan.hayward@arm.com>
31638             David Sherwood  <david.sherwood@arm.com>
31640         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31641         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31642         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31643         (expand_vector_condition, vector_element): Likewise.
31644         (subparts_gt): New function.
31645         (get_compute_type): Use subparts_gt.
31646         (count_type_subparts): Delete.
31647         (expand_vector_operations_1): Use subparts_gt instead of
31648         count_type_subparts.
31650 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31651             Alan Hayward  <alan.hayward@arm.com>
31652             David Sherwood  <david.sherwood@arm.com>
31654         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31655         (vect_compile_time_alias): ...this new function.  Do the calculation
31656         on poly_ints rather than trees.
31657         (vect_prune_runtime_alias_test_list): Update call accordingly.
31659 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31660             Alan Hayward  <alan.hayward@arm.com>
31661             David Sherwood  <david.sherwood@arm.com>
31663         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31664         numbers of units.
31665         (vect_schedule_slp_instance): Likewise.
31667 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31668             Alan Hayward  <alan.hayward@arm.com>
31669             David Sherwood  <david.sherwood@arm.com>
31671         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31672         constant and extern definitions for variable-length vectors.
31673         (vect_get_constant_vectors): Note that the number of units
31674         is known to be constant.
31676 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31677             Alan Hayward  <alan.hayward@arm.com>
31678             David Sherwood  <david.sherwood@arm.com>
31680         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31681         of units as polynomial.  Choose between WIDE and NARROW based
31682         on multiple_p.
31684 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31685             Alan Hayward  <alan.hayward@arm.com>
31686             David Sherwood  <david.sherwood@arm.com>
31688         * tree-vect-stmts.c (simd_clone_subparts): New function.
31689         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31691 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31692             Alan Hayward  <alan.hayward@arm.com>
31693             David Sherwood  <david.sherwood@arm.com>
31695         * tree-vect-stmts.c (vectorizable_call): Treat the number of
31696         vectors as polynomial.  Use build_index_vector for
31697         IFN_GOMP_SIMD_LANE.
31699 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31700             Alan Hayward  <alan.hayward@arm.com>
31701             David Sherwood  <david.sherwood@arm.com>
31703         * tree-vect-stmts.c (get_load_store_type): Treat the number of
31704         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31705         for variable-length vectors.
31706         (vectorizable_mask_load_store): Treat the number of units as
31707         polynomial, asserting that it is constant if the condition has
31708         already been enforced.
31709         (vectorizable_store, vectorizable_load): Likewise.
31711 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31712             Alan Hayward  <alan.hayward@arm.com>
31713             David Sherwood  <david.sherwood@arm.com>
31715         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31716         of units as polynomial.  Punt if we can't tell at compile time
31717         which vector contains the final result.
31719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31720             Alan Hayward  <alan.hayward@arm.com>
31721             David Sherwood  <david.sherwood@arm.com>
31723         * tree-vect-loop.c (vectorizable_induction): Treat the number
31724         of units as polynomial.  Punt on SLP inductions.  Use an integer
31725         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
31726         cast of such a series for variable-length floating-point
31727         reductions.
31729 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31730             Alan Hayward  <alan.hayward@arm.com>
31731             David Sherwood  <david.sherwood@arm.com>
31733         * tree.h (build_index_vector): Declare.
31734         * tree.c (build_index_vector): New function.
31735         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31736         of units as polynomial, forcibly converting it to a constant if
31737         vectorizable_reduction has already enforced the condition.
31738         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
31739         to create a {1,2,3,...} vector.
31740         (vectorizable_reduction): Treat the number of units as polynomial.
31741         Choose vectype_in based on the largest scalar element size rather
31742         than the smallest number of units.  Enforce the restrictions
31743         relied on above.
31745 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31746             Alan Hayward  <alan.hayward@arm.com>
31747             David Sherwood  <david.sherwood@arm.com>
31749         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31750         number of units as polynomial.
31752 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31753             Alan Hayward  <alan.hayward@arm.com>
31754             David Sherwood  <david.sherwood@arm.com>
31756         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31757         * target.def (autovectorize_vector_sizes): Return the vector sizes
31758         by pointer, using vector_sizes rather than a bitmask.
31759         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
31760         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
31761         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
31762         Likewise.
31763         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
31764         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
31765         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
31766         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
31767         * omp-general.c (omp_max_vf): Likewise.
31768         * omp-low.c (omp_clause_aligned_alignment): Likewise.
31769         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
31770         * tree-vect-loop.c (vect_analyze_loop): Likewise.
31771         * tree-vect-slp.c (vect_slp_bb): Likewise.
31772         * doc/tm.texi: Regenerate.
31773         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
31774         to a poly_uint64.
31775         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
31776         the vector size as a poly_uint64 rather than an unsigned int.
31777         (current_vector_size): Change from an unsigned int to a poly_uint64.
31778         (get_vectype_for_scalar_type): Update accordingly.
31779         * tree.h (build_truth_vector_type): Take the size and number of
31780         units as a poly_uint64 rather than an unsigned int.
31781         (build_vector_type): Add a temporary overload that takes
31782         the number of units as a poly_uint64 rather than an unsigned int.
31783         * tree.c (make_vector_type): Likewise.
31784         (build_truth_vector_type): Take the number of units as a poly_uint64
31785         rather than an unsigned int.
31787 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31788             Alan Hayward  <alan.hayward@arm.com>
31789             David Sherwood  <david.sherwood@arm.com>
31791         * target.def (get_mask_mode): Take the number of units and length
31792         as poly_uint64s rather than unsigned ints.
31793         * targhooks.h (default_get_mask_mode): Update accordingly.
31794         * targhooks.c (default_get_mask_mode): Likewise.
31795         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
31796         * doc/tm.texi: Regenerate.
31798 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31799             Alan Hayward  <alan.hayward@arm.com>
31800             David Sherwood  <david.sherwood@arm.com>
31802         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
31803         * omp-general.c (omp_max_vf): Likewise.
31804         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
31805         (expand_omp_simd): Handle polynomial safelen.
31806         * omp-low.c (omplow_simd_context): Add a default constructor.
31807         (omplow_simd_context::max_vf): Change from int to poly_uint64.
31808         (lower_rec_simd_input_clauses): Update accordingly.
31809         (lower_rec_input_clauses): Likewise.
31811 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31812             Alan Hayward  <alan.hayward@arm.com>
31813             David Sherwood  <david.sherwood@arm.com>
31815         * tree-vectorizer.h (vect_nunits_for_cost): New function.
31816         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
31817         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
31818         (vect_analyze_slp_cost): Likewise.
31819         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
31820         (vect_model_load_cost): Likewise.
31822 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31823             Alan Hayward  <alan.hayward@arm.com>
31824             David Sherwood  <david.sherwood@arm.com>
31826         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
31827         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
31828         from an unsigned int * to a poly_uint64_pod *.
31829         (calculate_unrolling_factor): New function.
31830         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
31832 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31833             Alan Hayward  <alan.hayward@arm.com>
31834             David Sherwood  <david.sherwood@arm.com>
31836         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
31837         from an unsigned int to a poly_uint64.
31838         (_loop_vec_info::slp_unrolling_factor): Likewise.
31839         (_loop_vec_info::vectorization_factor): Change from an int
31840         to a poly_uint64.
31841         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
31842         (vect_get_num_vectors): New function.
31843         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
31844         (vect_get_num_copies): Use vect_get_num_vectors.
31845         (vect_analyze_data_ref_dependences): Change max_vf from an int *
31846         to an unsigned int *.
31847         (vect_analyze_data_refs): Change min_vf from an int * to a
31848         poly_uint64 *.
31849         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31850         than an unsigned HOST_WIDE_INT.
31851         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
31852         (vect_analyze_data_ref_dependence): Change max_vf from an int *
31853         to an unsigned int *.
31854         (vect_analyze_data_ref_dependences): Likewise.
31855         (vect_compute_data_ref_alignment): Handle polynomial vf.
31856         (vect_enhance_data_refs_alignment): Likewise.
31857         (vect_prune_runtime_alias_test_list): Likewise.
31858         (vect_shift_permute_load_chain): Likewise.
31859         (vect_supportable_dr_alignment): Likewise.
31860         (dependence_distance_ge_vf): Take the vectorization factor as a
31861         poly_uint64 rather than an unsigned HOST_WIDE_INT.
31862         (vect_analyze_data_refs): Change min_vf from an int * to a
31863         poly_uint64 *.
31864         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
31865         vfm1 as a poly_uint64 rather than an int.  Make the same change
31866         for the returned bound_scalar.
31867         (vect_gen_vector_loop_niters): Handle polynomial vf.
31868         (vect_do_peeling): Likewise.  Update call to
31869         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
31870         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
31871         be constant.
31872         * tree-vect-loop.c (vect_determine_vectorization_factor)
31873         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
31874         (vect_get_known_peeling_cost): Likewise.
31875         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
31876         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
31877         (vect_transform_loop): Likewise.  Use the lowest possible VF when
31878         updating the upper bounds of the loop.
31879         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
31880         rather than an int.
31881         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
31882         polynomial unroll factors.
31883         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
31884         (vect_make_slp_decision): Likewise.
31885         (vect_supported_load_permutation_p): Likewise, and polynomial
31886         vf too.
31887         (vect_analyze_slp_cost): Handle polynomial vf.
31888         (vect_slp_analyze_node_operations): Likewise.
31889         (vect_slp_analyze_bb_1): Likewise.
31890         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31891         than an unsigned HOST_WIDE_INT.
31892         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
31893         (vectorizable_load): Handle polynomial vf.
31894         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
31895         a poly_uint64.
31896         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
31898 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31899             Alan Hayward  <alan.hayward@arm.com>
31900             David Sherwood  <david.sherwood@arm.com>
31902         * match.pd: Handle bit operations involving three constants
31903         and try to fold one pair.
31905 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31907         * tree-vect-loop-manip.c: Include gimple-fold.h.
31908         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
31909         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
31910         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
31911         Add a path that uses a step of VF instead of 1, but disable it
31912         for now.
31913         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
31914         and niters_no_overflow parameters.  Update calls to
31915         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
31916         Create a new SSA name if the latter choses to use a ste other
31917         than zero, and return it via niters_vector_mult_vf_var.
31918         * tree-vect-loop.c (vect_transform_loop): Update calls to
31919         vect_do_peeling, vect_gen_vector_loop_niters and
31920         slpeel_make_loop_iterate_ntimes.
31921         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
31922         (vect_gen_vector_loop_niters): Update declarations after above changes.
31924 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
31926         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
31927         128-bit round to integer instructions.
31928         (ceil<mode>2): Likewise.
31929         (btrunc<mode>2): Likewise.
31930         (round<mode>2): Likewise.
31932 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31934         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
31935         unaligned VSX load/store on P8/P9.
31936         (expand_block_clear): Allow the use of unaligned VSX
31937         load/store on P8/P9.
31939 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31941         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
31942         New function.
31943         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
31944         swap associated with both a load and a store.
31946 2018-01-02  Andrew Waterman  <andrew@sifive.com>
31948         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
31949         * config/riscv/riscv.md (clear_cache): Use it.
31951 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
31953         * web.c: Remove out-of-date comment.
31955 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31957         * expr.c (fixup_args_size_notes): Check that any existing
31958         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
31959         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
31960         (emit_single_push_insn): ...here.
31962 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31964         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
31965         (const_vector_encoded_nelts): New function.
31966         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
31967         (const_vector_int_elt, const_vector_elt): Declare.
31968         * emit-rtl.c (const_vector_int_elt_1): New function.
31969         (const_vector_elt): Likewise.
31970         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
31971         of CONST_VECTOR_ELT.
31973 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31975         * expr.c: Include rtx-vector-builder.h.
31976         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
31977         directly on the tree encoding.
31978         (const_vector_from_tree): Likewise.
31979         * optabs.c: Include rtx-vector-builder.h.
31980         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
31981         sequence of "u" values.
31982         * vec-perm-indices.c: Include rtx-vector-builder.h.
31983         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
31984         directly on the vec_perm_indices encoding.
31986 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31988         * doc/rtl.texi (const_vector): Describe new encoding scheme.
31989         * Makefile.in (OBJS): Add rtx-vector-builder.o.
31990         * rtx-vector-builder.h: New file.
31991         * rtx-vector-builder.c: Likewise.
31992         * rtl.h (rtx_def::u2): Add a const_vector field.
31993         (CONST_VECTOR_NPATTERNS): New macro.
31994         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
31995         (CONST_VECTOR_DUPLICATE_P): Likewise.
31996         (CONST_VECTOR_STEPPED_P): Likewise.
31997         (CONST_VECTOR_ENCODED_ELT): Likewise.
31998         (const_vec_duplicate_p): Check for a duplicated vector encoding.
31999         (unwrap_const_vec_duplicate): Likewise.
32000         (const_vec_series_p): Check for a non-duplicated vector encoding.
32001         Say that the function only returns true for integer vectors.
32002         * emit-rtl.c: Include rtx-vector-builder.h.
32003         (gen_const_vec_duplicate_1): Delete.
32004         (gen_const_vector): Call gen_const_vec_duplicate instead of
32005         gen_const_vec_duplicate_1.
32006         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
32007         (gen_const_vec_duplicate): Use rtx_vector_builder.
32008         (gen_const_vec_series): Likewise.
32009         (gen_rtx_CONST_VECTOR): Likewise.
32010         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
32011         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32012         Build a new vector rather than modifying a CONST_VECTOR in-place.
32013         (handle_special_swappables): Update call accordingly.
32014         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
32015         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32016         Build a new vector rather than modifying a CONST_VECTOR in-place.
32017         (handle_special_swappables): Update call accordingly.
32019 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32021         * simplify-rtx.c (simplify_const_binary_operation): Use
32022         CONST_VECTOR_ELT instead of XVECEXP.
32024 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32026         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
32027         the selector elements to be different from the data elements
32028         if the selector is a VECTOR_CST.
32029         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
32030         ssizetype for the selector.
32032 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32034         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
32035         before testing each element individually.
32036         * tree-vect-generic.c (lower_vec_perm): Likewise.
32038 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32040         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
32041         * selftest-run-tests.c (selftest::run_tests): Call it.
32042         * vector-builder.h (vector_builder::operator ==): New function.
32043         (vector_builder::operator !=): Likewise.
32044         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
32045         (vec_perm_indices::all_from_input_p): New function.
32046         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32047         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
32048         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
32049         instead of reading the VECTOR_CST directly.  Detect whether both
32050         vector inputs are the same before constructing the vec_perm_indices,
32051         and update the number of inputs argument accordingly.  Use the
32052         utility functions added above.  Only construct sel2 if we need to.
32054 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32056         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
32057         the broadcast of the low byte.
32058         (expand_mult_highpart): Use an explicit encoding for the permutes.
32059         * optabs-query.c (can_mult_highpart_p): Likewise.
32060         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
32061         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32062         (vectorizable_bswap): Likewise.
32063         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
32064         explicit encoding for the power-of-2 permutes.
32065         (vect_permute_store_chain): Likewise.
32066         (vect_grouped_load_supported): Likewise.
32067         (vect_permute_load_chain): Likewise.
32069 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32071         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
32072         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
32073         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
32074         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32075         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
32076         (vect_gen_perm_mask_any): Likewise.
32078 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32080         * int-vector-builder.h: New file.
32081         * vec-perm-indices.h: Include int-vector-builder.h.
32082         (vec_perm_indices): Redefine as an int_vector_builder.
32083         (auto_vec_perm_indices): Delete.
32084         (vec_perm_builder): Redefine as a stand-alone class.
32085         (vec_perm_indices::vec_perm_indices): New function.
32086         (vec_perm_indices::clamp): Likewise.
32087         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
32088         (vec_perm_indices::new_vector): New function.
32089         (vec_perm_indices::new_expanded_vector): Update for new
32090         vec_perm_indices class.
32091         (vec_perm_indices::rotate_inputs): New function.
32092         (vec_perm_indices::all_in_range_p): Operate directly on the
32093         encoded form, without computing elided elements.
32094         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
32095         encoding.  Update for new vec_perm_indices class.
32096         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
32097         the given vec_perm_builder.
32098         (expand_vec_perm_var): Update vec_perm_builder constructor.
32099         (expand_mult_highpart): Use vec_perm_builder instead of
32100         auto_vec_perm_indices.
32101         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
32102         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
32103         or double series encoding as appropriate.
32104         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
32105         vec_perm_indices instead of auto_vec_perm_indices.
32106         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32107         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32108         (vect_permute_store_chain): Likewise.
32109         (vect_grouped_load_supported): Likewise.
32110         (vect_permute_load_chain): Likewise.
32111         (vect_shift_permute_load_chain): Likewise.
32112         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32113         (vect_transform_slp_perm_load): Likewise.
32114         (vect_schedule_slp_instance): Likewise.
32115         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32116         (vectorizable_mask_load_store): Likewise.
32117         (vectorizable_bswap): Likewise.
32118         (vectorizable_store): Likewise.
32119         (vectorizable_load): Likewise.
32120         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
32121         vec_perm_indices instead of auto_vec_perm_indices.  Use
32122         tree_to_vec_perm_builder to read the vector from a tree.
32123         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
32124         vec_perm_builder instead of a vec_perm_indices.
32125         (have_whole_vector_shift): Use vec_perm_builder and
32126         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
32127         truncation to calc_vec_perm_mask_for_shift.
32128         (vect_create_epilog_for_reduction): Likewise.
32129         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
32130         from auto_vec_perm_indices to vec_perm_indices.
32131         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32132         instead of changing individual elements.
32133         (aarch64_vectorize_vec_perm_const): Use new_vector to install
32134         the vector in d.perm.
32135         * config/arm/arm.c (expand_vec_perm_d::perm): Change
32136         from auto_vec_perm_indices to vec_perm_indices.
32137         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32138         instead of changing individual elements.
32139         (arm_vectorize_vec_perm_const): Use new_vector to install
32140         the vector in d.perm.
32141         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
32142         Update vec_perm_builder constructor.
32143         (rs6000_expand_interleave): Likewise.
32144         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
32145         (rs6000_expand_interleave): Likewise.
32147 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32149         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
32150         to qimode could truncate the indices.
32151         * optabs.c (expand_vec_perm_var): Likewise.
32153 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32155         * Makefile.in (OBJS): Add vec-perm-indices.o.
32156         * vec-perm-indices.h: New file.
32157         * vec-perm-indices.c: Likewise.
32158         * target.h (vec_perm_indices): Replace with a forward class
32159         declaration.
32160         (auto_vec_perm_indices): Move to vec-perm-indices.h.
32161         * optabs.h: Include vec-perm-indices.h.
32162         (expand_vec_perm): Delete.
32163         (selector_fits_mode_p, expand_vec_perm_var): Declare.
32164         (expand_vec_perm_const): Declare.
32165         * target.def (vec_perm_const_ok): Replace with...
32166         (vec_perm_const): ...this new hook.
32167         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
32168         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
32169         * doc/tm.texi: Regenerate.
32170         * optabs.def (vec_perm_const): Delete.
32171         * doc/md.texi (vec_perm_const): Likewise.
32172         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
32173         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
32174         expand_vec_perm for constant permutation vectors.  Assert that
32175         the mode of variable permutation vectors is the integer equivalent
32176         of the mode that is being permuted.
32177         * optabs-query.h (selector_fits_mode_p): Declare.
32178         * optabs-query.c: Include vec-perm-indices.h.
32179         (selector_fits_mode_p): New function.
32180         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
32181         is defined, instead of checking whether the vec_perm_const_optab
32182         exists.  Use targetm.vectorize.vec_perm_const instead of
32183         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
32184         fit in the vector mode before using a variable permute.
32185         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
32186         vec_perm_indices instead of an rtx.
32187         (expand_vec_perm): Replace with...
32188         (expand_vec_perm_const): ...this new function.  Take the selector
32189         as a vec_perm_indices rather than an rtx.  Also take the mode of
32190         the selector.  Update call to shift_amt_for_vec_perm_mask.
32191         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
32192         Use vec_perm_indices::new_expanded_vector to expand the original
32193         selector into bytes.  Check whether the indices fit in the vector
32194         mode before using a variable permute.
32195         (expand_vec_perm_var): Make global.
32196         (expand_mult_highpart): Use expand_vec_perm_const.
32197         * fold-const.c: Includes vec-perm-indices.h.
32198         * tree-ssa-forwprop.c: Likewise.
32199         * tree-vect-data-refs.c: Likewise.
32200         * tree-vect-generic.c: Likewise.
32201         * tree-vect-loop.c: Likewise.
32202         * tree-vect-slp.c: Likewise.
32203         * tree-vect-stmts.c: Likewise.
32204         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
32205         Delete.
32206         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
32207         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
32208         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
32209         (aarch64_vectorize_vec_perm_const): ...this new function.
32210         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32211         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32212         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
32213         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
32214         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32215         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32216         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
32217         into...
32218         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
32219         check for NEON modes.
32220         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32221         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32222         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32223         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32224         into...
32225         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
32226         the old VEC_PERM_CONST conditions.
32227         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32228         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32229         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32230         (ia64_vectorize_vec_perm_const_ok): Merge into...
32231         (ia64_vectorize_vec_perm_const): ...this new function.
32232         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32233         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32234         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32235         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32236         * config/mips/mips.c (mips_expand_vec_perm_const)
32237         (mips_vectorize_vec_perm_const_ok): Merge into...
32238         (mips_vectorize_vec_perm_const): ...this new function.
32239         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32240         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32241         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32242         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32243         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32244         (rs6000_expand_vec_perm_const): Delete.
32245         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32246         Delete.
32247         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32248         (altivec_expand_vec_perm_const_le): Take each operand individually.
32249         Operate on constant selectors rather than rtxes.
32250         (altivec_expand_vec_perm_const): Likewise.  Update call to
32251         altivec_expand_vec_perm_const_le.
32252         (rs6000_expand_vec_perm_const): Delete.
32253         (rs6000_vectorize_vec_perm_const_ok): Delete.
32254         (rs6000_vectorize_vec_perm_const): New function.
32255         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32256         an element count and rtx array.
32257         (rs6000_expand_extract_even): Update call accordingly.
32258         (rs6000_expand_interleave): Likewise.
32259         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32260         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32261         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32262         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32263         (rs6000_expand_vec_perm_const): Delete.
32264         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32265         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32266         (altivec_expand_vec_perm_const_le): Take each operand individually.
32267         Operate on constant selectors rather than rtxes.
32268         (altivec_expand_vec_perm_const): Likewise.  Update call to
32269         altivec_expand_vec_perm_const_le.
32270         (rs6000_expand_vec_perm_const): Delete.
32271         (rs6000_vectorize_vec_perm_const_ok): Delete.
32272         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
32273         reference to the SPE evmerge intructions.
32274         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32275         an element count and rtx array.
32276         (rs6000_expand_extract_even): Update call accordingly.
32277         (rs6000_expand_interleave): Likewise.
32278         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32279         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32280         new function.
32281         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32283 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32285         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32286         vector mode and that that mode matches the mode of the data
32287         being permuted.
32288         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32289         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
32290         directly using expand_vec_perm_1 when forcing selectors into
32291         registers.
32292         (expand_vec_perm_var): New function, split out from expand_vec_perm.
32294 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32296         * optabs-query.h (can_vec_perm_p): Delete.
32297         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32298         * optabs-query.c (can_vec_perm_p): Split into...
32299         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32300         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32301         particular selector is valid.
32302         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32303         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32304         (vect_grouped_load_supported): Likewise.
32305         (vect_shift_permute_load_chain): Likewise.
32306         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32307         (vect_transform_slp_perm_load): Likewise.
32308         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32309         (vectorizable_bswap): Likewise.
32310         (vect_gen_perm_mask_checked): Likewise.
32311         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
32312         implementations of variable permutation vectors into account
32313         when deciding which selector to use.
32314         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32315         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32316         with a false third argument.
32317         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32318         to test whether the constant selector is valid and can_vec_perm_var_p
32319         to test whether a variable selector is valid.
32321 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32323         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32324         * optabs-query.c (can_vec_perm_p): Likewise.
32325         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32326         instead of vec_perm_indices.
32327         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32328         (vect_gen_perm_mask_checked): Likewise,
32329         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32330         (vect_gen_perm_mask_checked): Likewise,
32332 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32334         * optabs-query.h (qimode_for_vec_perm): Declare.
32335         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32336         (qimode_for_vec_perm): ...this new function.
32337         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32339 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32341         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32342         does not have a conditional at the top.
32344 2018-01-02  Richard Biener  <rguenther@suse.de>
32346         * ipa-inline.c (big_speedup_p): Fix expression.
32348 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
32350         PR target/81616
32351         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32352         for generic 4->6.
32354 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
32356         PR target/81616
32357         Generic tuning.
32358         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32359         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32360         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32361         cond_taken_branch_cost 3->4.
32363 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
32365         PR tree-optimization/83581
32366         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32367         TODO_cleanup_cfg if any changes have been made.
32369         PR middle-end/83608
32370         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32371         convert_modes if target mode has the right side, but different mode
32372         class.
32374         PR middle-end/83609
32375         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32376         last argument when extracting from CONCAT.  If either from_real or
32377         from_imag is NULL, use expansion through memory.  If result is not
32378         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32379         the parts directly to inner mode, if even that fails, use expansion
32380         through memory.
32382         PR middle-end/83623
32383         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32384         check for bswap in mode rather than HImode and use that in expand_unop
32385         too.
32387 Copyright (C) 2018 Free Software Foundation, Inc.
32389 Copying and distribution of this file, with or without modification,
32390 are permitted in any medium without royalty provided the copyright
32391 notice and this notice are preserved.