[03/46] Remove unnecessary update of NUM_SLP_USES
[official-gcc.git] / gcc / ChangeLog
blobe7ff2709e3c9b93d5112fdb96d10bb8700925086
1 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
5         STMT_VINFO_NUM_SLP_USES when it's true.
6         (vect_free_slp_instance): Add a final_p parameter and pass it to
7         vect_free_slp_tree.
8         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
9         (vect_analyze_slp_instance): Likewise.
10         (vect_slp_analyze_operations): Likewise.
11         (vect_slp_analyze_bb_1): Likewise.
12         * tree-vectorizer.c (vec_info): Likewise.
13         * tree-vect-loop.c (vect_transform_loop): Likewise.
15 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
17         * tree-vect-loop.c (vectorizable_reduction): Assert that the
18         function is not called for second and subsequent members of
19         a reduction group.
21 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
23         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
24         cases for nested loops from here to ...
25         (vect_create_epilog_for_reduction): ...here.  Only call
26         vect_is_simple_use for inner-loop reductions.
28 2018-07-31  Martin Liska  <mliska@suse.cz>
30         PR gcov-profile/85338
31         PR gcov-profile/85350
32         PR gcov-profile/85372
33         * profile.c (struct location_triplet): New.
34         (struct location_triplet_hash): Likewise.
35         (output_location): Do not output a BB that
36         is already recorded for a line.
37         (branch_prob): Use streamed_locations.
39 2018-07-31  Martin Liska  <mliska@suse.cz>
41         PR gcov-profile/85370
42         * coverage.c (coverage_begin_function): Do not mark target
43         clones as artificial functions.
45 2018-07-31  Martin Liska  <mliska@suse.cz>
47         PR gcov-profile/83813
48         PR gcov-profile/84758
49         PR gcov-profile/85217
50         PR gcov-profile/85332
51         * profile.c (branch_prob): Do not record GOTO expressions
52         for GIMPLE statements which locations are already streamed.
54 2018-07-31  Olivier Hainque  <hainque@adacore.com>
56         * gcc.c (handle_spec_function): Accept a soft_matched_part
57         argument, as do_spec_1.  Pass it down to ...
58         (eval_spec_function): Accept a soft_matched_part argument,
59         and pass it down to ...
60         (do_spec_2): Accept a soft_matched_part argument, and pass
61         it down to do_spec_1.
62         (do_spec_1): Pass soft_matched_part to handle_spec_function.
63         (handle_braces): Update call to handle_spec_function.
64         (driver::set_up_specs): Update calls to do_spec_2.
65         (compare_debug_dump_opt_spec_function): Likewise.
66         (compare_debug_self_opt_spec_function): Likewise.
68 2018-07-31  Olivier Hainque  <hainque@adacore.com>
70         * common.opt (nolibc): New option.
71         * doc/invoke.texi (Link Options): Document it.
72         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
73         * config/alpha/linux.h: Likewise.
74         * config/arc/elf.h: Likewise.
75         * config/arm/uclinux-elf.h: Likewise.
76         * config/arm/unknown-elf.h: Likewise.
77         * config/avr/avrlibc.h: Likewise.
78         * config/bfin/bfin.h: Likewise.
79         * config/bfin/linux.h: Likewise.
80         * config/bfin/uclinux.h: Likewise.
81         * config/darwin.h: Likewise.
82         * config/darwin10.h: Likewise.
83         * config/darwin12.h: Likewise.
84         * config/gnu-user.h: Likewise.
85         * config/lm32/uclinux-elf.h: Likewise.
86         * config/pa/pa-hpux11.h: Likewise.
87         * config/pa/pa64-hpux.h: Likewise.
88         * config/sparc/sparc.h: Likewise.
90 2018-07-31  Olivier Hainque  <hainque@adacore.com>
92         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
93         undefined variables.
95 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
97         PR target/86640
98         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
99         instead of GEN_INT.
101 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
103         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
104         terminated string literal.
106 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
108         PR rtl-optimization/85160
109         * combine.c (is_just_move): New function.
110         (try_combine): Allow combining two instructions into two if neither of
111         the original instructions was a move.
113 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
115         PR target/86673
116         * doc/extend.texi (Global Register Variables): Discourage use of type
117         qualifiers.
118         (Local Register Variables): Likewise.
120 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
122         PR tree-optimization/86506
123         * hwint.h (ceil_log2): Resync with hwint.c implementation.
125 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
127         PR target/86547
128         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
129         hard_regno, make sure no insn between `from` and `to` clobbers it.
131 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
132             Tom de Vries  <tdevries@suse.de>
134         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
135         (PTX_DEFAULT_RUNTIME_DIM): ... this.
136         (nvptx_goacc_validate_dims): Set default worker and gang dims to
137         PTX_DEFAULT_RUNTIME_DIM.
138         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
140 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
142         * config/pa/pa.c (pa_output_addr_vec): Align address table.
143         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
144         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
146 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
148         * config/rs6000/constraints.md (wG constraint): Delete, no longer
149         used.
150         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
151         predicate to reflect toc fusion has been deleted.
152         (toc_fusion_mem_raw): Delete, no longer used.
153         (toc_fusion_mem_wrapped): Likewise.
154         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
155         fusion mask bit.
156         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
157         Delete, no longer used.
158         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
159         meant to be used for toc fusion.
160         (rs6000_debug_print_mode): Delete toc fusion debugging.
161         (rs6000_debug_reg_global): Likewise.
162         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
163         fusion and secondary reload support that were never used.
164         (rs6000_option_override_internal): Delete TOC fusion, that was only
165         partially defined, and it did not work unless you also used the
166         -mcmodel= switch.
167         (rs6000_legitimate_address_p): Delete TOC fusion support.
168         (rs6000_opt_masks): Likewise.
169         (fusion_wrap_memory_address): Delete function, no longer used.
170         (fusion_split_address); Delete TOC fusion support.
171         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
172         longer used with toc fusion being deleted.
173         (TARGET_TOC_FUSION_FP): Likewise.
174         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
175         UNSPEC.
176         (toc fusion spliter): Delete TOC fusion support.
177         (toc_fusionload_<mode>): Likewise.
178         (toc_fusionload_di): Likewise.
179         (fusion_gpr_load_<mode>): Delete generator function, this insn no
180         longer needs to be named.  Rename predicate to delete TOC fusion.
181         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
182         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
183         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
184         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
185         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
187 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
189         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
190         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
191         __int128 in built-in function prototypes.
192         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
193         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
195 2018-07-27  Martin Sebor  <msebor@redhat.com>
197         PR tree-optimization/86696
198         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
199         types, including enums.
200         (handle_char_store): Be prepared for the above function to fail.
202 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
204         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
205         when optimization level is lower than 2 or optimize for size.
207 2018-07-26  Martin Sebor  <msebor@redhat.com>
209         PR tree-optimization/86043
210         PR tree-optimization/86042
211         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
212         (get_string_cst_length): Rename...
213         (get_min_string_length): ...to this.  Add argument.
214         (handle_char_store): Extend to handle multi-character stores by
215         MEM_REF.
216         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
217         * tree.h (initializer_zerop): Add argument.
219 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
221         PR middle-end/86660
222         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
223         declare target to variables if they have always,{to,from,tofrom} map
224         kinds.
226 2018-07-26  Martin Liska  <mliska@suse.cz>
228         PR lto/86548
229         * lto-wrapper.c: Add linker_output as prefix
230         for ltrans_output_file.
232 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
234         PR rtl-optimization/85805
235         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
236         value for hard registers if that was written in the same mode.
238 2018-07-26  Martin Liska  <mliska@suse.cz>
240         PR gcov-profile/86536
241         * gcov.c (format_gcov): Use printf format %.*f directly
242         and do not handle special values.
244 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
246         * common/config/arc/arc-common.c (arc_option_optimization_table):
247         Update default optimizations for size.
249 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
251         * config/arc/arc.md (movsf_insn): Add short instruction selection.
252         * config/arc/constraints.md (CfZ): New constraint.
253         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
254         (subsf3_fpu): Likewise.
255         (cmpsf_fpu): Likewise.
256         (cmpsf_fpu_uneq): Likewise.
258 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
260         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
261         accesses as well.
262         (arc_is_uncached_mem_p): uncached applies to both the variable and
263         the pointer.
265 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
267         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
268         register names.
270 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
272         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
273         field "m_scopes" from vec to auto_vec.
275 2018-07-25  Martin Liska  <mliska@suse.cz>
277         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
278         return type.
280 2018-07-25  Richard Biener  <rguenther@suse.de>
282         PR debug/86654
283         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
284         special wrt context_die late.
285         (gen_subprogram_die): Re-use DIEs in local scope.
287 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
289         PR tree-optimization/86644
290         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
292 2018-07-25  Martin Liska  <mliska@suse.cz>
294         PR middle-end/86645
295         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
296         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
298 2018-07-25  Martin Liska  <mliska@suse.cz>
300         PR sanitizer/79635
301         * params.def: Explain ASan abbreviation and provide
302         a documentation link.
304 2018-07-24  Martin Sebor  <msebor@redhat.com>
306         PR tree-optimization/86622
307         PR tree-optimization/86532
308         * builtins.h (string_length): Declare.
309         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
310         (check_access): Be prepared for non-constant length ranges.
311         (string_length): Make extern.
312         * expr.c (string_constant): Only handle the minor non-constant
313         array index.  Use string_constant to compute the length of
314         a generic string constant.
316 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
318         PR tree-optimization/86618
319         * tree-vect-stmts.c (vectorizable_call): Don't take the address
320         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
322 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
324         PR tree-optimization/86636
325         * json.cc (json::object::set): Fix comment.  Add assertions.
326         (json::array::append): Move here from json.h.  Add comment and an
327         assertion.
328         (json::string::string): Likewise.
329         * json.h (json::array::append): Move to json.cc.
330         (json::string::string): Likewise.
331         * optinfo-emit-json.cc
332         (optrecord_json_writer::impl_location_to_json): Assert that we
333         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
334         wrapper around it.  Expand the location once, rather than three
335         times.
336         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
337         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
338         wrappers.
339         (optrecord_json_writer::optinfo_to_json): Likewise, in four
340         places.  Fix some overlong lines.
342 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
344         * config/aarch64/aarch64-simd.md
345         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
346         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
347         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
348         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
349         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
350         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
351         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
352         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
353         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
355 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
357         PR middle-end/86627
358         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
359         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
360         and abs_d == d, do the power of two handling if profitable.
362 2018-07-24  Richard Biener  <rguenther@suse.de>
364         * match.pd: Add BIT_FIELD_REF canonicalizations.
366 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
368         PR c/86617
369         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
371 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
373         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
374         terminated STRING_CST object.
376 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
378         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
380 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
382         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
383         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
384         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
385         the elements into a register.
386         (rs6000_split_v4si_init_di_reg): Delete.
387         (rs6000_split_v4si_init): Delete.
388         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
389         (vsx_init_v4si): Rewrite as a define_expand.
391 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
393         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
394         zero_extend argument from memory): New.
396 2018-07-22  Martin Sebor  <msebor@redhat.com>
398         PR bootstrap/86621
399         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
400         diagnosing calls with unknown arguments unless -Walloca-larger-than
401         is restricted to less than PTRDIFF_MAX bytes.
403 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
405         * doc/gcov.texi (Invoking Gcov): Editorial changes.
407 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
409         * pretty-print.c (text_info::set_location): Remove redundant
410         "line_table" parameter from call to rich_location::set_range.
412 2018-07-20  Martin Sebor  <msebor@redhat.com>
414         PR middle-end/82063
415         * builtins.c (expand_builtin_alloca): Adjust.
416         * calls.c (alloc_max_size): Simplify.
417         * cgraphunit.c (cgraph_node::expand): Adjust.
418         * common.opt (larger_than_size, warn_frame_larger_than): Remove
419         variables.
420         (frame_larger_than_size): Same.
421         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
422         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
423         Initialize.
424         * doc/invoke.texi (GCC Command Options): Document option arguments.
425         Explain byte-size arguments and suffixes.
426         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
427         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
428         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
429         * doc/options.texi (UInteger): Expand.
430         (Host_Wide_Int, ByteSize): Document new properties.
431         * final.c (final_start_function_1): Include sizes in an error message.
432         * function.c (frame_offset_overflow): Same.
433         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
434         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
435         Diagnose unbounded alloca calls only for limits of less than
436         PTRDIFF_MAX.
437         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
438         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
439         for alloca(0).
440         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
441         only for limits of less than PTRDIFF_MAX.
442         * langhooks-def.h (lhd_handle_option): Change function argument
443         to HOST_WIDE_INT.
444         * langhooks.c (lhd_handle_option): Same.
445         * langhooks.h (handle_option): Same.
446         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
447         ByteSize flags.
448         (var_type, var_type_struct): Same.
449         (var_set): Handle ByteSize flag.
450         * optc-gen.awk: Add comments to output to ease debugging.  Make
451         use of HOST_WIDE_INT where appropriate.
452         * opts-gen-save.awk:  Use %lx to format unsigned long.
453         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
454         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
455         arguments.  Parse bytes-size suffixes.
456         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
457         (enum_value_to_arg): Same.
458         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
459         (handle_option): Adjust.
460         (generate_option): Change function argument to HOST_WIDE_INT.
461         (cmdline_handle_error): Adjust.
462         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
463         (set_option): Change function argument to HOST_WIDE_INT.
464         (option_enabled): Handle cl_host_wide_int.
465         (get_option_state): Handle CLVC_SIZE.
466         (control_warning_option): Same.
467         * opts.c (common_handle_option): Change function argument to
468         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
469         OPT_Wvla_larger_than_.
470         * opts.h (enum cl_var_type): Add an enumerator.
471         * stor-layout.c (layout_decl): Print a more meaningful warning.
472         * toplev.c (output_stack_usage): Adjust.
474 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
476         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
477         call to inline_expand_builtin_string_cmp.
478         (expand_builtin_strcmp): Likewise.
479         (expand_builtin_strncmp): Likewise.
480         (inline_string_cmp): Delete the last parameter, change char_type_node
481         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
482         two operands.
483         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
484         the inlining expansion on target where the type of the call has same or 
485         narrower precision than unsigned char.
487 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
489         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
490         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
491         * common.opt (fsave-optimization-record): New option.
492         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
493         * doc/invoke.texi (-fsave-optimization-record): New option.
494         * dumpfile.c: Include "optinfo-emit-json.h".
495         (struct kv_pair): Move to coretypes.h.
496         (optgroup_options): Make non-static.
497         (dump_context::end_scope): Call
498         optimization_records_maybe_pop_dump_scope.
499         * dumpfile.h (optgroup_options): New decl.
500         * json.cc: New file.
501         * json.h: New file.
502         * optinfo-emit-json.cc: New file.
503         * optinfo-emit-json.h: New file.
504         * optinfo.cc: Include "optinfo-emit-json.h".
505         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
506         (optinfo_enabled_p): Check optimization_records_enabled_p.
507         (optinfo_wants_inlining_info_p): Likewise.
508         * optinfo.h: Update comment.
509         * profile-count.c (profile_quality_as_string): New function.
510         * profile-count.h (profile_quality_as_string): New decl.
511         (profile_count::quality): New accessor.
512         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
513         and optinfo_emit_json_cc_tests.
514         * selftest.h (selftest::json_cc_tests): New decl.
515         (selftest::optinfo_emit_json_cc_tests): New decl.
516         * toplev.c: Include "optinfo-emit-json.h".
517         (compile_file): Call optimization_records_finish.
518         (do_compile): Call optimization_records_start.
519         * tree-ssa-live.c: Include optinfo.h.
520         (remove_unused_scope_block_p): Retain inlining information if
521         optinfo_wants_inlining_info_p returns true.
523 2018-07-20  Richard Biener  <rguenther@suse.de>
525         PR debug/86585
526         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
527         to cover -flto-partition=none.
529 2018-07-20  Martin Liska  <mliska@suse.cz>
531         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
532         (get_decl_source_range): Remove unused function.
534 2018-07-20  Richard Biener  <rguenther@suse.de>
536         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
537         (struct vn_phi_s): Likewise.
538         (struct vn_reference_s): Likewise.
539         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
540         for searching the slot of an entry known to be in the hash itself.
541         (vn_phi_hasher::equal): Likewise.
542         (vn_reference_hasher::equal): Likewise.
543         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
544         globals.
545         (optimistic_info, current_info): Remove, keeping only valid_info.
546         (vn_reference_lookup_1): Remove fallback lookup.
547         (vn_reference_lookup_2): Likewise.
548         (vn_nary_op_lookup_1): Likewise.
549         (vn_phi_lookup): Likewise.
550         (vn_nary_build_or_lookup_1): Make sure to not chain the built
551         hash element.
552         (vn_reference_insert): Adjust, chain the inserted hash element
553         at last_inserted_ref.
554         (vn_reference_insert_pieces): Likewise.
555         (visit_reference_op_call): Likewise.
556         (vn_nary_op_insert_into): Chain the inserted hash element at
557         last_inserted_nary.
558         (vn_nary_op_insert_pieces): Adjust.
559         (vn_nary_op_insert): Likewise.
560         (vn_nary_op_insert_stmt): Likewise.
561         (vn_phi_insert): Adjust, chain the inserted hash element at
562         last_inserted_phi.
563         (process_scc): Remove clearing and copying the optimistic
564         table.  Instead remove elements inserted during an optimistic
565         iteration from the single table we maintain.
566         (init_scc_vn): Adjust.
567         (free_scc_vn): Likewise.
568         (sccvn_dom_walker::record_cond): Likewise.
569         (sccvn_dom_walker::after_dom_children): Likewise.
571 2018-07-19  Martin Sebor  <msebor@redhat.com>
573         PR tree-optimization/84047
574         PR tree-optimization/83776
575         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
576         (check_array_bounds): Call it.
578 2018-07-19  Martin Sebor  <msebor@redhat.com>
580         * align.h (align_flags): Use member initialization.
582 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
584         * Makefile.in (OBJS): Add optinfo.o.
585         * coretypes.h (class symtab_node): New forward decl.
586         (struct cgraph_node): New forward decl.
587         (class varpool_node): New forward decl.
588         * dump-context.h: New file.
589         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
590         "tree-pass.h".
591         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
592         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
593         (set_alt_dump_file): Likewise.
594         (dump_context::~dump_context): New dtor.
595         (dump_gimple_stmt): Move implementation to...
596         (dump_context::dump_gimple_stmt): ...this new member function.
597         Add the stmt to any pending optinfo, creating one if need be.
598         (dump_gimple_stmt_loc): Move implementation to...
599         (dump_context::dump_gimple_stmt_loc): ...this new member function.
600         Start a new optinfo and add the stmt to it.
601         (dump_gimple_expr): Move implementation to...
602         (dump_context::dump_gimple_expr): ...this new member function.
603         Add the stmt to any pending optinfo, creating one if need be.
604         (dump_gimple_expr_loc): Move implementation to...
605         (dump_context::dump_gimple_expr_loc): ...this new member function.
606         Start a new optinfo and add the stmt to it.
607         (dump_generic_expr): Move implementation to...
608         (dump_context::dump_generic_expr): ...this new member function.
609         Add the tree to any pending optinfo, creating one if need be.
610         (dump_generic_expr_loc): Move implementation to...
611         (dump_context::dump_generic_expr_loc): ...this new member
612         function.  Add the tree to any pending optinfo, creating one if
613         need be.
614         (dump_printf): Move implementation to...
615         (dump_context::dump_printf_va): ...this new member function.  Add
616         the text to any pending optinfo, creating one if need be.
617         (dump_printf_loc): Move implementation to...
618         (dump_context::dump_printf_loc_va): ...this new member function.
619         Start a new optinfo and add the stmt to it.
620         (dump_dec): Move implementation to...
621         (dump_context::dump_dec): ...this new member function.  Add the
622         value to any pending optinfo, creating one if need be.
623         (dump_context::dump_symtab_node): New member function.
624         (dump_context::get_scope_depth): New member function.
625         (dump_context::begin_scope): New member function.
626         (dump_context::end_scope): New member function.
627         (dump_context::ensure_pending_optinfo): New member function.
628         (dump_context::begin_next_optinfo): New member function.
629         (dump_context::end_any_optinfo): New member function.
630         (dump_context::s_current): New global.
631         (dump_context::s_default): New global.
632         (dump_scope_depth): Delete global.
633         (dumpfile_ensure_any_optinfo_are_flushed): New function.
634         (dump_symtab_node): New function.
635         (get_dump_scope_depth): Reimplement in terms of dump_context.
636         (dump_begin_scope): Likewise.
637         (dump_end_scope): Likewise.
638         (selftest::temp_dump_context::temp_dump_context): New ctor.
639         (selftest::temp_dump_context::~temp_dump_context): New dtor.
640         (selftest::verify_item): New function.
641         (ASSERT_IS_TEXT): New macro.
642         (ASSERT_IS_TREE): New macro.
643         (ASSERT_IS_GIMPLE): New macro.
644         (selftest::test_capture_of_dump_calls): New test.
645         (selftest::dumpfile_c_tests): Call it.
646         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
647         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
648         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
649         descriptive comment.
650         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
651         (dump_node, dump_bb): Move these unrelated decls.
652         (class dump_manager): Add leading comment.
653         * optinfo.cc: New file.
654         * optinfo.h: New file.
656 2018-07-19  Michael Collison  <michael.collison@arm.com>
657             Richard Henderson <rth@redhat.com>
659         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
660         (subti): Handle op1 zero.
661         (subvti4, usub4ti4): New.
662         (*sub<GPI>3_compare1_imm): New.
663         (sub<GPI>3_carryinCV): New.
664         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
665         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
667 2018-07-19  Michael Collison  <michael.collison@arm.com>
668             Richard Henderson <rth@redhat.com>
670         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
671         (addti3): Create simpler code if low part is already known to be 0.
672         (addvti4, uaddvti4): New.
673         (*add<GPI>3_compareC_cconly_imm): New.
674         (*add<GPI>3_compareC_cconly): New.
675         (*add<GPI>3_compareC_imm): New.
676         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
677         handle constants within this pattern..
678         (*add<GPI>3_compareV_cconly_imm): New.
679         (*add<GPI>3_compareV_cconly): New.
680         (*add<GPI>3_compareV_imm): New.
681         (add<GPI>3_compareV): New.
682         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
683         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
684         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
685         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
686         with 'comparison' operator.
687         (*add<GPI>3_compareV_cconly_imm): Ditto.
688         (*add<GPI>3_compareV_cconly): Ditto.
689         (*add<GPI>3_compareV_imm): Ditto.
690         (add<GPI>3_compareV): Ditto.
691         (add<mode>3_carryinC): Ditto.
692         (*add<mode>3_carryinC_zero): Ditto.
693         (*add<mode>3_carryinC): Ditto.
694         (add<mode>3_carryinV): Ditto.
695         (*add<mode>3_carryinV_zero): Ditto.
696         (*add<mode>3_carryinV): Ditto.
698 2018-07-19  Michael Collison  <michael.collison@arm.com>
699             Richard Henderson <rth@redhat.com>
701         * config/aarch64/aarch64-modes.def (CC_V): New.
702         * config/aarch64/aarch64-protos.h
703         (aarch64_addti_scratch_regs): Declare
704         (aarch64_subvti_scratch_regs): Declare.
705         (aarch64_expand_subvti): Declare.
706         (aarch64_gen_unlikely_cbranch): Declare
707         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
708         for signed overflow using CC_Vmode.
709         (aarch64_get_condition_code_1): Handle CC_Vmode.
710         (aarch64_gen_unlikely_cbranch): New function.
711         (aarch64_addti_scratch_regs): New function.
712         (aarch64_subvti_scratch_regs): New function.
713         (aarch64_expand_subvti): New function.
715 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
717         * config/aarch64/aarch64-option-extensions.def: New entry for profile
718         extension.
719         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
720         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
721         extension.
723 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
725         PR target/83009
726         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
727         address check not strict.
729 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
731         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
732         Umq with Umn.
733         (store_pair_lanes<mode>): Likewise.
734         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
735         enum value 'ADDR_QUERY_LDP_STP_N'.
736         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
737         (aarch64_print_address_internal): Add declaration.
738         (aarch64_print_ldpstp_address): Remove.
739         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
740         (aarch64_print_operand): Change printing of 'y'.
741         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
742         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
743         'true' rather than '1'.
744         * config/aarch64/constraints.md (Uml): Likewise.
745         (Uml): Rename to Umn.
746         (Umq): Remove.
748 2018-07-19  Richard Biener  <rguenther@suse.de>
750         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
751         a trailing array.
752         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
753         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
754         (vn_reference_hasher): Likewise.
755         (struct vn_tables_s): Remove obstack and alloc-pool members.
756         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
757         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
758         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
759         (vn_reference_insert_pieces): Likewise.
760         (alloc_vn_nary_op_noinit): Adjust.
761         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
762         (vn_phi_eq): Adjust.
763         (shared_lookup_phiargs): Remove.
764         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
765         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
766         (visit_reference_op_call): Likewise.
767         (copy_nary, copy_phi, copy_reference): Remove.
768         (process_scc): Rewind the obstack when iterating.  Do not
769         copy the elements to valid_info but just move them from one
770         hashtable to the other.
771         (allocate_vn_table): Adjust.
772         (free_vn_table): Likewise.
773         (init_scc_vn): Likewise.
774         (free_scc_vn): Likewise.
776 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
778         PR target/86560
779         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
780         indirect_return as function type attribute.
781         (ix86_attribute_table): Change indirect_return to function
782         type attribute.
783         * doc/extend.texi: Update indirect_return attribute.
785 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
787         * wide-int.h (widest2_int): New.
788         * gimple-fold.c (arith_overflowed_p): Use it.
789         * tree.h (widest2_int_cst): New.
790         * tree-vrp.c (wide_int_binop_overflow): Rename from
791         vrp_int_const_binop.
792         Rewrite to work on trees.
793         (extract_range_from_multiplicative_op_1): Abstract code to...
794         (wide_int_range_min_max): ...here.
795         (wide_int_range_cross_product): ...and here.
796         (extract_range_from_binary_expr_1): Abstract overflow code to...
797         (wide_int_range_mult_wrapping): ...here.
798         * tree-vrp.h (wide_int_range_cross_product): New.
799         (wide_int_range_mult_wrapping): New.
801 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
802             Julia Koval  <julia.koval@intel.com>
804         * config/i386/x86-tune-costs.h (skylake_memcpy,
805         skylake_memset): Replace rep_prefix with unrolling for size 512.
807 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
809         PR middle-end/86544
810         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
811         in last stmt.
813 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
815         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
816         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
817         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
818         previously known as "PowerPC AltiVec Built-in Functions".  Move
819         some material to new subsubsections "PowerPC AltiVec Built-in
820         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
821         ISA 2.07".
822         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
823         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
824         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
825         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
827 2018-07-18  Richard Biener  <rguenther@suse.de>
829         PR tree-optimization/86557
830         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
831         EXACT_DIV_EXPR.
833 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
835         * config/s390/s390.c (s390_function_profiler): Generate CFI.
837 2018-07-17  Jeff Law  <law@redhat.com>
839         * config/arm/arm.c (get_label_padding): Update for recent
840         changes to label_to_alignment.
842         PR tree-optimization/86010
843         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
845         * config/mips/mips.c (vr4130_align_insns): Update for recent
846         changes to label_to_alignment.
848         * config/frv/frv.c (frv_label_align): Update for recent changes
849         to label_to_alignment.
851         * config/nios2/nios2.c (nios2_label_align): Update for recent
852         changes which dropped ALIGN_LABELS_LOG.
854 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
856         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
857         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
859 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
861         * config/arc/arc.c (arc_label_align): Use align_labels instead of
862         deprecated align_labels_log.
864 2018-07-17  Richard Biener  <rguenther@suse.de>
866         PR lto/86456
867         * dwarf2out.c (init_sections_and_labels): Always generate
868         a debug_line_str_section for early LTO debug.
869         (dwarf2out_finish): Reset debug_line_str_hash output early.
870         Bump counter for extra dwarf5 .debug_loc labels to not conflict
871         with fat LTO part.
872         (dwarf2out_early_finish): Output debug_line_str.
874 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
876         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
877         index register on z196 or later.
879 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
881         * config/s390/s390.c (s390_default_align): Set default function
882         alignment to 16.
883         (s390_override_options_after_change): Call s390_default align.
884         (s390_option_override_internal): Call s390_default_align.
885         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
887 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
889         PR middle-end/86542
890         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
891         to _looptemp_ clauses, other than the first two.
893 2018-07-17  Martin Liska  <mliska@suse.cz>
895         * opts.c: Do not enable OPT_falign_* for -Os.
897 2018-07-17  Martin Liska  <mliska@suse.cz>
899         * align.h (MAX_CODE_ALIGN): New.
900         (MAX_CODE_ALIGN_VALUE): New.
901         * common/config/i386/i386-common.c (ix86_handle_option):
902         (MAX_CODE_ALIGN): Moved to align.h.
903         * final.c (MAX_CODE_ALIGN): Likewise.
904         * opts.c (parse_and_check_align_values):
905         (MAX_CODE_ALIGN): Likewise.
906         (MAX_CODE_ALIGN_VALUE): Likewise.
908 2018-07-17  Martin Liska  <mliska@suse.cz>
910         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
911         in order to fulfil coding style.
912         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
913         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
914         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
915         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
916         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
917         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
918         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
919         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
920         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
922 2018-07-17  Martin Liska  <mliska@suse.cz>
924         * align.h: New file.
925         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
926         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
927         align_flags of label_to_alignment.
928         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
929         class.
930         * config/m68k/m68k.c: Do not use removed align_labels_value and
931         align_loops_value.
932         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
933         (LOOP_ALIGN): Likewise.
934         (LABEL_ALIGN): Likewise.
935         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
936         Remove not used macro.
937         (rs6000_loop_align): Change return type to align_flags.
938         (rs6000_loop_align_max_skip): Remove.
939         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
940         Change return type to align_flags.
941         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
942         Remove not used macro.
943         (rs6000_loop_align):  Change return type to align_flags.
944         (rs6000_loop_align_max_skip): Remove.
945         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
946         * config/rx/rx-protos.h (rx_align_for_label): Make it
947         static function.
948         * config/rx/rx.c (rx_align_for_label): Change return type
949         to align_flags.
950         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
951         macro definitions.
952         into align_flags class.
953         (LABEL_ALIGN): Likewise.
954         (LOOP_ALIGN): Likewise.
955         * config/s390/s390.c (s390_label_align): Use align_flags
956         class member.
957         (s390_asm_output_function_label): Likewise.
958         * config/sh/sh.c (sh_override_options_after_change):
959         Use align_flags class directly without macros.
960         (find_barrier): Likewise.
961         (barrier_align): Likewise.
962         (sh_loop_align): Likewise.
963         * config/spu/spu.c (spu_option_override):
964         Use align_flags_tuple::get_value instead of removed macros.
965         (spu_sched_init): Likewise.
966         * config/spu/spu.h (GTY): Likewise.
967         * config/visium/visium.c (visium_option_override):
968         Set "8" as default secondary alignment.
969         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
970         in order to guarantee secondary alignment of 8.
971         * coretypes.h: Include align.h header file.
972         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
973         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
974         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
975         * doc/tm.texi.in: Likewise.
976         * final.c (struct label_alignment): Remove not used structure.
977         (LABEL_ALIGN): Change type to align_flags.
978         (LOOP_ALIGN): Likewise.
979         (JUMP_ALIGN): Likewise.
980         (default_loop_align_max_skip): Remove.
981         (default_label_align_max_skip): Likewise.
982         (default_jump_align_max_skip): Likewise.
983         (default_label_align_after_barrier_max_skip):
984         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
985         (LABEL_TO_MAX_SKIP): Remove.
986         (label_to_alignment): Return align_flags type instead of integer.
987         (label_to_max_skip): Remove.
988         (align_fuzz): Use align_flags type.
989         (compute_alignments): Use align_flags type and use align_flags::max
990         to combine multiple alignments.
991         (grow_label_align): Grow vec instead of C array.
992         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
993         (shorten_branches):  Use align_flags type and use align_flags::max
994         to combine multiple alignments.
995         (final_scan_insn_1): Remove usage of secondary alignment that comes
996         from label alignment, but instead use proper secondary alignment
997         which is computed in grow_label_align.
998         * flags.h (struct align_flags_tuple): Move to align.h.
999         (struct align_flags): Likewise.
1000         (state_align_loops): Rename to align_loops.
1001         (state_align_jumps): Rename to align_jumps.
1002         (state_align_labels): Rename to align_labels.
1003         (state_align_functions): Rename to align_functions.
1004         (align_loops_log): Remove.
1005         (align_jumps_log): Remove.
1006         (align_labels_log): Remove.
1007         (align_functions_log): Remove.
1008         (align_loops_max_skip): Remove.
1009         (align_jumps_max_skip): Remove.
1010         (align_labels_max_skip): Remove.
1011         (align_functions_max_skip): Remove.
1012         (align_loops_value): Remove.
1013         (align_jumps_value): Remove.
1014         (align_labels_value): Remove.
1015         (align_functions_value): Remove.
1016         * output.h (label_to_alignment): Change return type to align_flags.
1017         (label_to_max_skip): Remove.
1018         * target.def: Remove loop_align_max_skip, label_align_max_skip,
1019         jump_align_max_skip macros.
1020         * targhooks.h (default_loop_align_max_skip): Remove.
1021         (default_label_align_max_skip): Likewise.
1022         (default_jump_align_max_skip): Likewise.
1023         (default_label_align_after_barrier_max_skip): Remove.
1024         * toplev.c (read_log_maxskip): Use ::normalize function.
1025         (parse_N_M): Remove not used argument and also call ::normalize.
1026         (parse_alignment_opts): Do not pass unused arguments.
1027         * varasm.c (assemble_start_function): Use directly align_functions
1028         instead of removed macros.
1029         * system.h: Do not poison removed macros.
1031 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
1033         PR middle-end/86539
1034         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1035         and cond temporaries don't have reference type if iterator has
1036         pointer type.  For init use &for_pre_body instead of pre_p if
1037         for_pre_body is non-empty.
1039 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1041         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1042         double-double modes to SFmode directly directly.
1043         (trunc<mode>sf2_fprs): Delete.
1045 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1047         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1048         for conversions between IFmode and the decimal floating point modes.
1049         (init_float128_ieee): Use the correct names for conversions between
1050         KFmode and the decimal floating point modes.
1052 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1054         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1055         for the conversions between TDmode and IFmode.
1056         (init_float128_ieee): Use more correct names for the conversions
1057         between TDmode and KFmode.
1059 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
1061         PR tree-optimization/86526
1062         * builtins.c (expand_builtin_memcmp): Formatting fixes.
1063         (inline_expand_builtin_string_cmp): Likewise.
1064         (inline_string_cmp): Likewise.  Use c_readstr instead of
1065         builtin_memcpy_read_str.  Add unit_mode temporary.
1067 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1069         PR middle-end/86528
1070         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1071         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1073 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1075         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1076         Alphabetize prototypes of built-in functions, separating out
1077         built-in functions that are listed in this section but should be
1078         described elsewhere.
1080 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
1082         PR target/86511
1083         * expmed.c (emit_store_flag): Do not emit setcc followed by a
1084         conditional move when trapping comparison was split to a
1085         non-trapping one (and vice versa).
1087 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1089         * config/s390/s390.c (s390_function_profiler): Generate nops
1090         instead of profiler call sequences.
1091         * config/s390/s390.opt: Add the new option.
1093 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1095         * config/s390/s390.c (s390_function_profiler): Generate
1096         __mcount_loc section.
1097         * config/s390/s390.opt: Add the new option.
1099 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1101         * common.opt: Add the new warning.
1102         * config/s390/s390.c (s390_function_profiler): Emit "brasl
1103         %r0,__fentry__" when -mfentry is specified.
1104         (s390_option_override_internal): Disallow -mfentry for 31-bit
1105         CPUs.
1106         * config/s390/s390.opt: Add the new option.
1108 2018-07-16  Richard Biener  <rguenther@suse.de>
1110         PR lto/86523
1111         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1112         for function-local FUNCTION_DECL and RESULT_DECL immediately.
1114 2018-07-16  Martin Liska  <mliska@suse.cz>
1116         PR ipa/86529
1117         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1118         to ::get_create.
1120 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
1122         * config/arc/arcHS.md: Update ARCHS scheduling rules.
1124 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
1126         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1127         for ARCHS4x.
1128         * config/arc/arc-cpus.def (hs4x): New cpu.
1129         (hs4xd): Likewise.
1130         * config/arc/arc-tables.opt: Regenerate.
1131         * config/arc/arc.c (arc_sched_issue_rate): New function.
1132         (TARGET_SCHED_ISSUE_RATE): Define.
1133         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1134         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1135         fpu_cvt.
1136         (attr tune): Add ARCHS4x tune values.
1137         (attr tune_dspmpy): Define.
1138         (*tst): Correct instruction type.
1139         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1140         * config/arc/arcHS4x.md: New file.
1141         * config/arc/fpu.md: Update instruction type attributes.
1142         * config/arc/t-multilib: Regenerate.
1144 2018-07-16  Tom de Vries  <tdevries@suse.de>
1146         PR debug/86455
1147         * var-tracking.c (vt_initialize): Fix pre_dec handling.
1149 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1151         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1152         early clobber.
1154 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
1156         PR tree-optimization/86514
1157         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1158         conversion to a boolean type from a type with greater precision.
1160 2018-07-16  Tom de Vries  <tdevries@suse.de>
1162         * var-tracking.c (vt_initialize): Print adjusted insn slim if
1163         dump_flags request TDF_SLIM.
1165 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
1167         * fold-const.c (int_const_binop_1): Abstract...
1168         (wide_int_binop): ...wide int code here.
1169         (poly_int_binop): ...poly int code here.
1170         Abstract the rest of int_const_binop_1 into int_const_binop.
1171         * fold-const.h (wide_int_binop): New.
1172         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1173         Remove useless PLUS/MINUS_EXPR case.
1174         (zero_nonzero_bits_from_vr): Move wide int code...
1175         (zero_nonzero_bits_from_bounds): ...here.
1176         (extract_range_from_binary_expr_1): Move mask optimization code...
1177         (range_easy_mask_min_max): ...here.
1178         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1179         (range_easy_mask_min_max): New.
1181 2018-07-15  Jeff Law  <law@redhat.com>
1183         PR target/85993
1184         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1185         block.
1187 2018-07-14  Jim Wilson  <jimw@sifive.com>
1189         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1191 2018-07-14  Paul Koning  <ni1d@arrl.net>
1193         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1195 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
1197         * lto-streamer-out.c (copy_function_or_variable): Dump info about
1198         copying section.
1200 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
1201             Steve Munroe  <munroesj52@gmail.com>
1203         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1204         (_mm_andnot_si128): Likewise.
1205         (_mm_or_si128): Likewise.
1206         (_mm_xor_si128): Likewise.
1208 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
1210         PR middle-end/78809
1211         * builtins.c (expand_builtin_memcmp): Inline the calls first
1212         when result_eq is false.
1213         (expand_builtin_strcmp): Inline the calls first.
1214         (expand_builtin_strncmp): Likewise.
1215         (inline_string_cmp): New routine. Expand a string compare
1216         call by using a sequence of char comparison.
1217         (inline_expand_builtin_string_cmp): New routine. Inline expansion
1218         a call to str(n)cmp/memcmp.
1219         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1220         New option.
1221         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1223 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
1225         * config/arm/driver-arm.c: Include arm-native.h.
1226         (host_detect_local_cpu): Use auto-generated data tables.
1227         (vendors, arm_cpu_table): Delete.  Move part information to ...
1228         * config/arm/arm-cpus.in: ... here.
1229         * config/arm/parsecpu.awk (gen_native): New function.
1230         (vendor, part): New CPU fields.
1231         (END): Add support for building the native CPU detection tables.
1232         * config/arm/t-arm (arm-native.h): Add build rule.
1233         (driver-arm.o): Add dependency on arm-native.h.
1235 2018-07-13  Richard Biener  <rguenther@suse.de>
1237         PR middle-end/85974
1238         * match.pd (addr1 - addr2): Allow either of the operand to
1239         have a conversion.
1241 2018-07-13  Tom de Vries  <tdevries@suse.de>
1243         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
1244         in remap_ssa_name.
1246 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
1248         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
1249         arrays instead of numbered variables.
1251 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
1253         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
1254         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
1256 2018-07-13  Richard Biener  <rguenther@suse.de>
1258         PR debug/86452
1259         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
1260         instead of get_context_die.
1262 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
1263             Richard Biener  <rguenther@suse.de>
1265         PR middle-end/86489
1266         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
1267         that the loop latch destination where phi is defined.
1269 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
1271         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
1272         (riscv_expand_epilogue): Add assertion to check interrupt mode.
1273         (riscv_set_current_function): Extract getting interrupt type to new
1274         function.
1275         (riscv_get_interrupt_type): New function.
1276         (riscv_merge_decl_attributes): New function, checking interrupt type is
1277         same.
1278         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
1280 2018-07-12  Paul Koning  <ni1d@arrl.net>
1282         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
1283         directive.
1285 2018-07-12  Paul Koning  <ni1d@arrl.net>
1287         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
1288         zero reference, add doloop_end instead.
1289         * doc/md.texi (decrement_and_branch_until_zero): Remove.
1290         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
1291         detail for doloop_end.
1293 2018-07-12  Martin Sebor  <msebor@redhat.com>
1295         PR c/86453
1296         * attribs.c (decl_attributes): Reject conflicting attributes before
1297         calling attribute handlers.
1299 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1301         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
1302          parameter.
1303         (gcc::dump_manager::get_dump_file_name): likewise.
1304         (dump_begin): Likewise.
1305         * dumpfile.h (dump_begin): Update prototype.
1306         (gcc::dump_manager::get_dump_file_name,
1307         gcc::dump_manager::get_dump_file_name): Update prototype.
1309 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1311         * internal-fn.h (vectorizable_internal_fn_p): New function.
1312         * tree-vect-slp.c (compatible_calls_p): Likewise.
1313         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
1314         to internal functions.
1315         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1317 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1319         * fold-const.h (inverse_conditions_p): Declare.
1320         * fold-const.c (inverse_conditions_p): New function.
1321         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
1322         that test the inverse condition of a conditional internal function.
1323         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1324         * internal-fn.c (internal_fn_mask_index): Handle conditional
1325         internal functions.
1326         (vectorized_internal_fn_supported_p): New function.
1327         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1328         (any_pred_load_store): Replace with...
1329         (need_to_predicate): ...this new variable.
1330         (redundant_ssa_names): New variable.
1331         (ifcvt_can_use_mask_load_store): Move initial checks to...
1332         (ifcvt_can_predicate): ...this new function.  Handle tree codes
1333         for which a conditional internal function exists.
1334         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1335         instead of ifcvt_can_use_mask_load_store.  Update after variable
1336         name change.
1337         (predicate_load_or_store): New function, split out from
1338         predicate_mem_writes.
1339         (check_redundant_cond_expr): New function.
1340         (value_available_p): Likewise.
1341         (predicate_rhs_code): Likewise.
1342         (predicate_mem_writes): Rename to...
1343         (predicate_statements): ...this.  Use predicate_load_or_store
1344         and predicate_rhs_code.
1345         (combine_blocks, tree_if_conversion): Update after above name changes.
1346         (ifcvt_local_dce): Handle redundant_ssa_names.
1347         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1348         general conditional functions.
1349         * tree-vect-stmts.c (vectorizable_call): Likewise.
1351 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1352             Alan Hayward  <alan.hayward@arm.com>
1353             David Sherwood  <david.sherwood@arm.com>
1355         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1356         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1357         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1358         plus and minus and convert them into IFN_COND_FMA-based sequences.
1359         (convert_mult_to_fma): Handle conditional plus and minus.
1361 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1363         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1364         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1365         (cond_fnms_optab): New optabs.
1366         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1367         internal functions.
1368         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1369         * internal-fn.h (get_conditional_internal_fn): Declare.
1370         (get_unconditional_internal_fn): Likewise.
1371         * internal-fn.c (cond_ternary_direct): New macro.
1372         (expand_cond_ternary_optab_fn): Likewise.
1373         (direct_cond_ternary_optab_supported_p): Likewise.
1374         (FOR_EACH_COND_FN_PAIR): Likewise.
1375         (get_conditional_internal_fn): New function.
1376         (get_unconditional_internal_fn): Likewise.
1377         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1378         (gimple_match_op::gimple_match_op): Add a new overload for 5
1379         operands.
1380         (gimple_match_op::set_op): Likewise.
1381         (gimple_resimplify5): Declare.
1382         * genmatch.c (decision_tree::gen): Generate simplifications for
1383         5 operands.
1384         * gimple-match-head.c (gimple_simplify): Define an overload for
1385         5 operands.  Handle calls with 5 arguments in the top-level overload.
1386         (convert_conditional_op): Handle conversions from unconditional
1387         internal functions to conditional ones.
1388         (gimple_resimplify5): New function.
1389         (build_call_internal): Pass a fifth operand.
1390         (maybe_push_res_to_seq): Likewise.
1391         (try_conditional_simplification): Try converting conditional
1392         internal functions to unconditional internal functions.
1393         Handle 3-operand unconditional forms.
1394         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1395         Define ternary equivalents of the current rules for binary conditional
1396         internal functions.
1397         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1398         ternary operations.
1399         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1400         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1401         (optab): Handle them.
1402         (SVE_COND_FP_TERNARY): New int iterator.
1403         (sve_fmla_op, sve_fmad_op): New int attributes.
1404         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1405         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1406         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1408 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1410         * target.def (preferred_else_value): New target hook.
1411         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1412         * doc/tm.texi: Regenerate.
1413         * targhooks.h (default_preferred_else_value): Declare.
1414         * targhooks.c (default_preferred_else_value): New function.
1415         * internal-fn.h (conditional_internal_fn_code): Declare.
1416         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1417         (get_conditional_internal_fn): Use it.
1418         (conditional_internal_fn_code): New function.
1419         * gimple-match.h (gimple_match_cond): New struct.
1420         (gimple_match_op): Add a cond member function.
1421         (gimple_match_op::gimple_match_op): Update all forms to take a
1422         gimple_match_cond.
1423         * genmatch.c (expr::gen_transform): Use the same condition as res_op
1424         for the suboperation, but don't specify a particular else_value.
1425         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1426         (visit_nary_op, visit_reference_op_load): Pass
1427         gimple_match_cond::UNCOND to the gimple_match_op constructor.
1428         * gimple-match-head.c: Include tree-eh.h
1429         (convert_conditional_op): New function.
1430         (maybe_resimplify_conditional_op): Likewise.
1431         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1432         (gimple_resimplify2): Likewise.
1433         (gimple_resimplify3): Likewise.
1434         (gimple_resimplify4): Likewise.
1435         (maybe_push_res_to_seq): Return null for conditional operations.
1436         (try_conditional_simplification): New function.
1437         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
1438         constructor.
1439         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1440         IFN_COND_* call.
1441         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1442         function.
1443         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1445 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1447         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1448         DECL_FCONTEXT
1449         (hash_tree): Do not hash DECL_FCONTEXT
1450         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1451         Do not stream DECL_FCONTEXT.
1452         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1453         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1455 2018-07-12  Richard Biener  <rguenther@suse.de>
1457         PR debug/86462
1458         * dwarf2out.c (gen_block_die): Only output blocks when they have
1459         at least one !DECL_IGNORED_P variable.
1461 2018-07-12  Richard Biener  <rguenther@suse.de>
1463         PR target/84829
1464         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1465         Remove -mieee-fp handling.
1467 2018-07-12  Richard Biener  <rguenther@suse.de>
1469         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1470         left-over from last patch.
1472 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
1474         PR tree-optimization/86492
1475         * gimple-ssa-store-merging.c
1476         (imm_store_chain_info::coalesce_immediate_stores): Call
1477         check_no_overlap even for the merge_overlapping case.  Formatting fix.
1479 2018-07-12  Richard Biener  <rguenther@suse.de>
1481         PR middle-end/86479
1482         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1483         move possibly trapping operations into the conditional.
1485 2018-07-12  Richard Biener  <rguenther@suse.de>
1487         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1488         (vn_lookup_simplify_result): Remove recursion limit applied
1489         here.
1490         (vn_nary_build_or_lookup_1): Adjust.
1491         (try_to_simplify): Likewise.
1492         * gimple-match-head.c (gimple_resimplify1): Instead apply one
1493         here.
1494         (gimple_resimplify2): Likewise.
1495         (gimple_resimplify3): Likewise.
1496         (gimple_resimplify4): Likewise.
1498 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
1500         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1501         Use __mmask64 type instead of __mmask8 for __M argument.
1502         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1503         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1504         __U argument.
1505         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1506         __mmask16 for __M argument.
1507         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1508         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1509         to __mmask16 instead of __mmask8.
1510         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1511         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1512         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1513         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1514         instead of __mmask16 for __U argument.
1515         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1516         __mmask16 instead of __mmask8 for __U argument.
1517         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1518         __U argument.
1519         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1520         __mmask16.
1521         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1522         argument.
1523         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1524         __U argument.
1525         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1526         __mmask16.
1527         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1528         of __mmask16.
1529         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1530         __U argument.
1531         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1532         __U argument.
1533         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1534         __U argument.
1535         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1536         __U argument.
1537         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1538         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1539         return type as well as __M argument type and all casts from __mmask8
1540         to __mmask32.
1541         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1542         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1543         return type as well as __M argument type and all casts from __mmask8
1544         to __mmask16.
1545         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1546         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1547         return type as well as __M argument type and all casts from __mmask8
1548         to __mmask32.
1549         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1550         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1551         return type as well as __M argument type and all casts from __mmask8
1552         to __mmask16.
1553         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1554         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1555         __mmask16.
1557 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
1559         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1560         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1561         for __U argument.
1563 2018-07-11  Paul Koning  <ni1d@arrl.net>
1565         * doc/md.texi (define_subst): Document how multiple occurrences of
1566         the same argument in the replacement pattern are handled.
1568 2018-07-11  Paul Koning  <ni1d@arrl.net>
1570         * doc/extend.texi (Common Variable Attributes): Move "mode" into
1571         alphabetical order.
1572         (Common Type Attributes): Add "mode" attribute.
1574 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
1576         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1577         stream DECL_ORIGINAL_TYPE.
1578         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1579         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1580         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1581         Do not walk original type.
1582         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1583         external decls.
1584         (write_ts_decl_non_common_tree_pointers): Do not stream
1585         DECL_ORIGINAL_TYPE
1586         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1587         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1589 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
1591         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1592         thread twice from the same starting edge.
1594 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
1596         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1597         * gimple.c (gimple_call_nonnull_result_p): ...here...
1598         (gimple_call_nonnull_arg): ...and here.
1599         * gimple.h (gimple_call_nonnull_result_p): New.
1600         (gimple_call_nonnull_arg): New.
1602 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
1604         * config/arm/arm-cpus.in: Move information from fpu field of each
1605         cpu definition to the isa field.
1606         * config/arm/parsecpu.awk (fpu): Delete match rule.
1607         (gen_comm_data): Don't add bits from the CPU's FPU entry.
1609 2018-07-11  Richard Biener  <rguenther@suse.de>
1611         PR debug/86457
1612         * dwarf2out.c (init_sections_and_labels): Use
1613         output_asm_line_debug_info consistently.
1614         (dwarf2out_early_finish): Likewise.
1615         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1616         type units.
1618 2018-07-11  Richard Biener  <rguenther@suse.de>
1620         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1621         Rework father_bb setting in a way to avoid propagating constants
1622         multiple times on a loop body.
1624 2018-07-10  Mark Wielaard  <mark@klomp.org>
1626         PR debug/86459
1627         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1629 2018-07-10  Richard Biener  <rguenther@suse.de>
1631         * hash-map.h (hash_map::iterator::operator*): Return
1632         references to key and value.
1634 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
1636         PR c++/86443
1637         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1638         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1639         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1640         (gimplify_omp_for): For composite loops, move outer
1641         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1642         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
1643         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
1644         TREE_LIST for both the original class iterator and the "last" helper
1645         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
1646         loop, remember has_decl_expr from outer composite loops for the
1647         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1649 2018-07-09  Martin Sebor  <msebor@redhat.com>
1651         PR middle-end/77357
1652         PR middle-end/86428
1653         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1654         accessing implicitly initialized array elements.
1655         * expr.c (string_constant): Handle string initializers of
1656         character arrays within aggregates.
1657         * gimple-fold.c (fold_array_ctor_reference): Add argument.
1658         Store element offset.  As a special case, handle zero size.
1659         (fold_nonarray_ctor_reference): Same.
1660         (fold_ctor_reference): Add argument.  Store subobject offset.
1661         * gimple-fold.h (fold_ctor_reference): Add argument.
1663 2018-07-09  Paul Koning  <ni1d@arrl.net>
1665         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1666         (pdp11_insn_cost): New function.
1667         (pdp11_md_asm_adjust): New function.
1668         (TARGET_INVALID_WITHIN_DOLOOP): Define.
1669         (pdp11_rtx_costs): Update to match machine better.
1670         (output_addr_const_pdp11): Correct format mismatch warnings.
1671         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1672         * config/pdp11/pdp11.md: General change to add base_cost and/or
1673         length attributes for use by new pdp11_insn_cost function.
1674         (MIN_BRANCH): Correct definition.
1675         (MIN_SOB): Ditto.
1676         (doloop_end): Use standard pattern name for looping pattern.
1677         (doloop_end_nocc): New.
1678         (movsf): Add another constraint alternative.
1679         (zero_extendqihi2): Add constraint alternatives for not in place
1680         extend.
1681         (zero_extendhisi2): Remove.
1682         (shift patterns): Add CC handling variants.
1683         (bswaphi2): New.
1684         (bswapsi2): New.
1685         (rothi3): New.
1686         (define_peephole2): New peephole to recognize mov that sets CC for
1687         subsequent test.
1689 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1691         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1692         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1693         wi::add.
1695 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
1697         PR c/86420
1698         * real.c (real_nextafter): Return true if result is denormal.
1700 2018-07-09  Martin Liska  <mliska@suse.cz>
1702         * common.opt: Add back wrongly removed attribute.
1704 2018-07-09  Richard Biener  <rguenther@suse.de>
1706         PR debug/86413
1707         * dwarf2out.c (gen_block_die): For an early generated DIE
1708         always output high/low PC attributes.
1710 2018-07-09  Tom de Vries  <tdevries@suse.de>
1712         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1713         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1714         onto VAR_DECL with abstract origin.
1716 2018-07-07  Jim Wilson  <jimw@sifive.com>
1718         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1720 2018-07-07  Tom de Vries  <tdevries@suse.de>
1722         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1724 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
1726         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1727         overflow_type.
1728         (combine_bound): Use wide-int overflow calculation instead of
1729         rolling our own.
1730         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1731         overflow_type.
1732         * fold-const.c (int_const_binop_2): Same.
1733         (extract_muldiv_1): Same.
1734         (fold_div_compare): Same.
1735         (fold_abs_const): Same.
1736         * match.pd: Same.
1737         * poly-int.h (add): Same.
1738         (sub): Same.
1739         (neg): Same.
1740         (mul): Same.
1741         * predict.c (predict_iv_comparison): Same.
1742         * profile-count.c (slow_safe_scale_64bit): Same.
1743         * simplify-rtx.c (simplify_const_binary_operation): Same.
1744         * tree-chrec.c (tree_fold_binomial): Same.
1745         * tree-data-ref.c (split_constant_offset_1): Same.
1746         * tree-if-conv.c (idx_within_array_bound): Same.
1747         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1748         * tree-ssa-phiopt.c (minmax_replacement): Same.
1749         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1750         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1751         * vr-values.c (vr_values::adjust_range_with_scev): Same.
1752         * wide-int.cc (wi::add_large): Same.
1753         (wi::mul_internal): Same.
1754         (wi::sub_large): Same.
1755         (wi::divmod_internal): Same.
1756         * wide-int.h: Change overflow type to overflow_type for neg, add,
1757         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1758         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1759         mul_internal, divmod_internal.
1760         (overflow_type): New enum.
1761         (accumulate_overflow): New.
1763 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
1765         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1766         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1768 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
1770         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1771         argument is checked for zero before entering loop, avoid checking again.
1773 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
1775         * gimplify.h (generic_expr_could_trap_p): Set as global function.
1776         * gimplify.h (generic_expr_could_trap_p): Likwise.
1777         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1779 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
1781         PR tree-optimization/86401
1782         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1783         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1784         (fold_bit_and_mask): ... here.  New helper function for match.pd.
1785         * fold-const.h (fold_bit_and_mask): Declare.
1786         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1788 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
1790         PR target/86324
1791         * target.def (translate_mode_attribute): New hook.
1792         * targhooks.h (default_translate_mode_attribute): Declare.
1793         * targhooks.c (default_translate_mode_attribute): New function.
1794         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1795         * doc/tm.texi: Regenerate.
1796         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1797         (rs6000_translate_mode_attribute): New function.
1799 2018-07-06  Paul Koning  <ni1d@arrl.net>
1801         * doc/md.texi (define_split): Document DONE and FAIL.
1802         (define_peephole2): Ditto.
1804 2018-07-05  Jeff Law  <law@redhat.com>
1806         PR tree-optimization/86010
1807         * tree-ssa-dse.c (compute_trims): More aggressively trim at
1808         both the head and tail of mem* and str* calls.
1810 2018-07-05  Jim Wilson  <jimw@sifive.com>
1812         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1814 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
1816         * config/aarch64/aarch64-simd.md: correct flags text for
1817         MIN_EXPR replacement.
1819 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
1821         * configure: Regenerated.
1823 2018-07-05  Carl Love  <cel@us.ibm.com>
1825         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1826         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1827         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1828         VSX_BUILTIN_DOUBLEL_V4SF.
1830 2018-07-05  Martin Sebor  <msebor@redhat.com>
1832         PR c++/86400
1833         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1834         than its domain to compute its the upper bound of a char array.
1836 2018-07-05  Nathan Sidwell  <nathan@acm.org>
1838         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1839         * doc/cpp.texi: Update comment.
1840         * doc/tm.texi: Rebuilt.
1841         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1842         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1843         * doc/extend.texi (Backwards Compatibility): Clarify it is system
1844         headers affected by extern "C".
1845         * system.h: Poison NO_IMPLICIT_EXTERN_C.
1846         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1847         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1848         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1849         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1850         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1851         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1852         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1853         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1854         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1855         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1856         config/sparc/sp64-elf.h, config/spu/spu.h,
1857         config/stormy16/stormy16.h, config/v850/v850.h,
1858         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1859         define NO_IMPLICIT_EXTERN_C.
1860         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1862 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1864         PR target/84711
1865         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1866         instead of GET_MODE_SIZE when comparing Units.
1868 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1870         PR target/84711
1871         * rtlanal.c (set_noop_p): Constrain on mode change,
1872         include hard-reg-set.h
1874 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1876         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1878 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
1880         Revert
1881         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1883         PR sanitizer/84250
1884         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1885         libasan.
1886         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1888 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1890         PR sanitizer/84250
1891         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1892         libasan.
1893         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1895 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
1897         PR middle-end/86380
1898         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1900 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
1902         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1903         neg_*_op* variables.
1905 2018-07-04  Martin Liska  <mliska@suse.cz>
1907         * tree-switch-conversion.c: Define
1908         max_ratio_for_speed and max_ratio_for_size constants.
1910 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
1911             Martin Liska  <mliska@suse.cz>
1913         PR middle-end/66240
1914         PR target/45996
1915         PR c/84100
1916         * common.opt: Rename align options with 'str_' prefix.
1917         * common/config/i386/i386-common.c (set_malign_value): New
1918         function.
1919         (ix86_handle_option): Use it to set -falign-* options/
1920         * config/aarch64/aarch64-protos.h (struct tune_params): Change
1921         type from int to string.
1922         * config/aarch64/aarch64.c: Update default values from int
1923         to string.
1924         * config/alpha/alpha.c (alpha_override_options_after_change):
1925         Likewise.
1926         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1927         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1928         max skip conditionally.
1929         * config/i386/freebsd.h (SUBALIGN_LOG): New.
1930         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1931         max skip conditionally.
1932         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1933         max skip conditionally.
1934         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1935         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1936         max skip conditionally.
1937         * config/i386/i386.c (struct ptt): Change type from int to
1938         string.
1939         (ix86_default_align): Set default values.
1940         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1941         max skip conditionally.
1942         * config/i386/iamcu.h (SUBALIGN_LOG): New.
1943         (ASM_OUTPUT_MAX_SKIP_ALIGN):
1944         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1945         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1946         max skip conditionally.
1947         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1948         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1949         * config/i386/x86-64.h (SUBALIGN_LOG): New.
1950         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1951         max skip conditionally.
1952         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1953         * config/ia64/ia64.c (ia64_option_override): Set default values
1954         for alignment options.
1955         * config/m68k/m68k.c: Handle new str_align_* options.
1956         * config/mips/mips.c (mips_set_compression_mode): Change
1957         type of constants.
1958         (mips_option_override): Set default values for options.
1959         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1960         Likewise.
1961         * config/rs6000/rs6000.c (rs6000_option_override_internal):
1962         Likewise.
1963         * config/rx/rx.c (rx_option_override): Likewise.
1964         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1965         (LABEL_ALIGN): Use align_labels_log.
1966         (LOOP_ALIGN): Use align_loops_align.
1967         * config/s390/s390.c (s390_asm_output_function_label): Use new
1968         macros.
1969         * config/sh/sh.c (sh_override_options_after_change):
1970         Change type of constants.
1971         * config/spu/spu.c (spu_sched_init): Likewise.
1972         * config/sparc/sparc.c (sparc_option_override): Set default
1973         values for options.
1974         * config/visium/visium.c (visium_option_override): Likewise.
1975         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1976         emit p2align format with last argument if it's not needed.
1977         * doc/invoke.texi: Document extended format of -falign-*.
1978         * final.c: Use align_labels alignment.
1979         * flags.h (struct target_flag_state): Change type to use
1980         align_flags.
1981         (struct align_flags_tuple): New.
1982         (struct align_flags): Likewise.
1983         (align_loops_log): Redefine macro to use new types.
1984         (align_loops_max_skip): Redefine macro to use new types.
1985         (align_jumps_log): Redefine macro to use new types.
1986         (align_jumps_max_skip): Redefine macro to use new types.
1987         (align_labels_log): Redefine macro to use new types.
1988         (align_labels_max_skip): Redefine macro to use new types.
1989         (align_functions_log): Redefine macro to use new types.
1990         (align_loops): Redefine macro to use new types.
1991         (align_jumps): Redefine macro to use new types.
1992         (align_labels): Redefine macro to use new types.
1993         (align_functions): Redefine macro to use new types.
1994         (align_functions_max_skip): Redefine macro to use new types.
1995         (align_loops_value): New macro.
1996         (align_jumps_value): New macro.
1997         (align_labels_value): New macro.
1998         (align_functions_value): New macro.
1999         * function.c (invoke_set_current_function_hook): Propagate
2000         alignment values from flags to global variables default in
2001         topleev.h.
2002         * ipa-icf.c (sem_function::equals_wpa): Use
2003         cl_optimization_option_eq instead of memcmp.
2004         * lto-streamer.h (cl_optimization_stream_out): Support streaming
2005         of string types.
2006         (cl_optimization_stream_in): Likewise.
2007         * optc-save-gen.awk: Support strings in cl_optimization.
2008         * opth-gen.awk: Likewise.
2009         * opts.c (finish_options): Remove error checking of invalid
2010         value ranges.
2011         (MAX_CODE_ALIGN): Remove.
2012         (MAX_CODE_ALIGN_VALUE): Likewise.
2013         (parse_and_check_align_values): New function.
2014         (check_alignment_argument): Likewise.
2015         (common_handle_option): Use check_alignment_argument.
2016         * opts.h (parse_and_check_align_values): Declare.
2017         * toplev.c (init_alignments): Remove.
2018         (read_log_maxskip): New.
2019         (parse_N_M): Likewise.
2020         (parse_alignment_opts): Likewise.
2021         (backend_init_target): Remove usage of init_alignments.
2022         * toplev.h (parse_alignment_opts): Declare.
2023         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2024         argument.
2025         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2026         * tree.c (cl_option_hasher::equal): New.
2027         * varasm.c: Use new global macros.
2029 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
2031         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2032         Use a simpler align directive also if MAXSKIP = ALIGN-1.
2033         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2034         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2035         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2036         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2037         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2038         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2039         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2040         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2041         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2042         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2043         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2045 2018-07-04  Martin Liska  <mliska@suse.cz>
2046             Jonathan Wakely  <jwakely@redhat.com>
2048         * coverage.c: Use correct type.
2049         * doc/invoke.texi: Language correction.
2051 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
2053         PR target/85620
2054         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2055         ENDBRANCH for non-tail call which may return via indirect branch.
2056         * doc/extend.texi: Document indirect_return attribute.
2058 2018-07-03  Martin Sebor  <msebor@redhat.com>
2060         PR tree-optimization/86274
2061         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2062         precondition.
2063         (format_floating): Correct handling of infinities and NaNs.
2065 2018-07-03  Martin Sebor  <msebor@redhat.com>
2067         * print-tree.c (print_real_cst): New function.
2068         (print_node_brief): Call it.
2069         (print_node): Ditto.
2071 2018-07-03  Jeff Law  <law@redhat.com>
2073         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2074         into a single pattern.
2076         * config/h8300/h8300.md (ors code_iterator): New.
2077         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2078         a single pattern and single splitter.
2079         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2080         (iorqi3_1, xorqi3_1): Likewise.
2081         (iorqi3, xorqi3 expanders): Similarly.
2083         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2084         (movmd_internal) into a single pattern using the P mode iterator.
2085         (movmd splitters): Similarly.
2086         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2087         (movsd splitters): Similarly.
2089         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2090         ADDB, ADDW and ADDL into a single ADD attribute which selects the
2091         right table based on the size of the operand.
2092         * config/h8300/h8300.md (length_table): Corresponding changes. All
2093         references to "addb", "addw" and "addl" changed to "add".
2094         (btst patterns): Merge two variants into a single pattern.
2095         (tstqi, tsthi): Likewise.
2096         (addhi3_incdec, addsi3_incdec): Likewise.
2097         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2098         (mulhi3, mulsi3): Likewise.
2099         (udivhi3, udivsi3): Likewise.
2100         (divhi3, divsi3): Likewise.
2101         (andorqi3, andorhi3, andorsi3): Likewise.
2103 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
2105         PR target/85694
2106         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2107         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2109 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2111         PR tree-optimization/85694
2112         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2113         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2114         UNSPEC_URHADD.
2115         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2116         (<u>avg<mode>3_ceil): New patterns.
2118 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
2120         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2121         scan-tree-dump directive.
2122         * gcc.dg/vect/slp-perm-2.c: Likewise.
2123         * gcc.dg/vect/slp-perm-3.c: Likewise.
2124         * gcc.dg/vect/slp-perm-5.c: Likewise.
2125         * gcc.dg/vect/slp-perm-6.c: Likewise.
2126         * gcc.dg/vect/slp-perm-7.c: Likewise.
2127         * gcc.dg/vect/slp-perm-8.c: Likewise.
2129 2018-07-03  Marek Polacek  <polacek@redhat.com>
2131         PR middle-end/86202
2132         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2134 2018-07-03  Richard Biener  <rguenther@suse.de>
2136         PR ipa/86389
2137         * tree-ssa-structalias.c (find_func_clobbers): Properly
2138         handle indirect calls.
2140 2018-07-03  Jeff Law  <law@redhat.com>
2142         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2143         (shifts): New code iterator.
2144         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2145         expander.  Fix HImode handling on H8/SX.
2146         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2147         (subqi3, subhi3, subsi3 expanders): Likewise.
2148         (andqi3, andhi3, andsi3 expanders): Likewise.
2149         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2150         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2151         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2152         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2153         (zero_extendqihi2, zero_extendqisi2): Likewise.
2154         (extendqihi2, extendqisi2): Likewise.
2155         (rotlqi3, rotlhi3, rotlsi3): Likewise.
2156         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2157         (rotlqi3_1, rotlhi3_1): Likewise.
2158         (logicalhi3_sn, logicalsi3_sn): Likewise.
2159         (logicalhi3, logicalsi3): Likewise.
2161 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2163         * tree-vect-patterns.c (vect_recog_rotate_pattern)
2164         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2165         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2166         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2167         type to append_pattern_def_seq instead of creating a stmt_vec_info
2168         directly.
2169         (build_mask_conversion): Likewise.  Remove vinfo argument.
2170         (vect_add_conversion_to_patterm): Likewise, renaming to...
2171         (vect_add_conversion_to_pattern): ...this.
2172         (vect_recog_mask_conversion_pattern): Update call to
2173         build_mask_conversion.  Pass the vector type to
2174         append_pattern_def_seq here too.
2175         (vect_recog_gather_scatter_pattern): Update call to
2176         vect_add_conversion_to_pattern.
2178 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2180         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2181         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2182         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2183         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2184         STMT_VINFO_PATTERN_DEF_SEQ to null here.
2185         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2186         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2187         append_pattern_def_seq instead of new_pattern_def_seq.
2188         (vect_recog_divmod_pattern): Do both of the above.
2189         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2190         is null.
2192 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2194         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2195         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2196         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2197         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2198         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2199         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2200         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2201         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2202         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2203         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2204         parameter with a single stmt_vec_info.
2205         (vect_recog_func_ptr): Likewise.
2206         (vect_recog_gather_scatter_pattern): Likewise, folding in...
2207         (vect_try_gather_scatter_pattern): ...this.
2208         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2209         the stmt_vec_info of the statement to be matched.  Don't clear
2210         STMT_VINFO_RELATED_STMT.
2211         (vect_pattern_recog): Update call accordingly.
2213 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2215         PR tree-optimization/85694
2216         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2217         (uavgM3_ceil): Document new optabs.
2218         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2219         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2220         functions.
2221         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2222         (savg_ceil_optab): New optabs.
2223         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2224         (vect_vect_recog_func_ptrs): Add it.
2225         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2226         constant directly from the associated lhs.
2228 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2230         * tree-vect-patterns.c (vect_split_statement): New function.
2231         (vect_convert_input): Use it to try to split an existing cast.
2233 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2235         * poly-int.h (print_hex): New function.
2236         * dumpfile.h (dump_dec, dump_hex): Declare.
2237         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
2238         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
2239         min_input_precision, operation_precision and operation_sign.
2240         * tree-vect-patterns.c (vect_get_range_info): New function.
2241         (vect_same_loop_or_bb_p, vect_single_imm_use)
2242         (vect_operation_fits_smaller_type): Delete.
2243         (vect_look_through_possible_promotion): Add an optional
2244         single_use_p parameter.
2245         (vect_recog_over_widening_pattern): Rewrite to use new
2246         stmt_vec_info infomration.  Handle one operation at a time.
2247         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
2248         (vect_truncatable_operation_p, vect_set_operation_type)
2249         (vect_set_min_input_precision): New functions.
2250         (vect_determine_min_output_precision_1): Likewise.
2251         (vect_determine_min_output_precision): Likewise.
2252         (vect_determine_precisions_from_range): Likewise.
2253         (vect_determine_precisions_from_users): Likewise.
2254         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
2255         (vect_vect_recog_func_ptrs): Put over_widening first.
2256         Add cast_forwprop.
2257         (vect_pattern_recog): Call vect_determine_precisions.
2259 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2261         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
2262         statements that have been replaced by further pattern statements.
2263         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
2265 2018-07-03  Richard Biener  <rguenther@suse.de>
2267         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
2268         always set *dt.  Dump vectype in vectype overload.
2269         * dumpfile.h (dump_gimple_expr): New function.
2270         (dump_gimple_expr_loc): Likewise.
2271         * dumpfile.c (dump_gimple_expr): New function.
2272         (dump_gimple_expr_loc): Likewise.
2274 2018-07-02  Jeff Law  <law@redhat.com>
2276         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
2277         the H8/300, H8/300H and H8/S variants into a single pattern.
2278         (movhi_h8300, movqi_h8300hs): Similarly.
2279         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
2280         (QHI mode iterator): New.
2282         * config/h8300/h8300.md: Remove trailing whitespace.
2284 2018-07-02  Jim Wilson  <jimw@sifive.com>
2286         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
2287         instead of emit_insn for interrupt returns.
2288         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
2289         (riscv_sret, riscv_uret): Likewise.
2291 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2293         * pretty-print.c (selftest::test_pp_format): Move save and restore
2294         of quotes to class auto_fix_quotes, and add an instance.
2295         * selftest.c: Include "intl.h".
2296         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
2297         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
2298         * selftest.h (selftest::auto_fix_quotes): New class.
2300 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
2302         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
2303         (aarch64_sve_prepare_conditional_op): Remove.
2304         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
2305         Allow aarch64_simd_reg_or_zero as select operand; remove
2306         the aarch64_sve_prepare_conditional_op call.
2307         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
2308         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2309         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
2310         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
2311         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
2312         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
2313         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
2314         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2315         and a splitters to match all of the *_any patterns.
2316         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2318         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2319         (SVE_COND_FP_BINARY_REV): Remove.
2320         (sve_int_op_rev, sve_fp_op_rev): New.
2321         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2322         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2323         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2324         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2325         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2326         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2327         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2328         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2329         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2331         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2332         Remove match_dup 1 from the inner unspec.
2333         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2335         * config/aarch64/aarch64.md (movprfx): New attr.
2336         (length): Default movprfx to 8.
2337         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2338         (*madd<SVE_I>, *msub<SVE_I): Likewise.
2339         (*<su>mul<SVE_I>3_highpart): Likewise.
2340         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2341         (*v<ASHIFT><SVE_I>3): Likewise.
2342         (*<su><MAXMIN><SVE_I>3): Likewise.
2343         (*<su><MAXMIN><SVE_F>3): Likewise.
2344         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2345         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2346         (*div<SVE_F>4): Likewise.
2348 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
2350         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2351         in dump string.
2353 2018-07-02  Richard Biener  <rguenther@suse.de>
2355         PR tree-optimization/86363
2356         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2357         memset argument refers to a non-variable address.
2359 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2361         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2362         {PLUS,MINUS}_EXPR code to...
2363         (adjust_symbolic_bound): ...here,
2364         (combine_bound): ...here,
2365         (set_value_range_with_overflow): ...and here.
2367 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2369         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2370         code...
2371         (extract_range_from_abs_expr): ...here.
2373 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
2375         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2376         -fno-omit-frame-pointer when not optimizing.
2378 2018-07-02  Martin Liska  <mliska@suse.cz>
2380         PR ipa/86279
2381         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2382         (propagate_nothrow): Likewise.
2384 2018-07-02  Martin Liska  <mliska@suse.cz>
2386         PR ipa/86323
2387         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2389 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2391         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2392         function in r262149, changing "loc" param from source_location to
2393         const dump_location_t &.
2394         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2395         declaration, as above.
2397 2018-07-01  Paul Koning  <ni1d@arrl.net>
2399         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2400         -munit-asm, -mgnu-asm, -mdec-asm.
2401         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2402         (pdp11_output_labelref): New.
2403         (pdp11_output_def): New.
2404         (pdp11_output_addr_vec_elt): New.
2405         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
2406         %# and %@ format codes.
2407         (pdp11_option_override): New.
2408         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2409         (pdp11_output_ident): New.
2410         (pdp11_asm_named_section): New.
2411         (pdp11_asm_init_sections): New.
2412         (pdp11_file_start): New.
2413         (pdp11_file_end): New.
2414         (output_ascii): Use .ascii/.asciz for -mdec-asm.
2415         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
2416         %o, like %c but octal.
2417         (pdp11_option_override): New.
2418         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2419         -mdec-asm.
2420         (DATA_SECTION_ASM_OP): Ditto.
2421         (READONLY_DATA_SECTION_ASM_OP): New.
2422         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2423         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2424         (ASM_OUTPUT_LABELREF): Ditto.
2425         (ASM_OUTPUT_DEF): Ditto.
2426         (ASM_OUTPUT_EXTERNAL): New.
2427         (ASM_OUTPUT_SOURCE_FILENAME): New.
2428         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2429         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2430         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
2431         %# and %@ format codes.
2432         * config/pdp11/pdp11.opt (mgnu-asm): New.
2433         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2434         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2435         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2437 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
2439         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2440         dereferencing path[] beyond its length.
2441         (debug_path): New.
2442         (debug_all_paths): New.
2443         (rewire_first_differing_edge): New.
2444         (adjust_paths_after_duplication): New.
2445         (duplicate_thread_path): Call adjust_paths_after_duplication.
2446         Add new argument.
2447         (thread_through_all_blocks): Add new argument to
2448         duplicate_thread_path.
2450 2018-06-30  Jim Wilson  <jimw@sifive.com>
2452         * config/riscv/predicates.md (p2m1_shift_operand): New.
2453         (high_mask_shift_operand): New.
2454         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2455         pattern using p2m1_shift_operand.
2456         (lshsi3_zero_extend_3+2): New combiner pattern using
2457         high_mask_shift_operand.
2459 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2461         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2462         split out from...
2463         (vect_recog_rotate_pattern): ...here.
2464         (vect_convert_input): Try to insert casts of invariants in the
2465         preheader.
2466         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2467         preheader to be empty.
2469 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2471         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2472         vector type.  If given, install it in the new statement's
2473         STMT_VINFO_VECTYPE.
2474         (vect_element_precision): New function.
2475         (vect_unpromoted_value): New struct.
2476         (vect_unpromoted_value::vect_unpromoted_value): New function.
2477         (vect_unpromoted_value::set_op): Likewise.
2478         (vect_look_through_possible_promotion): Likewise.
2479         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2480         (vect_widened_op_tree, vect_convert_input): Likewise.
2481         (vect_convert_inputs, vect_convert_output): Likewise.
2482         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2483         to handle the optional cast of the multiplication result and
2484         vect_widened_op_tree to detect the widened multiplication itself.
2485         Do not require the input and output of promotion casts to have
2486         the same sign, but base the signedness of the operation on the
2487         input rather than the result.  If the pattern includes two
2488         promotions, check that those promotions have the same sign.
2489         Do not restrict the MULT_EXPR handling to a double-width result;
2490         handle quadruple-width results and wider.  Use vect_convert_inputs
2491         to convert the inputs to the common type.
2492         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
2493         to handle the optional cast of the ABS result.  Also allow a sign
2494         change or a sign extension between the ABS and MINUS.
2495         Use vect_widened_op_tree to detect the widened subtraction and use
2496         vect_convert_inputs to convert the inputs to the common type.
2497         (vect_handle_widen_op_by_const): Delete.
2498         (vect_recog_widen_op_pattern): New function.
2499         (vect_recog_widen_mult_pattern): Use it.
2500         (vect_recog_widen_shift_pattern): Likewise.
2501         (vect_recog_widen_sum_pattern): Use
2502         vect_look_through_possible_promotion to handle the promoted
2503         PLUS_EXPR operand.
2505 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2507         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2508         the containing gimple_seq *.
2509         * gimple-iterator.h (gsi_for_stmt): Declare it.
2510         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2511         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2512         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2513         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2514         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2515         checks.
2516         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2517         split out from...
2518         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
2519         statement being replaced is part of an existing pattern
2520         definition sequence, inserting the new pattern statements before
2521         the original one.
2522         (vect_pattern_recog_1): Don't return a bool.  If the statement
2523         is already part of a pattern, instead apply pattern matching
2524         to the pattern definition statements.  Don't clear the
2525         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2526         (vect_pattern_recog): Don't break after the first match;
2527         continue processing the pattern definition statements instead.
2528         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2530 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2532         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2533         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2534         (vect_recog_widen_sum_pattern): Use it.
2536 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2538         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2539         phi is not a pattern statement and has not been replaced by
2540         a pattern statement.
2541         * tree-vect-patterns.c (type_conversion_p): Don't check
2542         STMT_VINFO_IN_PATTERN_P.
2543         (vect_recog_vector_vector_shift_pattern): Likewise.
2544         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2545         the pattern statement rather than the original statement; check
2546         directly for a WIDEN_MULT_EXPR here.
2547         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2548         vect_is_simple_use to return the pattern statement rather
2549         than the original statement; use is_pattern_stmt_p to check
2550         for such a pattern statement.
2551         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2552         to return the pattern statement rather than the original statement;
2553         don't do the same transformation here.
2554         (vect_is_simple_use): If the defining statement has been replaced
2555         by a pattern statement, return the pattern statement instead.
2556         Remove the corresponding (local) transformation from the vectype
2557         overload.
2559 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2561         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2562         end and default to null.
2563         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2564         (vectorizable_reduction): Update calls accordingly, dropping the
2565         gimple ** argument if the passed-back statement isn't needed.
2566         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2567         (vect_recog_rotate_pattern): Likewise.
2568         (vect_recog_mask_conversion_pattern): Likewise.
2569         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2570         (vect_mask_constant_operand_p): Likewise.
2571         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2572         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2573         (get_group_load_store_type, get_load_store_type): Likewise.
2574         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2575         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2576         (vectorizable_conversion, vectorizable_assignment): Likewise.
2577         (vectorizable_shift, vectorizable_operation): Likewise.
2578         (vectorizable_store, vect_is_simple_cond): Likewise.
2579         (vectorizable_condition, vectorizable_comparison): Likewise.
2580         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2581         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2582         and move it to the end.  Cope with null def_stmt_outs.
2584 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2586         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2588 2018-06-29  Jeff Law  <law@redhat.com>
2590         * config/v850/v850.c (v850_legitimate_address_p): Handle large
2591         displacements for TARGET_V850E2V3 and newer.
2592         (TARGET_LRA_P): Remove.  Defaults to LRA now.
2593         * config/v850/v850.md (sign23byte_load): Remove.
2594         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2595         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2597 2018-06-29  Martin Liska  <mliska@suse.cz>
2599         PR lto/85759
2600         * coverage.c (coverage_init): Mangle full path name.
2601         * doc/invoke.texi: Document the change.
2602         * gcov-io.c (mangle_path): New.
2603         * gcov-io.h (mangle_path): Likewise.
2604         * gcov.c (mangle_name): Use mangle_path for path mangling.
2606 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2608         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2609         if starting source register is not even.
2611 2018-06-29  Martin Liska  <mliska@suse.cz>
2613         PR tree-optimization/86263
2614         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2615         Make edge redirection.
2617 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
2619         * dumpfile.c (dump_loc): Add indentation based on scope depth.
2620         (dump_scope_depth): New variable.
2621         (get_dump_scope_depth): New function.
2622         (dump_begin_scope): New function.
2623         (dump_end_scope): New function.
2624         * dumpfile.h (get_dump_scope_depth): New declaration.
2625         (dump_begin_scope): New declaration.
2626         (dump_end_scope): New declaration.
2627         (class auto_dump_scope): New class.
2628         (AUTO_DUMP_SCOPE): New macro.
2629         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2630         AUTO_DUMP_SCOPE.
2632 2018-06-29  Richard Biener  <rguenther@suse.de>
2634         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2635         compute_all_dependences succeeds.
2636         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2637         exceed --param loop-max-datarefs-for-datadeps.
2639 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
2641         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2643 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
2645         PR target/86348
2646         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2647         alternative 0 in preferred_for_speed attribute.
2649 2018-06-28  Paul Koning  <ni1d@arrl.net>
2651         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2652         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2653         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2654         * config/pdp11/pdp11.md: Correct "length" attribute calculation
2655         for shift insn patterns.
2657 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
2659         * cgraph.c (cgraph_node::get_body): Replace assignments to
2660         "dump_file" with calls to set_dump_file.
2661         * dumpfile.c (alt_dump_file): Make static, and group with...
2662         (alt_flags): ...this definition.
2663         (dumps_are_enabled): New variable.
2664         (refresh_dumps_are_enabled): New function.
2665         (set_dump_file): New function.
2666         (set_alt_dump_file): New function.
2667         (gcc::dump_manager::dump_start): Replace assignments to
2668         "dump_file" and "alt_dump_file" with calls to set_dump_file and
2669         set_alt_dump_file.
2670         (gcc::dump_manager::dump_finish): Likewise.
2671         * dumpfile.h (alt_dump_file): Delete decl.
2672         (dumps_are_enabled): New variable decl.
2673         (set_dump_file): New function decl.
2674         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2675         global.
2676         * tree-nested.c (lower_nested_functions): Replace assignments to
2677         "dump_file" with calls to set_dump_file.
2679 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
2681         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2682         goto_locus of each outgoing edge of each basic block.
2684 2018-06-28  Richard Biener  <rguenther@suse.de>
2686         * dwarf2out.c (decl_scope_table): Remove.
2687         (push_decl_scope): Likewise.
2688         (pop_decl_scope): Likewise.
2689         (gen_type_die_for_member): Do not call push/pop_decl_scope.
2690         (gen_struct_or_union_type_die): Likewise.
2691         (gen_tagged_type_die): Likewise.
2692         (dwarf2out_init): Do not initialize decl_scope_table.
2693         (dwarf2out_c_finalize): Do not free it.
2695 2018-06-28  Richard Biener  <rguenther@suse.de>
2697         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2698         deciding whether to not re-use a DIE.
2700 2018-06-28  Richard Biener  <rguenther@suse.de>
2702         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2703         DW_AT_abstract_origin attribute.
2705 2018-06-28  Martin Liska  <mliska@suse.cz>
2707         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2708         Use newly introduced constants.
2709         * tree-switch-conversion.h (struct jump_table_cluster):
2710         Define max_ratio_for_size and max_ratio_for_speed.
2712 2018-06-28  Martin Liska  <mliska@suse.cz>
2714         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2715         Add new checking assert to catch invalid state.
2716         (jump_table_cluster::can_be_handled): Handle single case
2717         clusters.
2718         (jump_table_cluster::is_beneficial): Bail out for such case.
2719         (bit_test_cluster::find_bit_tests):
2720         Add new checking assert to catch invalid state.
2721         (bit_test_cluster::can_be_handled): Handle single case
2722         clusters.
2723         (bit_test_cluster::is_beneficial): Bail out for such case.
2724         (switch_decision_tree::analyze_switch_statement):
2725         Fix comment.
2727 2018-06-28  Martin Liska  <mliska@suse.cz>
2729         * common.opt: Introduce -completion option.
2730         * gcc.c (driver_handle_option): Handle it.
2731         (driver::main): Print completions if completion
2732         is set.
2733         * opt-suggestions.c (option_proposer::get_completions):
2734         New function.
2735         (option_proposer::suggest_completion): Likewise.
2736         (option_proposer::find_param_completions): Likewise.
2737         (verify_autocompletions): Likewise.
2738         (test_completion_valid_options): Likewise.
2739         (test_completion_valid_params): Likewise.
2740         (in_completion_p): Likewise.
2741         (empty_completion_p): Likewise.
2742         (test_completion_partial_match): Likewise.
2743         (test_completion_garbage): Likewise.
2744         (opt_proposer_c_tests): Likewise.
2745         * opt-suggestions.h: Declare new functions.
2746         * opts.c (common_handle_option): Handle OPT__completion_.
2747         * selftest-run-tests.c (selftest::run_tests): Add
2748         opt_proposer_c_tests.
2749         * selftest.c (assert_str_startswith): New.
2750         * selftest.h (assert_str_startswith): Likewise.
2751         (opt_proposer_c_tests): New.
2752         (ASSERT_STR_STARTSWITH): Likewise.
2754 2018-06-28  Martin Liska  <mliska@suse.cz>
2756         * Makefile.in: Add opt-suggestions.o.
2757         * gcc-main.c: Include opt-suggestions.h.
2758         * gcc.c (driver::driver): Likewise.
2759         (driver::~driver): Remove m_option_suggestions.
2760         (driver::build_option_suggestions): Moved to option_proposer.
2761         (driver::suggest_option): Likewise.
2762         (driver::handle_unrecognized_options): Use option_proposer.
2763         * gcc.h (class driver): Add new memver m_option_proposer.
2764         * opt-suggestions.c: New file.
2765         * opt-suggestions.h: New file.
2767 2018-06-28  Martin Liska  <mliska@suse.cz>
2769         * vec.h (class auto_string_vec): New (moved from auto_argvec).
2770         (auto_string_vec::~auto_string_vec): Likewise.
2772 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
2774         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2775         prevent_decl_creation_for_types fields up and add reset_location field.
2776         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2777         statement if id->reset_location is true.
2778         (copy_edges_for_bb): Do not set goto_locus on the new edges if
2779         id->reset_location is true.
2780         (copy_phis_for_bb): Force input_location on the arguments if
2781         id->reset_location is true.
2782         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2783         is set on the function to be inlined.
2785 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
2787         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2789 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
2791         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2792         registers for Pmode.
2793         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2794         hard registers for the clobbered pseudo.
2796 2018-06-27  Paul Koning  <ni1d@arrl.net>
2798         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2799         mutually exclusive options.
2800         * config/pdp11/constraints.md (h): New constraint.
2801         (O): Update definition to match shift code generation.
2802         (D): New constraint.
2803         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2804         (CCFP): Remove.
2805         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2806         function.
2807         (output_jump): Change arguments.
2808         (pdp11_fixed_cc_regs): New function.
2809         (pdp11_cc_mode): Ditto.
2810         (pdp11_expand_shift): Ditto.
2811         (pdp11_assemble_shift): Ditto.
2812         (pdp11_small_shift): Ditto.
2813         (pdp11_branch_cost): Remove.
2814         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2815         from output.
2816         (pdp11_register_move_cost): Update for CC registers.
2817         (pdp11_rtx_costs): Add case for LSHIFTRT.
2818         (pdp11_output_jump): Add CCNZ mode conditional branches.
2819         (notice_update_cc_on_set): Remove.
2820         (pdp11_cc_mode): New function.
2821         (simple_memory_operand): Correct pre/post decrement case.
2822         (no_side_effect_operand): New function.
2823         (pdp11_regno_reg_class): Add CC_REGS class.
2824         (pdp11_fixed_cc_regs): New function.
2825         (pdp11_small_shift): New function.
2826         (pdp11_expand_shift): New function to expand shift insns.
2827         (pdp11_assemble_shift): New function to output shifts.
2828         (pdp11_branch_cost): Remove.
2829         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2830         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2831         (WCHAR_TYPE): Ditto.
2832         (PTRDIFF_TYPE): Ditto.
2833         (ADJUST_INSN_LENGTH): New macro.
2834         (FIXED_REGISTERS): Add CC registers.
2835         (CALL_USED_REGISTERS): Ditto.
2836         (reg_class): Ditto.
2837         (REG_CLASS_NAMES): Ditto.
2838         (REG_CLASS_CONTENTS): Ditto.
2839         (SELECT_CC_MODE): Use new function.
2840         (TARGET_FLAGS_REGNUM): New macro.
2841         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2842         (cc0_reg_rtx): Remove.
2843         (CC_STATUS_MDEP): Remove.
2844         (CC_STATUS_MDEFP_INIT): Remove.
2845         (CC_IN_FPU): Remove.
2846         (NOTICE_UPDATE_CC): Remove.
2847         (REGISTER_NAMES): Add CC registers.
2848         (BRANCH_COST): Change to constant 1.
2849         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2850         handling.
2851         * config/pdp11/pdp11.opt (mbcopy): Remove.
2852         (mbcopy-builtin): Remove.
2853         (mbranch-cheap): Remove.
2854         (mbranch-expensive): Remove.
2855         * config/pdp11/predicates.md (expand_shift_operand): Update to
2856         match shift code generation.
2857         (ccnz_operator): New predicate.
2858         * doc/invoke.texi (PDP-11 Options): Remove deleted options
2859         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2860         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
2861         exclusive options.
2862         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
2863         description of O constraint.
2865 2018-06-27  Jeff Law  <law@redhat.com>
2866             Austin Law  <austinklaw@gmail.com>
2868         * config/v850/v850.md (addsi3_set_flags): New pattern.
2869         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2870         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2871         (zero_extendhisi2_v850_set_flags): Likewise.
2872         (zero_extendqisi2_v850_set_flags): Likewise.
2873         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2874         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2875         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2877         * config/v850/v850-protos.h (notice_update_cc): Remove.
2878         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2879         (v850_print_operand): Handle 'D' and "d".
2880         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2881         Add handling of arithmetic/logical operations compared against zero.
2882         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2883         Do not look at v850_compare_op, instead get mode from last argument.
2884         (v850_gen_compare): Remove
2885         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2886         after reload for prologue insns.
2887         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2888         patterns.
2889         (construct_save_jarl): Likewise.
2890         (TARGET_FLAGS_REGNUM): Define.
2891         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2892         (NOTICE_UPDATE_CC): Remove.
2893         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2894         than cc0.  Conditionalize on reload_completed.
2895         (cmpsi_insn, setfcc_insn): Likewise.
2896         (tst1 splitter): Turn into define_and_split which sets the flags
2897         after reload.
2898         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2899         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2900         (cstoresf4, cstoredf4): Clobber the flags.
2901         (cmpsi, cmpsf, cmpdf): Remove expanders.
2902         (setf_insn): Remove pattern.
2903         (addsi3): Turn into define_and_split which clobbers the flags after
2904         reload and a suitable pattern (addsi3_clobber_flags) for use after
2905         reload.
2906         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2907         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2908         (ashrsi3, ashrsi3_v850e2): Likewise.
2909         (bins): Clobber the flags.
2910         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2911         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2912         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2913         (call_value_internal_short, call_value_internal_long): Likewise.
2914         (callt_save_interrupt, callt_return_interrupt): Likewise.
2915         (save_interrupt, return_interrupt): Likewise.
2916         (callt_save_all_interrupt, save_all_interrupt): Likewise.
2917         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2918         (restore_all_interrupt, _restore_all_interrupt): Likewise.
2919         (All FP comparisons): Only allow after reload has completed.
2920         (trfsr): Likewise.
2921         (divh, divhu): Tweak output template.
2922         (branch_z_normal, branch_z_invert): Remove
2923         (branch_nz_normal, branch_nz_invert): Likewise.
2924         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2926         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2927         * config/v850/v850.c (notice_update_cc): Remove.
2928         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
2929         (CC_NO_CARRY): Likewise.
2930         (NOTICE_UPDATE_CC): Define to nothing.
2931         * config/v850/v850.md: Remove block comment on cc0 handling
2932         Remove "cc" attribute from all patterns.  Remove cc_status handling
2933         from all patterns.  Minor formatting fixes.
2935 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2937         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2938         (cortex-a76.cortex-a55): Likewise.
2939         * config/aarch64/aarch64-tune.md: Regenerate.
2940         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2941         cortex-a76.cortex-a55.
2943 2018-06-27  Jeff Law  <law@redhat.com>
2945         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2946         (MULTILIB_DIRNAMES): Similarly.
2948 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
2950         * gimple.h (gimple_return_retbnd): Delete.
2951         (gimple_return_set_retbnd): Likewise.
2952         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2953         gimple_return_set_retbnd.
2954         * gimple-pretty-print.c (dump_gimple_return): Remove call to
2955         gimple_return_retbnd and adjust.
2956         * tree-inline.h (struct copy_body_data): Remove retbnd field.
2957         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2958         Explicitly return NULL in a couple more cases.  Move assertion
2959         on debug statements and remove unreachable code.
2960         (reset_debug_binding): Do not test id->retbnd.
2961         (expand_call_inline): Do not set it.
2963 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2965         * configure.ac: Add --disable-gcov option.
2966         * configure: Regenerate.
2967         * Makefile.in: Honour @enable_gcov@.
2968         * doc/install.texi: Document --disable-gcov.
2970 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2972         * config/arm/arm-cpus.in (cortex-a76): New entry.
2973         (cortex-a76.cortex-a55): Likewise.
2974         * config/arm/arm-tables.opt: Regenerate.
2975         * config/arm/arm-tune.md: Likewise.
2976         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2977         * doc/invoke.texi (ARM Options): Document cortex-a76 and
2978         cortex-a76.cortex-a55.
2980 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
2982         PR target/85769
2983         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2985 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2987         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2988         comment.
2989         (EPILOGUE_USES): Likewise.
2991 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
2993         * tree-inline.c (remap_location): New function extracted from...
2994         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
2995         (copy_phis_for_bb): ...here.  Call remap_location.
2996         (copy_cfg_body): Adjust call to copy_edges_for_bb.
2998 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
3000         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3001         unaligned vsx for 16B memset.
3003 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
3005         PR target/86285
3006         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3007         ieee128_float_type_node to long_double_type_node unless
3008         TARGET_LONG_DOUBLE_128 is set.
3010 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
3012         * cfgloop.c (get_loop_location): Convert return type from
3013         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3014         by implicit construction from rtx_insn *, and using
3015         dump_user_location_t::from_function_decl for the fallback case.
3016         * cfgloop.h (get_loop_location): Convert return type from
3017         location_t to dump_user_location_t.
3018         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3019         dump_printf_loc to pass in a dump_location_t rather than a
3020         location_t, via the gimple stmt.
3021         * coverage.c (get_coverage_counts): Update calls to
3022         dump_printf_loc to pass in dump_location_t rather than a
3023         location_t.
3024         * doc/optinfo.texi (Dump types): Convert example of
3025         dump_printf_loc from taking "locus" to taking "insn".  Update
3026         description of the "_loc" calls to cover dump_location_t.
3027         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3028         "selftest.h".
3029         (dump_user_location_t::dump_user_location_t): New constructors,
3030         from gimple *stmt and rtx_insn *.
3031         (dump_user_location_t::from_function_decl): New function.
3032         (dump_loc): Make static.
3033         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3034         const dump_location_t &.
3035         (dump_generic_expr_loc): Delete.
3036         (dump_printf_loc): Convert param "loc" from location_t to
3037         const dump_location_t &.
3038         (selftest::test_impl_location): New function.
3039         (selftest::dumpfile_c_tests): New function.
3040         * dumpfile.h: Include "profile-count.h".
3041         (class dump_user_location_t): New class.
3042         (struct dump_impl_location_t): New struct.
3043         (class dump_location_t): New class.
3044         (dump_printf_loc): Convert 2nd param from source_location to
3045         const dump_location_t &.
3046         (dump_generic_expr_loc): Delete.
3047         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3048         const dump_location_t &.
3049         * gimple-fold.c (fold_gimple_assign): Update call to
3050         dump_printf_loc to pass in a dump_location_t rather than a
3051         location_t, via the gimple stmt.
3052         (gimple_fold_call): Likewise.
3053         * gimple-loop-interchange.cc
3054         (loop_cand::analyze_iloop_reduction_var): Update for change to
3055         check_reduction_path.
3056         (tree_loop_interchange::interchange): Update for change to
3057         find_loop_location.
3058         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3059         change in return-type of find_loop_location.
3060         (graphite_regenerate_ast_isl): Likewise.
3061         * graphite-optimize-isl.c (optimize_isl): Likewise.
3062         * graphite.c (graphite_transform_loops): Likewise.
3063         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3064         pass in a dump_location_t rather than a location_t, via the
3065         gimple stmt.
3066         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3067         * ipa.c (walk_polymorphic_call_targets): Likewise.
3068         * loop-unroll.c (report_unroll): Convert "locus" param from
3069         location_t to dump_location_t.
3070         (decide_unrolling): Update for change to get_loop_location's
3071         return type.
3072         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3073         location_t to dump_user_location_t.
3074         (grid_find_single_omp_among_assignments_1): Updates calls to
3075         dump_printf_loc to pass in a dump_location_t rather than a
3076         location_t, via the gimple stmt.
3077         (grid_parallel_clauses_gridifiable): Convert "tloc" from
3078         location_t to dump_location_t.  Updates calls to dump_printf_loc
3079         to pass in a dump_location_t rather than a location_t, via the
3080         gimple stmt.
3081         (grid_inner_loop_gridifiable_p): Likewise.
3082         (grid_dist_follows_simple_pattern): Likewise.
3083         (grid_gfor_follows_tiling_pattern): Likewise.
3084         (grid_target_follows_gridifiable_pattern): Likewise.
3085         (grid_attempt_target_gridification): Convert initialization
3086         of local "grid" from memset to zero-initialization; FIXME: does
3087         this require C++11?  Update call to dump_printf_loc to pass in a
3088         optinfo_location rather than a location_t, via the gimple stmt.
3089         * profile.c (read_profile_edge_counts): Updates call to
3090         dump_printf_loc to pass in a dump_location_t rather than a
3091         location_t
3092         (compute_branch_probabilities): Likewise.
3093         * selftest-run-tests.c (selftest::run_tests): Call
3094         dumpfile_c_tests.
3095         * selftest.h (dumpfile_c_tests): New decl.
3096         * tree-loop-distribution.c (pass_loop_distribution::execute):
3097         Update for change in return type of find_loop_location.
3098         * tree-parloops.c (parallelize_loops): Likewise.
3099         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3100         "locus" from location_t to dump_user_location_t.
3101         (canonicalize_loop_induction_variables): Likewise.
3102         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3103         for change in return type of find_loop_location.
3104         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3105         to dump_printf_loc to pass in a dump_location_t rather than a
3106         location_t, via the stmt.
3107         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3108         Likewise.
3109         * tree-vect-loop-manip.c (find_loop_location): Convert return
3110         type from source_location to dump_user_location_t.
3111         (vect_do_peeling): Update for above change.
3112         (vect_loop_versioning): Update for change in type of
3113         vect_location.
3114         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3115         from location_t to dump_user_location_t.
3116         (vect_estimate_min_profitable_iters): Update for change in type
3117         of vect_location.
3118         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3119         location_t to dump_location_t.
3120         (vect_slp_bb): Update for change in type of vect_location.
3121         * tree-vectorizer.c (vect_location): Convert from source_location
3122         to dump_user_location_t.
3123         (try_vectorize_loop_1): Update for change in vect_location's type.
3124         (vectorize_loops): Likewise.
3125         (increase_alignment): Likewise.
3126         * tree-vectorizer.h (vect_location): Convert from source_location
3127         to dump_user_location_t.
3128         (find_loop_location): Convert return type from source_location to
3129         dump_user_location_t.
3130         (check_reduction_path): Convert 1st param from location_t to
3131         dump_user_location_t.
3132         * value-prof.c (check_counter): Update call to dump_printf_loc to
3133         pass in a dump_user_location_t rather than a location_t; update
3134         call to error_at for change in type of "locus".
3135         (check_ic_target): Update call to dump_printf_loc to
3136         pass in a dump_user_location_t rather than a location_t, via the
3137         call_stmt.
3139 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
3141         * config/s390/s390.h (enum processor_flags): Do not use
3142         default tune parameter when -march was specified.
3144 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
3146         PR target/86314
3147         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3148         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3149         operands.
3151 2018-06-26  Richard Biener  <rguenther@suse.de>
3153         PR tree-optimization/86287
3154         PR bootstrap/86316
3155         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3156         (vect_analyze_loop): Initialize n_stmts.
3158 2018-06-26  Richard Biener  <rguenther@suse.de>
3160         PR middle-end/86271
3161         * fold-const.c (fold_convertible_p): Pointer extension
3162         isn't valid.
3164 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
3166         PR debug/86064
3167         * dwarf2out.c (loc_list_has_views): Adjust comments.
3168         (dw_loc_list): Split single cross-partition range with
3169         nonzero locview.
3171 2018-06-25  Jeff Law  <law@redhat.com>
3173         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3174         on -mbig-switch by default.
3176         * config/v850/predicates.md (const_float_1_operand): Fix match_code
3177         test.
3178         (const_float_0_operand): Remove unused predicate.
3179         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3180         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3181         (recipsf2): New expander.  Original pattern now called
3182         (recipsf2_insn).
3183         (recipdf2, recipdf2_insn): Similarly.
3184         (rsqrtsf2, rsqrtsf2_insn): Similarly
3185         (rsqrtdf2, rsqrtdf2_insn): Similarly
3187 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
3189         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3190         Simplify logic for FreeBSD (twice).
3192 2018-06-25  Martin Sebor  <msebor@redhat.com>
3194         PR tree-optimization/86204
3195         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3196         a strnlen result if it's less than the length of the string.
3198 2018-06-25  Martin Sebor  <msebor@redhat.com>
3200         PR tree-optimization/85700
3201         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3202         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3203         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3205 2018-06-25  Martin Sebor  <msebor@redhat.com>
3207         * doc/extend.texi (Zero-length arrays): Update and clarify.
3209 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
3211         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3212         added IEEE/IBM long double multilib support on PowerPC little
3213         endian Linux systems.
3214         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3215         (MULTILIB_DEFAULTS): Likewise.
3216         * config/rs6000/rs6000.c (rs6000_option_override_internal):
3217         Likewise.
3218         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3219         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3220         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3222 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
3224         PR middle-end/86311
3225         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3226         (REORDER_45): Likewise.
3228 2018-06-25  Jeff Law  <law@redhat.com>
3230         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3231         dividend to 32 bits.  Adjust length.
3232         (udivmodhi4): Cleanup output template.  Fix length.
3234 2018-06-25  Carl Love  <cel@us.ibm.com>
3236         * config/rs6000/vsx.md: Change word selector to prefered location.
3238 2018-06-25  Richard Biener  <rguenther@suse.de>
3240         PR tree-optimization/86304
3241         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
3242         epilogue-if-converted loops as well.
3244 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
3246         * lto-section-out.c (lto_begin_section): Do not print section
3247         name for noaddr and unnumbered dumps.
3249 2018-06-25  Richard Biener  <rguenther@suse.de>
3251         * tree-vectorizer.h (struct vec_info_shared): New structure
3252         with parts split out from struct vec_info and loop_nest from
3253         struct _loop_vec_info.
3254         (struct vec_info): Adjust accordingly.
3255         (struct _loop_vec_info): Likewise.
3256         (LOOP_VINFO_LOOP_NEST): Adjust.
3257         (LOOP_VINFO_DATAREFS): Likewise.
3258         (LOOP_VINFO_DDRS): Likewise.
3259         (struct _bb_vec_info): Likewise.
3260         (BB_VINFO_DATAREFS): Likewise.
3261         (BB_VINFO_DDRS): Likewise.
3262         (struct _stmt_vec_info): Add dr_aux member.
3263         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
3264         (DR_MISALIGNMENT_UNINITIALIZED): New.
3265         (set_dr_misalignment): Adjust.
3266         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
3267         (vect_analyze_loop): Adjust prototype.
3268         (vect_analyze_loop_form): Likewise.
3269         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3270         Compute dependences lazily.
3271         (vect_record_base_alignments): Use shared datarefs/ddrs.
3272         (vect_verify_datarefs_alignment): Likewise.
3273         (vect_analyze_data_refs_alignment): Likewise.
3274         (vect_analyze_data_ref_accesses): Likewise.
3275         (vect_analyze_data_refs): Likewise.
3276         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
3277         constructor parameter for shared part.
3278         (vect_analyze_loop_form): Pass in shared part and adjust.
3279         (vect_analyze_loop_2): Pass in storage for the number of
3280         stmts.  Move loop nest finding to the caller.  Compute
3281         datarefs lazily.
3282         (vect_analyze_loop): Pass in shared part.
3283         (vect_transform_loop): Verify shared datarefs are unchanged.
3284         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
3285         constructor parameter for shared part.
3286         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
3287         (vect_slp_bb): Verify shared datarefs are unchanged before
3288         transform.
3289         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
3290         change.
3291         (new_stmt_vec_info): Initialize DR_AUX misalignment to
3292         DR_MISALIGNMENT_UNINITIALIZED.
3293         * tree-vectorizer.c (vec_info::vec_info): Add constructor
3294         parameter for shared part.
3295         (vec_info::~vec_info): Adjust.
3296         (vec_info_shared::vec_info_shared): New.
3297         (vec_info_shared::~vec_info_shared): Likewise.
3298         (vec_info_shared::save_datarefs): Likewise.
3299         (vec_info_shared::check_datarefs): Likewise.
3300         (try_vectorize_loop_1): Construct shared part live for analyses
3301         of a single loop for multiple vector sizes.
3302         * tree-parloops.c (gather_scalar_reductions): Adjust.
3304 2018-06-25  Richard Biener  <rguenther@suse.de>
3306         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
3307         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
3308         (vect_analyze_data_refs): Remove similar code from here and
3309         simplify accordingly.
3311 2018-06-25  Richard Biener  <rguenther@suse.de>
3313         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
3314         for reverse storage order accesses rather than asserting
3315         they cannot happen here.
3317 2018-06-25  Tom de Vries  <tdevries@suse.de>
3319         PR debug/86257
3320         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3321         Use data16 instead of .byte for insn prefix.
3323 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
3325         PR C++/86082
3326         * parser.c (make_char_string_pack): Pass this literal chars
3327         through cpp_interpret_string.
3328         (cp_parser_userdef_numeric_literal): Check the result of
3329         make_char_string_pack.
3331 2018-06-24  Maya Rashish  <coypu@sdf.org>
3333         * ginclude/stddef.h: Simplify conditions around avoiding
3334         re-definition of __size_t.
3336 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3338         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3339         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3341 2018-06-22  Maya Rashish  <coypu@sdf.org>
3343         * doc/invoke.texi (mno-fancy-math-387): Update for changes
3344         made to OpenBSD and NetBSD through the years.
3346 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3348         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3349         behavior of vec_pack (vector double, vector double) to match
3350         behavior of vec_float2 (vector double, vector double).
3352 2018-06-22  Olivier Hainque  <hainque@adacore.com>
3354         * gimplify.c (gimplify_function_tree): Prevent creation
3355         of a trampoline for the address of the current function
3356         passed to entry/exit instrumentation hooks.
3358 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
3360         PR target/86222
3361         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3362         correctly.
3364 2018-06-22  Martin Liska  <mliska@suse.cz>
3366         PR tree-optimization/86263
3367         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3368         Bail out if is_enabled is false.
3369         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3370         New declaration.
3371         (jump_table_cluster::is_enabled): New function.
3373 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3375         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3376         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3377         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3378         (lto_input_ts_binfo_tree_pointers): Likewise.
3379         * tree-streamer-out.c (streamer_write_tree_bitfields,
3380         write_ts_binfo_tree_pointers): Likewise.
3381         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3383 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3385         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3387 2018-06-22  Martin Liska  <mliska@suse.cz>
3389         * symbol-summary.h (get): Make it pure and inline move
3390         functionality from ::get function.
3391         (get): Remove and inline into ::get and ::get_create.
3392         (get_create): Move code from ::get function.
3394 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3396         PR target/85994
3397         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3398         -x assembler-with-cpp.
3400 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3402         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3403         _FILE_OFFSET_BITS=64 for C++.
3405 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
3407         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3408         conversion insn that shows up when pr85657-3.c is compiled using
3409         IEEE 128-bit long double.
3410         (neg<mode>2_internal): Use the correct mode to check whether the
3411         mode is IBM extended.
3412         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3413         multiply and divide external functions from being created more
3414         than once.
3416 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3418         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3419         functions.
3420         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
3421         the edge can be forwarded.
3422         (cfg_layout_merge_blocks): Likewise.
3424 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3426         * except.c (finish_eh_generation): Commit edge insertions only after
3427         the EH edges have been redirected from post-landing to landing pads.
3429 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3431         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3432         create_tmp_var_for to create the FRAME decl.
3433         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3435 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3437         * tree-inline.c (copy_edges_for_bb): Minor tweak.
3438         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3439         debug statement when resetting its value.
3440         (expand_call_inline): Copy the locus of the call onto the assignment
3441         of the return value, if any.  Use local variable in more cases.
3443 2018-06-21  Martin Liska  <mliska@suse.cz>
3445         * ipa-pure-const.c (propagate_nothrow): Use
3446         funct_state_summaries->get.
3447         (dump_malloc_lattice): Likewise.
3448         (propagate_malloc): Likewise.
3450 2018-06-21  Richard Biener  <rguenther@suse.de>
3452         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3453         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3454         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3455         comment.
3456         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3457         BLOCK_ABSTRACT_ORIGIN unconditionally.
3459 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
3461         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3462         deleting it.
3463         * ipa-reference.c (ipa_reference_c_finalize): Delete
3464         ipa_ref_opt_sum_summaries and set it to NULL.
3466 2018-06-21  Tom de Vries  <tdevries@suse.de>
3468         PR tree-optimization/85859
3469         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3470         test with comment from bb_no_side_effects_p.
3472 2018-06-21  Richard Biener  <rguenther@suse.de>
3474         PR tree-optimization/86232
3475         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3476         max for constant niter.
3478 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3480         * config/aarch64/aarch64-simd.md
3481         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3483 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3485         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3486         Make opernads of the unspec commutative.
3488 2018-06-21  Richard Biener  <rguenther@suse.de>
3490         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3491         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3492         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3493         (vect_analyze_data_ref_dependence): Re-order checks to deal with
3494         NULL DR_STEP.
3495         (vect_record_base_alignments): Do not record base alignment
3496         for gathers or scatters.
3497         (vect_compute_data_ref_alignment): Drop return value that is always
3498         true.  Bail out early for gathers or scatters.
3499         (vect_enhance_data_refs_alignment): Bail out early for gathers
3500         or scatters.
3501         (vect_find_same_alignment_drs): Likewise.
3502         (vect_analyze_data_refs_alignment): Remove dead code.
3503         (vect_slp_analyze_and_verify_node_alignment): Likewise.
3504         (vect_analyze_data_refs): For possible gathers or scatters do
3505         not create an alternate DR, just check their possible validity
3506         and mark them.  Adjust DECL_NONALIASED handling to not rely
3507         on DR_BASE_ADDRESS.
3508         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3509         update inits of gathers or scatters.
3510         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3511         Also copy gather/scatter flag to pattern vinfo.
3513 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3515         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3516         behavior of vec_packsu (vector unsigned long long, vector unsigned
3517         long long) to match behavior of vec_packs with same signature.
3519 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
3520             Thomas Schwinge <thomas@codesourcery.com>
3521             Cesar Philippidis  <cesar@codesourcery.com>
3523         * gimplify.c (gimplify_scan_omp_clauses): Add support for
3524         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3525         (gimplify_adjust_omp_clauses): Likewise.
3526         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3527         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3528         (gimplify_omp_target_update): Update handling of acc update and
3529         enter/exit data.
3530         * omp-low.c (install_var_field): Remove unused parameter
3531         base_pointers_restrict.
3532         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3533         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3534         FINALIZE}
3535         (omp_target_base_pointers_restrict_p): Delete.
3536         (scan_omp_target): Update call to scan_sharing_clauses.
3537         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3538         FINALIZE}.
3539         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3540         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3541         (convert_local_omp_clauses): Likewise.
3542         * tree-pretty-print.c (dump_omp_clause): Likewise.
3543         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
3544         FINALIZE}.
3545         (omp_clause_code_name): Likewise.
3547 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3549         PR debug/86194
3550         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3551         be narrowed.
3553         PR tree-optimization/86231
3554         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
3555         anti-range don't overwrite *vr0min before using it to compute *vr0max.
3557 2018-06-20  Tom de Vries  <tdevries@suse.de>
3559         PR tree-optimization/86097
3560         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3561         iv type if signedness of iv type is not the same as that of *nit.
3563 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3565         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
3566         EDGE_EH edges, verify they are all EDGE_EH.
3568 2018-06-20  Maya Rashish  <coypu@sdf.org>
3570         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3572 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3574         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3575         * config/aarch64/aarch64.c (xgene1_tunings): Add
3576         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3577         (aarch64_mode_valid_for_sched_fusion_p):
3578         Allow 16-byte modes.
3579         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3580         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3581         128-bit modes.
3582         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3583         New pattern.
3584         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3585         * config/aarch64/iterators.md (VQ2): New mode iterator.
3587 2018-06-20  Martin Liska  <mliska@suse.cz>
3589         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3590         Change default ratio from 10 to 8.
3592 2018-06-20  Martin Liska  <mliska@suse.cz>
3594         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3595         New.
3596         (bit_test_cluster::find_bit_tests): Likewise.
3597         (switch_decision_tree::analyze_switch_statement): Find clusters.
3598         * tree-switch-conversion.h (struct jump_table_cluster): Document
3599         hierarchy.
3601 2018-06-20  Martin Liska  <mliska@suse.cz>
3603         * tree-switch-conversion.c (switch_conversion::collect):
3604         Record m_uniq property.
3605         (switch_conversion::expand): Bail out for special conditions.
3606         (group_cluster::~group_cluster): New.
3607         (group_cluster::group_cluster): Likewise.
3608         (group_cluster::dump): Likewise.
3609         (jump_table_cluster::emit): New.
3610         (switch_decision_tree::fix_phi_operands_for_edges): New.
3611         (struct case_node): Remove struct.
3612         (jump_table_cluster::can_be_handled): New.
3613         (case_values_threshold): Moved to header.
3614         (reset_out_edges_aux): Likewise.
3615         (jump_table_cluster::is_beneficial): New.
3616         (bit_test_cluster::can_be_handled): Likewise.
3617         (add_case_node): Remove.
3618         (bit_test_cluster::is_beneficial): New.
3619         (case_bit_test::cmp): New.
3620         (bit_test_cluster::emit): New.
3621         (expand_switch_as_decision_tree_p): Remove.
3622         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3623         (fix_phi_operands_for_edge): Likewise.
3624         (switch_decision_tree::analyze_switch_statement): New.
3625         (compute_cases_per_edge): Move ...
3626         (switch_decision_tree::compute_cases_per_edge): ... here.
3627         (try_switch_expansion): Likewise.
3628         (switch_decision_tree::try_switch_expansion): Likewise.
3629         (record_phi_operand_mapping): Likewise.
3630         (switch_decision_tree::record_phi_operand_mapping): Likewise.
3631         (emit_case_decision_tree): Likewise.
3632         (switch_decision_tree::emit): Likewise.
3633         (balance_case_nodes): Likewise.
3634         (switch_decision_tree::balance_case_nodes): Likewise.
3635         (dump_case_nodes): Likewise.
3636         (switch_decision_tree::dump_case_nodes): Likewise.
3637         (emit_jump): Likewise.
3638         (switch_decision_tree::emit_jump): Likewise.
3639         (emit_cmp_and_jump_insns): Likewise.
3640         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3641         (emit_case_nodes): Likewise.
3642         (switch_decision_tree::emit_case_nodes): Likewise.
3643         (conditional_probability): Remove.
3644         * tree-switch-conversion.h (enum cluster_type): New.
3645         (PRINT_CASE): New.
3646         (struct cluster): Likewise.
3647         (cluster::cluster): Likewise.
3648         (struct simple_cluster): Likewise.
3649         (simple_cluster::simple_cluster): Likewise.
3650         (struct group_cluster): Likewise.
3651         (struct jump_table_cluster): Likewise.
3652         (struct bit_test_cluster): Likewise.
3653         (struct min_cluster_item): Likewise.
3654         (struct case_tree_node): Likewise.
3655         (case_tree_node::case_tree_node): Likewise.
3656         (jump_table_cluster::case_values_threshold): Likewise.
3657         (struct case_bit_test): Likewise.
3658         (struct switch_decision_tree): Likewise.
3659         (struct switch_conversion): Likewise.
3660         (switch_decision_tree::reset_out_edges_aux): Likewise.
3662 2018-06-20  Martin Liska  <mliska@suse.cz>
3664         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3665         (hoist_edge_and_branch_if_true): Likewise.
3666         (expand_switch_using_bit_tests_p): Likewise.
3667         (struct case_bit_test): Likewise.
3668         (case_bit_test_cmp): Likewise.
3669         (emit_case_bit_tests): Likewise.
3670         (switch_conversion::switch_conversion): New class.
3671         (struct switch_conv_info): Remove old struct.
3672         (collect_switch_conv_info): More to ...
3673         (switch_conversion::collect): ... this.
3674         (check_range): Likewise.
3675         (switch_conversion::check_range): Likewise.
3676         (check_all_empty_except_final): Likewise.
3677         (switch_conversion::check_all_empty_except_final): Likewise.
3678         (check_final_bb): Likewise.
3679         (switch_conversion::check_final_bb): Likewise.
3680         (create_temp_arrays): Likewise.
3681         (switch_conversion::create_temp_arrays): Likewise.
3682         (free_temp_arrays): Likewise.
3683         (gather_default_values): Likewise.
3684         (switch_conversion::gather_default_values): Likewise.
3685         (build_constructors): Likewise.
3686         (switch_conversion::build_constructors): Likewise.
3687         (constructor_contains_same_values_p): Likewise.
3688         (switch_conversion::contains_same_values_p): Likewise.
3689         (array_value_type): Likewise.
3690         (switch_conversion::array_value_type): Likewise.
3691         (build_one_array): Likewise.
3692         (switch_conversion::build_one_array): Likewise.
3693         (build_arrays): Likewise.
3694         (switch_conversion::build_arrays): Likewise.
3695         (gen_def_assigns): Likewise.
3696         (switch_conversion::gen_def_assigns): Likewise.
3697         (prune_bbs): Likewise.
3698         (switch_conversion::prune_bbs): Likewise.
3699         (fix_phi_nodes): Likewise.
3700         (switch_conversion::fix_phi_nodes): Likewise.
3701         (gen_inbound_check): Likewise.
3702         (switch_conversion::gen_inbound_check): Likewise.
3703         (process_switch): Use the newly created class.
3704         (switch_conversion::expand): New.
3705         (switch_conversion::~switch_conversion): New.
3706         * tree-switch-conversion.h: New file.
3708 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3710         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3711         tree-vect-patterns.c.
3712         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3713         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
3714         (vect_recog_sad_pattern): Likewise.
3715         (vect_recog_widen_sum_pattern): Likewise.
3716         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
3717         (vect_recog_widen_shift_pattern): Remove the type_in argument.
3718         (vect_recog_rotate_pattern): Likewise.
3719         (vect_recog_mult_pattern): Likewise.
3720         (vect_recog_vector_vector_shift_pattern): Likewise.
3721         (vect_recog_divmod_pattern): Likewise.
3722         (vect_recog_mixed_size_cond_pattern): Likewise.
3723         (vect_recog_bool_pattern): Likewise.
3724         (vect_recog_mask_conversion_pattern): Likewise.
3725         (vect_try_gather_scatter_pattern): Likewise.
3726         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
3727         (vect_recog_over_widening_pattern): Likewise.
3728         (vect_recog_gather_scatter_pattern): Likewise.
3729         (vect_recog_func_ptr): Move from tree-vectorizer.h
3730         (vect_vect_recog_func_ptrs): Move further down the file.
3731         (vect_recog_func): Likewise.  Remove the third argument.
3732         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3733         (vect_pattern_recog_1): Expect the pattern function to do any
3734         necessary target tests.  Also expect it to provide a vector type.
3735         Remove the type_in handling.
3737 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3739         * tree-vect-patterns.c (vect_pattern_detected): New function.
3740         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3741         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3742         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3743         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3744         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3745         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3746         (vect_recog_mask_conversion_pattern)
3747         (vect_try_gather_scatter_pattern): Likewise.
3749 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3751         * tree-vect-patterns.c (vect_get_internal_def): New function.
3752         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3753         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3754         (search_type_for_mask_1): Use it.
3756 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3758         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3759         redundant WIDEN_SUM_EXPR handling.
3760         (vect_recog_sad_pattern): Likewise.
3762 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3764         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3765         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3766         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3767         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3768         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3770 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3772         * tree-vect-stmts.c (vectorizable_call): Make sure that we
3773         use the stmt_vec_info of the original bb statement for the
3774         new zero assignment, even if the call is part of a pattern.
3776 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3778         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3779         that the sequence is attached to the original statement rather
3780         than the pattern statement.
3781         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3782         PATTERN_DEF_SEQ from the original statement rather than
3783         the main pattern statement.
3784         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3785         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3786         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3788 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3790         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3791         definition statements before the early exit for statements that aren't
3792         live or relevant.
3793         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3794         split out from...
3795         (vect_transform_loop): ...here.  Process pattern definition
3796         statements without first checking whether the main pattern
3797         statement is live or relevant.
3799 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3801         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3802         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3804 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
3806         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3807         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3808         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3809         (expand_block_compare): Change select_block_compare_mode call.
3810         (expand_strncmp_align_check): Use new functions, fix comment.
3811         (emit_final_str_compare_gpr): New function.
3812         (expand_strn_compare): Refactor and clean up code.
3813         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3815 2018-06-19  Tony Reix  <tony.reix@atos.com>
3816             Damien Bergamini  <damien.bergamini@atos.com>
3817             David Edelsohn  <dje.gcc@gmail.com>
3819         * collect2.c (static_obj): New variable.
3820         (static_libs): New variable.
3821         (is_in_list): Uncomment declaration.
3822         (main): Track AIX libraries linked statically.
3823         (is_in_list): Uncomment definition.
3824         (scan_prog_file): Don't add AIX shared libraries initializer
3825         to constructor list if linking statically.
3827 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
3829         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3830         constant.
3831         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3833 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
3835         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3836         blocks.
3838 2018-06-19  Martin Liska  <mliska@suse.cz>
3840         * config/i386/i386.c (ix86_can_inline_p): Do not use
3841         ipa_fn_summaries::get_create.
3842         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3843         get.
3844         (devirtualization_time_bonus): Likewise.
3845         (ipcp_propagate_stage): Likewise.
3846         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3847         (edge_set_predicate): Likewise.
3848         (evaluate_conditions_for_known_args): Likewise.
3849         (evaluate_properties_for_edge): Likewise.
3850         (ipa_call_summary::reset): Tranform to ...
3851         (ipa_call_summary::~ipa_call_summary): ... this.
3852         (ipa_fn_summary::reset): Transform to ...
3853         (ipa_fn_summary::~ipa_fn_summary): ... this.
3854         (ipa_fn_summary_t::remove): Rename to ...
3855         (ipa_fn_summary_t::remove_callees): ... this.
3856         (ipa_fn_summary_t::duplicate): Use placement new
3857         instead of memory copy.
3858         (ipa_call_summary_t::duplicate): Likewise.
3859         (ipa_call_summary_t::remove): Remove.
3860         (dump_ipa_call_summary): Change get_create to get.
3861         (ipa_dump_fn_summary): Dump only when summary exists.
3862         (analyze_function_body): Use symbol_summary::get instead
3863         of get_create.
3864         (compute_fn_summary): Likewise.
3865         (estimate_edge_devirt_benefit): Likewise.
3866         (estimate_edge_size_and_time): Likewise.
3867         (inline_update_callee_summaries): Likewise.
3868         (remap_edge_change_prob): Likewise.
3869         (remap_edge_summaries): Likewise.
3870         (ipa_merge_fn_summary_after_inlining): Likewise.
3871         (write_ipa_call_summary): Likewise.
3872         (ipa_fn_summary_write): Likewise.
3873         (ipa_free_fn_summary): Likewise.
3874         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3875         (struct ipa_call_summary): Likewise.
3876         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3877         of get_create.
3878         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3879         (estimate_size_after_inlining): Likewise.
3880         (estimate_growth): Likewise.
3881         (growth_likely_positive): Likewise.
3882         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3883         (inline_call): Likewise.
3884         * ipa-inline.c (caller_growth_limits): Likewise.
3885         (can_inline_edge_p): Likewise.
3886         (can_inline_edge_by_limits_p): Likewise.
3887         (compute_uninlined_call_time): Likewise.
3888         (compute_inlined_call_time): Likewise.
3889         (want_inline_small_function_p): Likewise.
3890         (edge_badness): Likewise.
3891         (update_caller_keys): Likewise.
3892         (update_callee_keys): Likewise.
3893         (inline_small_functions): Likewise.
3894         (inline_to_all_callers_1): Likewise.
3895         (dump_overall_stats): Likewise.
3896         (early_inline_small_functions): Likewise.
3897         (early_inliner): Likewise.
3898         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3899         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3900         * ipa-pure-const.c (malloc_candidate_p): Likewise.
3901         * ipa-split.c (execute_split_functions): Likewise.
3902         * symbol-summary.h: Likewise.
3903         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3905 2018-06-19  Richard Biener  <rguenther@suse.de>
3907         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3908         (vectorize_loops): ... here.  Fix dbgcnt handling.
3909         (try_vectorize_loop): Wrap try_vectorize_loop_1.
3911 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
3913         PR target/86197
3914         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3915         ieee128 argument takes up only one (vector) register, not two (floating
3916         point) registers.
3918 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3920         * gimplify.c (gimplify_init_constructor): Really never clear for an
3921         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3923 2018-06-19  Richard Biener  <rguenther@suse.de>
3925         PR tree-optimization/86179
3926         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3927         after failed recognition.
3929 2018-06-18  Martin Sebor  <msebor@redhat.com>
3931         PR middle-end/85602
3932         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3933         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3934         Handle integer subtraction.
3935         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3936         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3938 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3940         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3941         param from rtx to rtx_insn *.
3942         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3943         param.
3944         (frv_ifcvt_modify_insn): Likwise.
3945         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3946         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
3947         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3948         as_a <rtx_insn *> cast to local "unprotected_region" once
3949         it's been established that it's not NULL or pc_rtx.
3950         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3951         param "sethi" from rtx to rtx_insn *.
3952         (nds32_group_float_insns): Likewise for param "insn".
3953         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3954         param.
3955         (vax_output_int_subtract): Likewise.
3956         * config/vax/vax.c (vax_output_int_add): Likewise for param
3957         "insn".
3958         (vax_output_int_subtract): Likewise.
3959         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3960         (emit_pattern_after): Likewise for param "after".
3961         (emit_insn_after): Likewise.
3962         (emit_jump_insn_after): Likewise.
3963         (emit_call_insn_after): Likewise.
3964         (emit_debug_insn_after): Likewise.
3965         (emit_pattern_before): Likewise for param "before".
3966         (emit_insn_before): Likewise.
3967         (emit_jump_insn_before): Likewise.
3968         * final.c (get_insn_template): Likewise for param "insn", removing
3969         a cast.
3970         * output.h (get_insn_template): Likewise for 2nd param.
3971         * rtl.h (emit_insn_before): Likewise.
3972         (emit_jump_insn_before): Likewise.
3973         (emit_debug_insn_before_noloc): Likewise.
3974         (emit_insn_after): Likewise.
3975         (emit_jump_insn_after): Likewise.
3976         (emit_call_insn_after): Likewise.
3977         (emit_debug_insn_after): Likewise.
3978         (set_insn_deleted): Likewise for param.
3980 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
3982         PR target/85358
3983         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3984         floating point modes, so that IFmode is numerically greater than
3985         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3986         to declare the ordering.  This prevents IFmode from being
3987         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3988         machine.  Include rs6000-modes.h to share the fractional values
3989         between genmodes* and the rest of the compiler.
3990         (IFmode): Likewise.
3991         (KFmode): Likewise.
3992         (TFmode): Likewise.
3993         * config/rs6000/rs6000-modes.h: New file.
3994         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3995         meaning of rs6000_long_double_size so that 126..128 selects an
3996         appropriate 128-bit floating point type.
3997         (rs6000_option_override_internal): Likewise.
3998         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3999         (TARGET_LONG_DOUBLE_128): Change the meaning of
4000         rs6000_long_double_size so that 126..128 selects an appropriate
4001         128-bit floating point type.
4002         (LONG_DOUBLE_TYPE_SIZE): Update comment.
4003         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4004         source and destination to match the standard usage.
4005         (truncifkf2): Likewise.
4006         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4007         ISA 2.07 to use an explicit clobber, instead of passing in a
4008         temporary.
4009         (copysign<mode>3_soft): Likewise.
4011 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
4013         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4014         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4015         (vect_slp_analyze_instance_dependence): Likewise.
4016         (vect_enhance_data_refs_alignment): Likewise.
4017         (vect_analyze_data_refs_alignment): Likewise.
4018         (vect_slp_analyze_and_verify_instance_alignment
4019         (vect_analyze_data_ref_accesses): Likewise.
4020         (vect_prune_runtime_alias_test_list): Likewise.
4021         (vect_analyze_data_refs): Likewise.
4022         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4023         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4024         (vect_analyze_scalar_cycles_1): Likewise.
4025         (vect_get_loop_niters): Likewise.
4026         (vect_analyze_loop_form_1): Likewise.
4027         (vect_update_vf_for_slp): Likewise.
4028         (vect_analyze_loop_operations): Likewise.
4029         (vect_analyze_loop): Likewise.
4030         (vectorizable_induction): Likewise.
4031         (vect_transform_loop): Likewise.
4032         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4033         * tree-vect-slp.c (vect_analyze_slp): Likewise.
4034         (vect_make_slp_decision): Likewise.
4035         (vect_detect_hybrid_slp): Likewise.
4036         (vect_slp_analyze_operations): Likewise.
4037         (vect_slp_bb): Likewise.
4038         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4039         (vectorizable_bswap): Likewise.
4040         (vectorizable_call): Likewise.
4041         (vectorizable_simd_clone_call): Likewise.
4042         (vectorizable_conversion): Likewise.
4043         (vectorizable_assignment): Likewise.
4044         (vectorizable_shift): Likewise.
4045         (vectorizable_operation): Likewise.
4046         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4048 2018-06-18  Martin Sebor  <msebor@redhat.com>
4050         PR tree-optimization/81384
4051         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4052         * builtins.c (expand_builtin_strnlen): New function.
4053         (expand_builtin): Call it.
4054         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4055         * builtins.def (BUILT_IN_STRNLEN): New.
4056         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4057         Warn for bounds in excess of maximum object size.
4058         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4059         single-value ranges.  Handle strnlen.
4060         (handle_builtin_strlen): Handle strnlen.
4061         (strlen_check_and_optimize_stmt): Same.
4062         * doc/extend.texi (Other Builtins): Document strnlen.
4064 2018-06-18  Maya Rashish  <coypu@sdf.org>
4066         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4067         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4068         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4070         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4071         here to ...
4072         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4074 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4076         * tree.c (escaped_string::escape): Replace cast to char * by
4077         const_cast<char *> (unescaped).
4079 2018-06-18  Nick Clifton  <nickc@redhat.com>
4081         PR 84195
4082         * tree.c (escaped_string): New class.  Converts an unescaped
4083         string into its escaped equivalent.
4084         (warn_deprecated_use): Use the new class to convert the
4085         deprecation message, if present.
4086         (test_escaped_strings): New self test.
4087         (test_c_tests): Add test_escaped_strings.
4088         * doc/extend.texi (deprecated): Add a note that the
4089         deprecation message is affected by the -fmessage-length
4090         option, and that control characters will be escaped.
4091         (#pragma GCC error): Document this pragma.
4092         (#pragma GCC warning): Likewise.
4093         * doc/invoke.texi (-fmessage-length): Document this option's
4094         effect on the #warning and #error preprocessor directives and
4095         the deprecated attribute.
4097 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
4099         * tree.c (decl_value_expr_lookup): Revert latest change.
4100         (decl_value_expr_insert): Likewise.
4102 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
4104         * gimplify.c (nonlocal_vlas): Delete.
4105         (nonlocal_vla_vars): Likewise.
4106         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4107         referenced VLAs.
4108         (gimplify_body): Do not create and destroy nonlocal_vlas.
4109         * tree-nested.c: Include diagnostic.h.
4110         (use_pointer_in_frame): Tweak.
4111         (lookup_field_for_decl): Add assertion and declare the transformation.
4112         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4113         internal error when the reference is in a wrong context.  Do not
4114         create a debug decl by default.
4115         (note_nonlocal_block_vlas): Delete.
4116         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4117         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
4118         create a debug decl by default.
4119         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4120         call is in a wrong context.
4121         (fixup_vla_decls): New function.
4122         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
4123         debug variables were created.
4124         * tree.c (decl_value_expr_lookup): Add checking assertion.
4125         (decl_value_expr_insert): Likewise.
4127 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
4129         PR middle-end/82479
4130         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4131         * tree-scalar-evolution.c (interpret_expr): Likewise.
4132         (expression_expensive_p): Likewise.
4133         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4134         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4135         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4136         (ssa_defined_by_minus_one_stmt_p): New.
4138 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
4140         PR middle-end/64946
4141         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4142         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4143         * dojump.c (do_jump): Likewise.
4144         * expr.c (expand_expr_real_2): Check operand type's sign.
4145         * fold-const.c (const_unop): Handle ABSU_EXPR.
4146         (fold_abs_const): Likewise.
4147         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4148         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4149         (strip_sign_op_1): Likesise.
4150         * match.pd: Add new pattern to generate ABSU_EXPR.
4151         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4152         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4153         * tree-eh.c (operation_could_trap_helper_p): Likewise.
4154         * tree-inline.c (estimate_operator_cost): Likewise.
4155         * tree-pretty-print.c (dump_generic_node): Likewise.
4156         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4157         * tree.def (ABSU_EXPR): New.
4159 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
4161         PR middle-end/86095
4162         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4163         documented as preserved for backward compatibility only.
4164         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4166         PR rtl-optimization/86108
4167         * bb-reorder.c (create_forwarder_block): Renamed to ...
4168         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
4169         jump from new landing pad to the second part.
4170         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4171         Adjust callers.
4173 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
4175         PR middle-end/85878
4176         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4177         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4178         Only call store_expr for halves if the mode is the same.
4180         PR middle-end/86123
4181         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4182         Fix up comment formatting.
4184 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4186         * typed-splay-tree.h (typed_splay_tree::remove): New function.
4187         (typed_splay_tree::closure,
4188         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4189         (typed_splay_tree::typed_splay_tree,
4190         typed_splay_tree::operator =): Declared private.
4191         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4192         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4193         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4194         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4195         typed_splay_tree::splay_tree_splay,
4196         typed_splay_tree::splay_tree_foreach_helper,
4197         typed_splay_tree::splay_tree_insert,
4198         typed_splay_tree::splay_tree_remove,
4199         typed_splay_tree::splay_tree_lookup,
4200         typed_splay_tree::splay_tree_predecessor,
4201         typed_splay_tree::splay_tree_successor,
4202         typed_splay_tree::splay_tree_min,
4203         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4204         (typed_splay_tree::root, typed_splay_tree::comp,
4205         typed_splay_tree::delete_key,
4206         typed_splay_tree::delete_value): New data members.
4207         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4208         typed_splay_tree::remove.
4210 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
4212         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4213         -mginv and -mno-ginv to the assembler.
4214         * config/mips/mips.opt (-mcrc): New option.
4215         (-mginv): Likewise.
4216         * doc/invoke.text (-mcrc): Document.
4217         (-mginv): Likewise.
4219 2018-06-15  Nick Clifton  <nickc@redhat.com>
4221         PR 84195
4222         * tree.c (escaped_string): New class.  Converts an unescaped
4223         string into its escaped equivalent.
4224         (warn_deprecated_use): Use the new class to convert the
4225         deprecation message, if present.
4226         (test_escaped_strings): New self test.
4227         (test_c_tests): Add test_escaped_strings.
4228         * doc/extend.texi (deprecated): Add a note that the
4229         deprecation message is affected by the -fmessage-length
4230         option, and that control characters will be escaped.
4231         (#pragma GCC error): Document this pragma.
4232         (#pragma GCC warning): Likewise.
4233         * doc/invoke.texi (-fmessage-length): Document this option's
4234         effect on the #warning and #error preprocessor directives and
4235         the deprecated attribute.
4237 2018-06-15  Richard Biener  <rguenther@suse.de>
4239         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
4240         here, also noting vector size used.
4241         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
4242         size used in MSG_OPTIMIZED_LOCATIONS dump.
4243         (pass_slp_vectorize::execute): Adjust.
4245 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
4247         PR target/85968
4248         * config/arc/arc.c (arc_return_address_register): Fix
4249         if-condition.
4251 2018-06-15  Richard Biener  <rguenther@suse.de>
4253         PR middle-end/86159
4254         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
4255         leave useless conversion stripping to force_gimple_operand_gsi.
4256         (gimplify_build2): Likewise.
4257         (gimplify_build1): Likewise.
4259 2018-06-15  Richard Biener  <rguenther@suse.de>
4261         PR middle-end/86076
4262         * tree-cfg.c (move_stmt_op): unshare invariant addresses
4263         before adjusting their block.
4265 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4267         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
4268         multilibs for *-*-rtems*.
4269         * config/riscv/t-rtems: New file.
4271 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
4273         PR middle-end/86122
4274         * match.pd ((A +- CST1) +- CST2): Punt if last resort
4275         unsigned_type_for returns NULL.
4277         PR target/85945
4278         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4279         subregs of multi-word pseudos unless the float mode has word size.
4281 2018-06-14  Richard Biener  <rguenther@suse.de>
4283         PR middle-end/86139
4284         * tree-vect-generic.c (build_word_mode_vector_type): Remove
4285         duplicate and harmful type_hash_canon.
4286         * tree.c (type_hash_canon): Assert we didn't find ourselves.
4288 2018-06-14  Richard Biener  <rguenther@suse.de>
4290         PR ipa/86124
4291         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
4292         NULL cgraph_node.
4294 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4296         * config/rtems.h (STDINT_LONG32): Define.
4298 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
4299             Prachi Godbole  <prachi.godbole@imgtec.com>
4301         * config/mips/mips-cpus.def: Define P6600.
4302         * config/mips/mips-tables.opt: Regenerate.
4303         * config/mips/mips.c (mips_ucbranch_type): New enum.
4304         (mips_rtx_cost_data): Add support for P6600.
4305         (mips_issue_rate): Likewise.
4306         (mips_multipass_dfa_lookahead): Likewise.
4307         (mips_avoid_hazard): Likewise.
4308         (mips_reorg_process_insns): Likewise.
4309         (mips_classify_branch_p6600): New function.
4310         * config/mips/mips.h (TUNE_P6600): New define.
4311         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
4312         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
4313         * config/mips/mips.md: Include p6600.md.
4314         (processor): Add p6600.
4315         * config/mips/p6600.md: New file.
4316         * doc/invoke.texi: Add p6600 to supported architectures.
4318 2018-06-13  Martin Sebor  <msebor@redhat.com>
4320         PR tree-optimization/86114
4321         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4322         of integer types.
4323         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4325 2018-06-13  Richard Biener  <rguenther@suse.de>
4327         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4328         Properly set vector type of the intermediate stmt.
4329         * tree-vect-stmts.c (vectorizable_operation): The destination
4330         var always has vectype_out type.
4332 2018-06-13  Jeff Law  <law@redhat.com>
4334         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4335         integer 0 for argument to print_rtl_with_bb.
4336         (rl78_reorg): Likewise.
4338 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
4340         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4341         from rtx to rtx_insn *.
4342         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4343         "label".
4344         (add_sched_insns_for_speculation): Likewise for local "target",
4345         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4346         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4347         from rtx_insn ** to rtx_code_label **.
4348         (reorg_emit_nops): Likewise.
4349         (c6x_reorg): Likewise for local "call_labels".
4350         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4351         rtx to rtx_insn *.
4352         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4353         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4354         the loops over LABEL_REFS.
4355         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4356         braf_label.
4357         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4358         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4359         (split_branches): Strengthen local "olabel" from rtx to
4360         rtx_insn *, adding a safe_as_a cast.
4361         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4362         to "rtx_insn *".
4363         (add_insn_after): Likewise for first two params.
4364         (add_insn_before): Likewise.
4365         (remove_insn): Likewise for param.
4366         (emit_pattern_before_noloc): Likewise for second and third params.
4367         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4368         (emit_call_insn_before_noloc): Likewise.
4369         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4370         to "rtx_insn *".
4371         (emit_barrier_before): Likewise.
4372         (emit_label_before): Strengthen "label" param from "rtx" to
4373         "rtx_code_label *".  Strengthen "before" param from "rtx" to
4374         "rtx_insn *".
4375         (emit_insn_after_1): Strengthen "after" param from "rtx" to
4376         "rtx_insn *".
4377         (emit_pattern_after_noloc): Likewise.
4378         (emit_insn_after_noloc): Likewise.
4379         (emit_jump_insn_after_noloc): Likewise.
4380         (emit_call_insn_after_noloc): Likewise.
4381         (emit_debug_insn_after_noloc): Likewise.
4382         (emit_barrier_after): Likewise.
4383         (emit_label_after): Likewise for both params.
4384         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
4385         "loc" param from "int" to "location_t".
4386         (emit_insn_after_setloc): Likewise.
4387         (emit_jump_insn_after_setloc): Likewise.
4388         (emit_call_insn_after_setloc): Likewise.
4389         (emit_debug_insn_after_setloc): Likewise.
4390         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
4391         "loc" param from "int" to "location_t".
4392         (emit_pattern_before): Convert NULL_RTX to NULL.
4393         (emit_insn_before_setloc): Convert "loc" param from "int" to
4394         "location_t".
4395         (emit_jump_insn_before_setloc): Likewise.
4396         (emit_call_insn_before_setloc): Likewise.
4397         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4398         rtx_insn *.  Convert "loc" param from "int" to "location_t".
4399         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4400         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4401         Convert 3rd param from "int" to "location_t".
4402         (emit_barrier_before, emit_barrier_after, next_real_insn):
4403         Strengthen param from rtx to rtx_insn *.
4404         (emit_label_before): Strengthen 1st param from "rtx" to
4405         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
4406         "rtx_insn *".
4407         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4408         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4409         Strengthen 2nd param from "rtx" to "rtx_insn *".
4410         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4411         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4412         Likewise. Convert 3rd param from "int" to "location_t".
4413         (emit_label_after): Strengthen 1st param from "rtx" to
4414         "rtx_code_label *".
4415         (next_real_insn, remove_insn): Strengthen param from "rtx" to
4416         "rtx_insn *".
4417         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4418         from "rtx" to "rtx_insn *".
4420 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
4422         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4423         bodies streamed in with -Q.
4424         * dumpfile.c (dump_files): Add lto-stream-out dump file.
4425         * dumpfile.h (tree_dump_index): Add lto_stream_out.
4426         * gimple-streamer-out.c: Include gimple-pretty-print.h
4427         (output_bb): Dump stmts streamed.
4428         * lto-section-out.c: Include print-tree.h
4429         (lto_begin_section): Dump sections created.
4430         (lto_output_decl_index): Dump decl encoded.
4431         * lto-streamer-out.c: Include print-tree.h
4432         (create_output_block): Dump output block created.
4433         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4434         (output_function): Dump function output.
4435         (output_constructor): Dump constructor streamed.
4436         (write_global_stream): Output indexes encoded.
4437         (produce_asm_for_decls): Dump streams encoded.
4438         * lto-streamer.c (streamer_dump_file): New global var.
4439         * lto-streamer.h (streamer_dump_file): Declare.
4440         * passes.c (ipa_write_summaries): Initialize streamer dump.
4441         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4442         in.
4444 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
4446         PR target/86048
4447         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4448         offsets for register save directives.  Emit a second batch of save
4449         directives, if need be, when the function accesses prior frames.
4451 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4453         * config/arc/fpu.md (fmasf4): Force operand to register.
4454         (fnmasf4): Likewise.
4456 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4458         * config/arc/arc-protos.h (arc_pad_return): Remove.
4459         * config/arc/arc.c (machine_function): Remove force_short_suffix
4460         and size_reason.
4461         (arc_print_operand): Adjust printing of '&'.
4462         (arc_verify_short): Remove conditional printing of short suffix.
4463         (arc_final_prescan_insn): Remove reference to size_reason.
4464         (pad_return): New function.
4465         (arc_reorg): Call pad_return.
4466         (arc_pad_return): Remove.
4467         (arc_init_machine_status): Remove reference to force_short_suffix.
4468         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4469         (attr length): When attribute iscompact is true force to 2
4470         regardless; in the case of maybe check if we want to force the
4471         instruction to have 4 bytes length.
4472         (nopv): Change it to generate 4 byte long nop as well.
4473         (blockage): New pattern.
4474         (simple_return): Remove call to arc_pad_return.
4475         (p_return_i): Likewise.
4477 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4479         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4481 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4483         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4484         ARC cores.
4486 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4488         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4489         for ARC700 and ARCv2.
4491 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
4493         PR target/86076
4494         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4495         operands[2] instead of operands[1].
4498 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
4500         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4501         case, check whether the outer register overlaps an unallocatable
4502         register, not just whether it fits the required class.
4504 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
4506         * poly-int.h (can_div_trunc_p): Add new overload in which all values
4507         are poly_ints.
4508         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4509         (memrefs_conflict_p): Likewise.
4510         (init_alias_analysis): Likewise.
4511         * cfgexpand.c (expand_debug_expr): Likewise.
4512         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4513         * cse.c (fold_rtx): Likewise.
4514         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4515         * expr.c (emit_block_move_hints): Likewise.
4516         (clear_storage_hints, push_block, emit_push_insn): Likewise.
4517         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4518         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4519         (emit_group_store): Likewise.
4520         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
4521         to read the PRE/POST_MODIFY increment.
4522         * calls.c (store_one_arg): Use strip_offset.
4523         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4524         poly_int_rtx_p.
4525         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4526         by a VEC_SELECT.
4527         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4528         (simplify_binary_operation_1): Extend CONST_INT handling to
4529         poly_int_rtx_p.
4530         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4531         than a HOST_WIDE_INT.
4532         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4533         poly_int64.
4534         (adjust_mems, add_stores): Update accodingly.
4535         (vt_canonicalize_addr): Track polynomial offsets.
4536         (emit_note_insn_var_location): Likewise.
4537         (vt_add_function_parameter): Likewise.
4538         (vt_initialize): Likewise.
4540 2018-06-12  Jeff Law  <law@redhat.com>
4542         * config.gcc (alpha*-*-freebsd*): Remove.
4543         * config/alpha/freebsd.h: Remove.
4545 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
4547         PR other/69968
4548         * spellcheck-tree.c (levenshtein_distance): Rename to...
4549         (get_edit_distance): ...this, and update for underlying renaming.
4550         * spellcheck-tree.h (levenshtein_distance): Rename to...
4551         (get_edit_distance): ...this.
4552         * spellcheck.c (levenshtein_distance): Rename to...
4553         (get_edit_distance): ...this.  Convert from Levenshtein distance
4554         to Damerau-Levenshtein distance by supporting transpositions of
4555         adjacent characters.  Rename "v1" to "v_next" and "v0" to
4556         "v_one_ago".
4557         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4558         (selftest::test_edit_distance_unit_test_oneway): ...this, and
4559         update for underlying renaming.
4560         (selftest::levenshtein_distance_unit_test): Rename to...
4561         (selftest::test_get_edit_distance_unit): ...this, and update for
4562         underlying renaming.
4563         (selftest::test_find_closest_string): Add example from PR 69968
4564         where transposition helps
4565         (selftest::test_metric_conditions): Update for renaming.
4566         (selftest::test_metric_conditions): Likewise.
4567         (selftest::spellcheck_c_tests): Likewise.
4568         * spellcheck.h (levenshtein_distance): Rename both overloads to...
4569         (get_edit_distance): ...this.
4570         (best_match::consider): Update for renaming.
4572 2018-06-12  Martin Sebor  <msebor@redhat.com>
4574         PR tree-optimization/85259
4575         * builtins.c (compute_objsize): Handle constant offsets.
4576         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4577         true iff a warning has been issued.
4578         * gimple.h (gimple_nonartificial_location): New function.
4579         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4580         gimple_nonartificial_location and handle -Wno-system-headers.
4581         (handle_builtin_stxncpy): Same.
4583 2018-06-12  Martin Sebor  <msebor@redhat.com>
4585         PR c/85931
4586         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4588 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
4590         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4591         BUILTIN_VEC_XST entries for pointer to double and long long.
4593 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
4595         PR target/85990
4596         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4597         Update comments.
4598         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4599         Likewise.
4601 2018-06-12  Martin Liska  <mliska@suse.cz>
4603         * doc/options.texi: Document IntegerRange.
4605 2018-06-12  Martin Liska  <mliska@suse.cz>
4607         * config/i386/i386.opt: Make MPX-related options as Deprecated.
4608         * opt-functions.awk: Handle Deprecated flag.
4609         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4610         and report error.
4611         (read_cmdline_option): Report warning for a deprecated option.
4612         * opts.h (struct cl_option): Add new field cl_deprecated.
4613         (CL_ERR_DEPRECATED): New.
4615 2018-06-12  Martin Liska  <mliska@suse.cz>
4617         * doc/options.texi: Document Deprecated option flag.
4619 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4621         * config/arc/arc-arch.h (arc_extras): New enum.
4622         (arc_cpu_t):Add field extra.
4623         (arc_cpu_types): Consider the extras.
4624         * config/arc/arc-cpus.def: Add extras info.
4625         * config/arc/arc-opts.h (processor_type): Consider extra field.
4626         * config/arc/arc.c (arc_override_options): Handle extra field.
4628 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4630         * config/arc/arc-arch.h: Update ARC_OPTX macro.
4631         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4632         field.
4633         * config/arc/arc.c (arc_init): Update pic warning.
4634         (irq_range): Update irq range parsing warnings.
4635         (arc_override_options): Update various warning messages.
4636         (arc_handle_aux_attribute): Likewise.
4638 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
4640         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4642 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4644         * doc/sourcebuild.texi: Document usage of line number 0 in verify
4645         compiler messages directives.
4647 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
4649         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4650         * config/mips/mips-tables.opt: Regenerate.
4651         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4652         mips64r6.
4653         * doc/invoke.texi: Document -march=i6500.
4655 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
4657         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4658         (i6400_gpmul): Add cpu_unit.
4659         (i6400_gpdiv): Likewise.
4660         (i6400_msa_add_d): Update reservations.
4661         (i6400_msa_int_add) Likewise.
4662         (i6400_msa_short_logic3) Likewise.
4663         (i6400_msa_short_logic2) Likewise.
4664         (i6400_msa_short_logic) Likewise.
4665         (i6400_msa_move) Likewise.
4666         (i6400_msa_cmp) Likewise.
4667         (i6400_msa_short_float2) Likewise.
4668         (i6400_msa_div_d) Likewise.
4669         (i6400_msa_long_logic1) Likewise.
4670         (i6400_msa_long_logic2) Likewise.
4671         (i6400_msa_mult) Likewise.
4672         (i6400_msa_long_float2) Likewise.
4673         (i6400_msa_long_float4) Likewise.
4674         (i6400_msa_long_float5) Likewise.
4675         (i6400_msa_long_float8) Likewise.
4676         (i6400_fpu_fadd): Include frint type.
4677         (i6400_fpu_store): New define_insn_reservation.
4678         (i6400_fpu_load): Likewise.
4679         (i6400_fpu_move): Likewise.
4680         (i6400_fpu_fcmp): Likewise.
4681         (i6400_fpu_fmadd): Likewise.
4682         (i6400_int_mult): Include imul3nc type and update reservation.
4683         (i6400_int_div): Include idiv3 type and update reservation.
4684         (i6400_int_load): Update to check type not move_type.
4685         (i6400_int_store): Likewise.
4686         (i6400_int_prefetch): Set zero latency.
4688 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
4690         * gcc.c: Document new %@{...} sequence.
4691         (LINK_COMMAND_SPEC): Use it for the -L switches.
4692         (cpp_unique_options): Use it for the -I switches.
4693         (at_file_argbuf): New global variable.
4694         (in_at_file): Likewise.
4695         (alloc_args): Create at_file_argbuf.
4696         (clear_args): Truncate at_file_argbuf.
4697         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4698         (open_at_file): New function.
4699         (close_at_file): Likewise.
4700         (create_at_file): Delete.
4701         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4702         <'o'>: Likewise.
4703         <'@'>: New case.
4704         (validate_switches_from_spec): Deal with %@{...} sequence.
4705         (validate_switches): Likewise.
4706         (driver::finalize): Call clear_args.
4708 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
4710         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4712 2018-06-11  Martin Sebor  <msebor@redhat.com>
4714         * doc/invoke.texi (-Wall): List -Wc++17-compat.
4715         (Wno-class-memaccess): Add @opindex.
4716         (Wno-templates, Wno-multiple-inheritance): Same.
4717         (Wno-virtual-inheritance, Wno-namespaces): Same.
4718         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4719         (Wno-format-overflow, Wno-format-truncation): Same.
4720         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4721         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4722         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4723         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4724         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4725         (Wno-misspelled-isr): Same.
4727 2018-06-11  Martin Sebor  <msebor@redhat.com>
4729         * PR tree-optimization/86083
4730         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4732 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4734         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4736 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
4738         PR target/85755
4739         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4740         on the correct operand.
4741         (*movdi_internal64): Ditto.
4743 2018-06-11  Martin Liska  <mliska@suse.cz>
4745         PR tree-optimization/86089
4746         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4748 2018-06-11  Julia Koval  <julia.koval@intel.com>
4750         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4751         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4752         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4754 2018-06-11  Olivier Hainque  <hainque@adacore.com>
4756         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4757         for Ada with strict dwarf2.
4759 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
4761         PR target/85755
4762         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4763         addresses.
4765 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
4767         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4769 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
4771         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4772         TARGET_ELF.
4774 2018-06-08  Martin Liska  <mliska@suse.cz>
4776         * tree-cfg.h (debug_function): Fix argument type to match
4777         implementation.
4779 2018-06-08  Martin Liska  <mliska@suse.cz>
4781         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4782         Remove usage of MPX-related (and removed) fields.
4783         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4785 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
4787         * cfg.c (debug): Use TDF_NONE rather than 0.
4788         * cfghooks.c (debug): Likewise.
4789         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4790         (struct dump_option_value_info): Convert to...
4791         (struct kv_pair): ...this template type.
4792         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4793         rather than 0.
4794         (optinfo_verbosity_options): Likewise.
4795         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4796         OPTGROUP_NONE.
4797         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4798         than int for "optgroup_flags" param.
4799         (dump_generic_expr_loc): Use dump_flags_t rather than int for
4800         "dump_kind" param.
4801         (dump_dec): Likewise.
4802         (dump_finish): Use TDF_NONE rather than 0.
4803         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4804         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
4805         than 0.  Update for change to option_ptr.
4806         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4807         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
4808         0.  Update for changes to optinfo_verbosity_options and
4809         optgroup_options.
4810         (opt_info_switch_p): Convert optgroup_flags from int to
4811         optgroup_flags_t.
4812         (dump_basic_block): Use dump_flags_t rather than int
4813         for "dump_kind" param.
4814         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4815         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4816         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4817         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4818         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4819         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4820         TDF_NONE): Convert from macros to...
4821         (enum dump_flag): ...this new enum.
4822         (dump_flags_t): Update to use enum.
4823         (operator|, operator&, operator~, operator|=, operator&=):
4824         Implement for dump_flags_t.
4825         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4826         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4827         Convert from macros to...
4828         (enum optgroup_flag): ...this new enum.
4829         (optgroup_flags_t): New typedef.
4830         (operator|, operator|=): Implement for optgroup_flags_t.
4831         (struct dump_file_info): Convert field "alt_flags" to
4832         dump_flags_t.  Convert field "optgroup_flags" to
4833         optgroup_flags_t.
4834         (dump_basic_block): Use dump_flags_t rather than int for param.
4835         (dump_generic_expr_loc): Likewise.
4836         (dump_dec): Likewise.
4837         (dump_register): Convert param "optgroup_flags" to
4838         optgroup_flags_t.
4839         (opt_info_enable_passes): Likewise.
4840         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4841         than 0.
4842         * gimple-pretty-print.c (debug): Likewise.
4843         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4844         (merged_store_group::apply_stores): Likewise.
4845         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4846         * gimple.c (verify_gimple_pp): Likewise.
4847         * graphite-poly.c (print_pbb_body): Likewise.
4848         * passes.c (pass_manager::register_one_dump_file): Convert
4849         local "optgroup_flags" to optgroup_flags_t.
4850         * print-tree.c (print_node): Use TDF_NONE rather than 0.
4851         (debug): Likewise.
4852         (debug_body): Likewise.
4853         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4854         to optgroup_flags_t.
4855         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4856         than 0.
4857         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4858         (convert_mult_to_fma): Likewise.
4859         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4860         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4861         * tree-vect-data-refs.c (dump_lower_bound): Convert param
4862         "dump_kind" to dump_flags_t.
4864 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4866         * config/rs6000/rs6000.c (min, max): Delete.
4868 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4870         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4871         -mabi=spe and -mabi=no-spe.
4873 2018-06-08  Martin Liska  <mliska@suse.cz>
4875         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4876         where we expect an existing summary.
4878 2018-06-08  Martin Liska  <mliska@suse.cz>
4880         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4881         * ipa-inline.h (estimate_edge_growth): Likewise.
4883 2018-06-08  Martin Liska  <mliska@suse.cz>
4885         * cgraph.c (function_version_hasher::hash): Use
4886         cgraph_node::get_uid ().
4887         (function_version_hasher::equal):
4888         * cgraph.h (cgraph_node::get_uid): New method.
4889         * ipa-inline.c (update_caller_keys): Use
4890         cgraph_node::get_uid ().
4891         (update_callee_keys): Likewise.
4892         * ipa-utils.c (searchc): Likewise.
4893         (ipa_reduced_postorder): Likewise.
4894         * lto-cgraph.c (input_node): Likewise.
4895         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4896         * symbol-summary.h (symtab_insertion): Likewise.
4897         (symtab_removal): Likewise.
4898         (symtab_duplication): Likewise.
4899         * tree-pretty-print.c (dump_function_header): Likewise.
4900         * tree-sra.c (convert_callers_for_node): Likewise.
4902 2018-06-08  Martin Liska  <mliska@suse.cz>
4904         * cgraph.c (symbol_table::create_edge): Always assign a new
4905         unique number.
4906         (symbol_table::free_edge): Do not recycle numbers.
4907         * cgraph.h (cgraph_edge::get): New method.
4908         * symbol-summary.h (symtab_removal): Use it.
4909         (symtab_duplication): Likewise.
4910         (call_summary::hashable_uid): Remove.
4912 2018-06-08  Martin Liska  <mliska@suse.cz>
4914         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4915         (initialize_growth_caches): Remove.
4916         (free_growth_caches): Likewise.
4917         (do_estimate_edge_time): Use edge_growth_cache.
4918         (do_estimate_edge_size): Likewise.
4919         (do_estimate_edge_hints): Likewise.
4920         * ipa-inline.c (reset_edge_caches): Likewise.
4921         (recursive_inlining): Likewise.
4922         (inline_small_functions): Likewise.
4923         * ipa-inline.h (initialize_growth_caches): Remove.
4924         (estimate_edge_size): Likewise.
4925         (estimate_edge_time): Likewise.
4926         (estimate_edge_hints): Likewise.
4927         (reset_edge_growth_cache): Likewise.
4928         * symbol-summary.h (call_summary::remove): New method.
4930 2018-06-08  Martin Liska  <mliska@suse.cz>
4932         * ipa-cp.c (class edge_clone_summary): New summary.
4933         (grow_edge_clone_vectors): Remove.
4934         (ipcp_edge_duplication_hook): Remove.
4935         (class edge_clone_summary_t): New call_summary class.
4936         (ipcp_edge_removal_hook): Remove.
4937         (edge_clone_summary_t::duplicate): New function.
4938         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4939         (create_specialized_node): Likewise.
4940         (ipcp_driver): Initialize edge_clone_summaries and do not
4941         register hooks.
4943 2018-06-08  Martin Liska  <mliska@suse.cz>
4945         * symbol-summary.h (get): New function.
4946         (call_summary::m_initialize_when_cloning): New class member.
4948 2018-06-08  Martin Liska  <mliska@suse.cz>
4950         * cgraph.c (cgraph_node::remove): Do not recycle uid.
4951         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4952         (symbol_table::allocate_cgraph_symbol): Do not set uid.
4953         * passes.c (uid_hash_t): Record removed_nodes by their uids.
4954         (remove_cgraph_node_from_order): Use the removed_nodes set.
4955         (do_per_function_toporder): Likwise.
4956         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4957         instead of summary_uid.
4958         (symtab_removal): Likewise.
4959         (symtab_duplication): Likewise.
4961 2018-06-08  Martin Liska  <mliska@suse.cz>
4963         * ipa-cp.c (ipcp_store_bits_results): Use
4964         ipcp_transformation_sum.
4965         (ipcp_store_vr_results): Likewise.
4966         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4967         to ...
4968         (ipcp_transformation_initialize): ... this.
4969         (ipa_set_node_agg_value_chain):
4970         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4971         (write_ipcp_transformation_info): Likewise.
4972         (read_ipcp_transformation_info): Likewise.
4973         (ipcp_update_bits): Likewise.
4974         (ipcp_update_vr): Likewise.
4975         (ipcp_transform_function): Likewise.
4976         * ipa-prop.h: Rename ipcp_transformation_summary to
4977         ipcp_transformation.
4978         (class ipcp_transformation_t): New function summary.
4979         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4980         (ipa_get_agg_replacements_for_node): Likewise.
4982 2018-06-08  Martin Liska  <mliska@suse.cz>
4984         * ipa-pure-const.c (struct funct_state_d): Do it class instead
4985         of struct.
4986         (class funct_state_summary_t): New function_summary class.
4987         (has_function_state): Remove.
4988         (get_function_state): Likewise.
4989         (set_function_state): Likewise.
4990         (add_new_function): Likewise.
4991         (funct_state_summary_t::insert): New function.
4992         (duplicate_node_data): Remove.
4993         (remove_node_data): Remove.
4994         (funct_state_summary_t::duplicate): New function.
4995         (register_hooks): Create new funct_state_summaries.
4996         (pure_const_generate_summary): Use it.
4997         (pure_const_write_summary): Likewise.
4998         (pure_const_read_summary): Likewise.
4999         (propagate_pure_const): Likewise.
5000         (propagate_nothrow): Likewise.
5001         (dump_malloc_lattice): Likewise.
5002         (propagate_malloc): Likewise.
5003         (execute): Do not register hooks, just remove summary
5004         instead.
5005         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5006         constructor.
5008 2018-06-08  Martin Liska  <mliska@suse.cz>
5010         * ipa-reference.c (remove_node_data): Remove.
5011         (duplicate_node_data): Likewise.
5012         (class ipa_ref_var_info_summary_t): New class.
5013         (class ipa_ref_opt_summary_t): Likewise.
5014         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5015         (get_reference_optimization_summary): Use
5016         ipa_ref_opt_sum_summaries.
5017         (set_reference_vars_info): Remove.
5018         (set_reference_optimization_summary): Likewise.
5019         (ipa_init): Create summaries.
5020         (init_function_info): Use function summary.
5021         (ipa_ref_opt_summary_t::duplicate): New function.
5022         (ipa_ref_opt_summary_t::remove): New function.
5023         (get_read_write_all_from_node): Fix GNU coding style.
5024         (propagate): Use function summary.
5025         (write_node_summary_p): Fix GNU coding style.
5026         (stream_out_bitmap): Likewise.
5027         (ipa_reference_read_optimization_summary): Use function summary.
5028         (ipa_reference_c_finalize): Do not release hooks.
5030 2018-06-08  Martin Liska  <mliska@suse.cz>
5032         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5033         (analyze_function_body): Extract multiple calls of get_create.
5034         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5035         * ipa-inline.c (recursive_inlining): Use ::get method.
5036         * ipa-inline.h (estimate_edge_growth): Likewise.
5038 2018-06-08  Martin Liska  <mliska@suse.cz>
5040         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5041         HSA_INVALID.
5042         (hsa_function_summary::hsa_function_summary): Use the new enum
5043         value.
5044         (hsa_gpu_implementation_p): Use hsa_summaries::get.
5045         * hsa-gen.c (hsa_get_host_function): Likewise.
5046         (get_brig_function_name): Likewise.
5047         * ipa-hsa.c (process_hsa_functions): Likewise.
5048         (ipa_hsa_write_summary): Likewise.
5049         * symbol-summary.h (symtab_duplication): Use ::get function/
5050         (get): New function.
5052 2018-06-08  Martin Liska  <mliska@suse.cz>
5054         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5055         of get.
5056         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5057         (hsa_register_kernel): Likewise.
5058         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5059         * hsa-gen.c (hsa_get_host_function): Likewise.
5060         (get_brig_function_name): Likewise.
5061         (generate_hsa): Likewise.
5062         (pass_gen_hsail::execute): Likewise.
5063         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5064         (devirtualization_time_bonus): Likewise.
5065         (ipcp_propagate_stage): Likewise.
5066         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5067         (edge_set_predicate): Likewise.
5068         (evaluate_conditions_for_known_args): Likewise.
5069         (evaluate_properties_for_edge): Likewise.
5070         (ipa_fn_summary::reset): Likewise.
5071         (ipa_fn_summary_t::duplicate): Likewise.
5072         (dump_ipa_call_summary): Likewise.
5073         (ipa_dump_fn_summary): Likewise.
5074         (analyze_function_body): Likewise.
5075         (compute_fn_summary): Likewise.
5076         (estimate_edge_devirt_benefit): Likewise.
5077         (estimate_edge_size_and_time): Likewise.
5078         (estimate_calls_size_and_time): Likewise.
5079         (estimate_node_size_and_time): Likewise.
5080         (inline_update_callee_summaries): Likewise.
5081         (remap_edge_change_prob): Likewise.
5082         (remap_edge_summaries): Likewise.
5083         (ipa_merge_fn_summary_after_inlining): Likewise.
5084         (ipa_update_overall_fn_summary): Likewise.
5085         (read_ipa_call_summary): Likewise.
5086         (inline_read_section): Likewise.
5087         (write_ipa_call_summary): Likewise.
5088         (ipa_fn_summary_write): Likewise.
5089         (ipa_free_fn_summary): Likewise.
5090         * ipa-hsa.c (process_hsa_functions): Likewise.
5091         (ipa_hsa_write_summary): Likewise.
5092         (ipa_hsa_read_section): Likewise.
5093         * ipa-icf.c (sem_function::merge): Likewise.
5094         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5095         (do_estimate_edge_time): Likewise.
5096         (estimate_size_after_inlining): Likewise.
5097         (estimate_growth): Likewise.
5098         (growth_likely_positive): Likewise.
5099         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5100         (inline_call): Likewise.
5101         * ipa-inline.c (caller_growth_limits): Likewise.
5102         (can_inline_edge_p): Likewise.
5103         (can_inline_edge_by_limits_p): Likewise.
5104         (compute_uninlined_call_time): Likewise.
5105         (compute_inlined_call_time): Likewise.
5106         (want_inline_small_function_p): Likewise.
5107         (edge_badness): Likewise.
5108         (update_caller_keys): Likewise.
5109         (update_callee_keys): Likewise.
5110         (recursive_inlining): Likewise.
5111         (inline_small_functions): Likewise.
5112         (inline_to_all_callers_1): Likewise.
5113         (dump_overall_stats): Likewise.
5114         (early_inline_small_functions): Likewise.
5115         (early_inliner): Likewise.
5116         * ipa-inline.h (estimate_edge_growth): Likewise.
5117         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5118         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5119         * ipa-prop.h (IPA_NODE_REF): Likewise.
5120         (IPA_EDGE_REF): Likewise.
5121         * ipa-pure-const.c (malloc_candidate_p): Likewise.
5122         (propagate_malloc): Likewise.
5123         * ipa-split.c (execute_split_functions): Likewise.
5124         * symbol-summary.h: Rename get to get_create.
5125         (get): Likewise.
5126         (get_create): Likewise.
5127         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5129 2018-06-08  Martin Liska  <mliska@suse.cz>
5131         * symbol-summary.h (release): Move definition out of class
5132         declaration.
5133         (symtab_removal): Likewise.
5134         (symtab_duplication): Likewise.
5136 2018-06-08  Martin Liska  <mliska@suse.cz>
5138         * symbol-summary.h (function_summary): Move constructor
5139         implementation out of class declaration.
5140         (release): Likewise.
5141         (symtab_insertion): Likewise.
5142         (symtab_removal): Likewise.
5143         (symtab_duplication): Likewise.
5144         (get): Likewise.
5146 2018-06-08  Martin Liska  <mliska@suse.cz>
5148         * Makefile.in: Remove support for MPX (macros, related functions,
5149         fields in cgraph_node, ...).
5150         * builtin-types.def (BT_BND): Likewise.
5151         (BT_FN_BND_CONST_PTR): Likewise.
5152         (BT_FN_CONST_PTR_BND): Likewise.
5153         (BT_FN_VOID_PTR_BND): Likewise.
5154         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5155         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5156         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5157         (expand_builtin_mempcpy_with_bounds): Likewise.
5158         (expand_builtin_memset_with_bounds): Likewise.
5159         (expand_builtin_memset_args): Likewise.
5160         (std_expand_builtin_va_start): Likewise.
5161         (expand_builtin): Likewise.
5162         (expand_builtin_with_bounds): Likewise.
5163         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5164         (DEF_LIB_BUILTIN_CHKP): Likewise.
5165         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5166         (DEF_CHKP_BUILTIN): Likewise.
5167         (BUILT_IN_MEMCPY): Likewise.
5168         (BUILT_IN_MEMMOVE): Likewise.
5169         (BUILT_IN_MEMPCPY): Likewise.
5170         (BUILT_IN_MEMSET): Likewise.
5171         (BUILT_IN_STPCPY): Likewise.
5172         (BUILT_IN_STRCAT): Likewise.
5173         (BUILT_IN_STRCHR): Likewise.
5174         (BUILT_IN_STRCPY): Likewise.
5175         (BUILT_IN_STRLEN): Likewise.
5176         (BUILT_IN_MEMCPY_CHK): Likewise.
5177         (BUILT_IN_MEMMOVE_CHK): Likewise.
5178         (BUILT_IN_MEMPCPY_CHK): Likewise.
5179         (BUILT_IN_MEMSET_CHK): Likewise.
5180         (BUILT_IN_STPCPY_CHK): Likewise.
5181         (BUILT_IN_STRCAT_CHK): Likewise.
5182         (BUILT_IN_STRCPY_CHK): Likewise.
5183         * calls.c (store_bounds): Likewise.
5184         (emit_call_1): Likewise.
5185         (special_function_p): Likewise.
5186         (maybe_warn_nonstring_arg): Likewise.
5187         (initialize_argument_information): Likewise.
5188         (finalize_must_preallocate): Likewise.
5189         (compute_argument_addresses): Likewise.
5190         (expand_call): Likewise.
5191         * cfgexpand.c (expand_call_stmt): Likewise.
5192         (expand_return): Likewise.
5193         (expand_gimple_stmt_1): Likewise.
5194         (pass_expand::execute): Likewise.
5195         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5196         (cgraph_node::remove): Likewise.
5197         (cgraph_node::dump): Likewise.
5198         (cgraph_node::verify_node): Likewise.
5199         * cgraph.h (chkp_function_instrumented_p): Likewise.
5200         (symtab_node::get_alias_target): Likewise.
5201         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5202         (cgraph_local_p): Likewise.
5203         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5204         (cgraph_edge::rebuild_references): Likewise.
5205         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5206         (walk_polymorphic_call_targets): Likewise.
5207         (cgraph_node::expand_thunk): Likewise.
5208         (symbol_table::output_weakrefs): Likewise.
5209         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5210         (ix86_handle_option): Likewise.
5211         * config/i386/constraints.md: Likewise.
5212         * config/i386/i386-builtin-types.def (BND): Likewise.
5213         (VOID): Likewise.
5214         (PVOID): Likewise.
5215         (ULONG): Likewise.
5216         * config/i386/i386-builtin.def (BDESC_END): Likewise.
5217         (BDESC_FIRST): Likewise.
5218         (BDESC): Likewise.
5219         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5220         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5221         * config/i386/i386.c (enum reg_class): Likewise.
5222         (ix86_target_string): Likewise.
5223         (ix86_option_override_internal): Likewise.
5224         (ix86_conditional_register_usage): Likewise.
5225         (ix86_valid_target_attribute_inner_p): Likewise.
5226         (ix86_set_indirect_branch_type): Likewise.
5227         (ix86_set_current_function): Likewise.
5228         (ix86_function_arg_regno_p): Likewise.
5229         (init_cumulative_args): Likewise.
5230         (ix86_function_arg_advance): Likewise.
5231         (ix86_function_arg): Likewise.
5232         (ix86_pass_by_reference): Likewise.
5233         (ix86_function_value_regno_p): Likewise.
5234         (ix86_function_value_1): Likewise.
5235         (ix86_function_value_bounds): Likewise.
5236         (ix86_return_in_memory): Likewise.
5237         (ix86_setup_incoming_vararg_bounds): Likewise.
5238         (ix86_va_start): Likewise.
5239         (indirect_thunk_need_prefix): Likewise.
5240         (print_reg): Likewise.
5241         (ix86_print_operand): Likewise.
5242         (ix86_expand_call): Likewise.
5243         (ix86_output_function_return): Likewise.
5244         (reg_encoded_number): Likewise.
5245         (BDESC_VERIFYS): Likewise.
5246         (ix86_init_mpx_builtins): Likewise.
5247         (ix86_init_builtins): Likewise.
5248         (ix86_emit_cmove): Likewise.
5249         (ix86_emit_move_max): Likewise.
5250         (ix86_expand_builtin): Likewise.
5251         (ix86_builtin_mpx_function): Likewise.
5252         (ix86_get_arg_address_for_bt): Likewise.
5253         (ix86_load_bounds): Likewise.
5254         (ix86_store_bounds): Likewise.
5255         (ix86_load_returned_bounds): Likewise.
5256         (ix86_store_returned_bounds): Likewise.
5257         (ix86_class_likely_spilled_p): Likewise.
5258         (ix86_hard_regno_mode_ok): Likewise.
5259         (x86_order_regs_for_local_alloc): Likewise.
5260         (ix86_mitigate_rop): Likewise.
5261         (ix86_bnd_prefixed_insn_p): Likewise.
5262         (ix86_mpx_bound_mode): Likewise.
5263         (ix86_make_bounds_constant): Likewise.
5264         (ix86_initialize_bounds): Likewise.
5265         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
5266         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
5267         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
5268         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
5269         (TARGET_CHKP_BOUND_MODE): Likewise.
5270         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
5271         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
5272         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
5273         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
5274         * config/i386/i386.h (TARGET_MPX): Likewise.
5275         (TARGET_MPX_P): Likewise.
5276         (VALID_BND_REG_MODE): Likewise.
5277         (FIRST_BND_REG): Likewise.
5278         (LAST_BND_REG): Likewise.
5279         (enum reg_class): Likewise.
5280         (BND_REG_P): Likewise.
5281         (BND_REGNO_P): Likewise.
5282         (BNDmode): Likewise.
5283         (ADJUST_INSN_LENGTH): Likewise.
5284         * config/i386/i386.md: Likewise.
5285         * config/i386/i386.opt: Likewise.
5286         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
5287         (defined): Likewise.
5288         (LINK_MPX): Likewise.
5289         (MPX_SPEC): Likewise.
5290         (LIBMPX_SPEC): Likewise.
5291         (LIBMPXWRAPPERS_SPEC): Likewise.
5292         (CHKP_SPEC): Likewise.
5293         * config/i386/predicates.md: Likewise.
5294         * dbxout.c (dbxout_type): Likewise.
5295         * doc/extend.texi: Likewise.
5296         * doc/invoke.texi: Likewise.
5297         * doc/md.texi: Likewise.
5298         * doc/tm.texi: Likewise.
5299         * doc/tm.texi.in: Likewise.
5300         * dwarf2out.c (is_base_type): Likewise.
5301         (gen_formal_types_die): Likewise.
5302         (gen_subprogram_die): Likewise.
5303         (gen_type_die_with_usage): Likewise.
5304         (gen_decl_die): Likewise.
5305         (dwarf2out_late_global_decl): Likewise.
5306         * expr.c (expand_assignment): Likewise.
5307         (emit_storent_insn): Likewise.
5308         (store_expr_with_bounds): Likewise.
5309         (store_expr): Likewise.
5310         (expand_expr_real_1): Likewise.
5311         * expr.h (store_expr_with_bounds): Likewise.
5312         * function.c (use_register_for_decl): Likewise.
5313         (struct bounds_parm_data): Likewise.
5314         (assign_parms_augmented_arg_list): Likewise.
5315         (assign_parm_find_entry_rtl): Likewise.
5316         (assign_parm_is_stack_parm): Likewise.
5317         (assign_parm_load_bounds): Likewise.
5318         (assign_bounds): Likewise.
5319         (assign_parms): Likewise.
5320         (expand_function_start): Likewise.
5321         * gcc.c (CHKP_SPEC): Likewise.
5322         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5323         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5324         (wrestrict_dom_walker::check_call): Likewise.
5325         * gimple.c (gimple_build_call_from_tree): Likewise.
5326         * gimple.h (enum gf_mask): Likewise.
5327         (gimple_call_with_bounds_p): Likewise.
5328         (gimple_call_set_with_bounds): Likewise.
5329         * gimplify.c (gimplify_init_constructor): Likewise.
5330         * ipa-cp.c (initialize_node_lattices): Likewise.
5331         (propagate_constants_across_call): Likewise.
5332         (find_more_scalar_values_for_callers_subset): Likewise.
5333         * ipa-hsa.c (process_hsa_functions): Likewise.
5334         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5335         * ipa-icf.c (sem_function::merge): Likewise.
5336         * ipa-inline.c (early_inliner): Likewise.
5337         * ipa-pure-const.c (warn_function_noreturn): Likewise.
5338         (warn_function_cold): Likewise.
5339         (propagate_pure_const): Likewise.
5340         * ipa-ref.h (enum GTY): Likewise.
5341         * ipa-split.c (find_retbnd): Likewise.
5342         (consider_split): Likewise.
5343         (split_function): Likewise.
5344         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5345         * ipa.c (walk_polymorphic_call_targets): Likewise.
5346         (symbol_table::remove_unreachable_nodes): Likewise.
5347         (process_references): Likewise.
5348         (cgraph_build_static_cdtor_1): Likewise.
5349         * lto-cgraph.c (lto_output_node): Likewise.
5350         (output_refs): Likewise.
5351         (compute_ltrans_boundary): Likewise.
5352         (input_overwrite_node): Likewise.
5353         (input_node): Likewise.
5354         (input_cgraph_1): Likewise.
5355         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5356         * passes.c (pass_manager::execute_early_local_passes): Likewise.
5357         (class pass_chkp_instrumentation_passes): Likewise.
5358         (make_pass_chkp_instrumentation_passes): Likewise.
5359         * passes.def: Likewise.
5360         * rtl.h (struct GTY): Likewise.
5361         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5362         * stor-layout.c (layout_type): Likewise.
5363         * symtab.c: Likewise.
5364         * target.def: Likewise.
5365         * targhooks.c (default_chkp_bound_type): Likewise.
5366         (default_chkp_bound_mode): Likewise.
5367         (default_builtin_chkp_function): Likewise.
5368         (default_chkp_function_value_bounds): Likewise.
5369         (default_chkp_make_bounds_constant): Likewise.
5370         (default_chkp_initialize_bounds): Likewise.
5371         * targhooks.h (default_chkp_bound_type): Likewise.
5372         (default_chkp_bound_mode): Likewise.
5373         (default_builtin_chkp_function): Likewise.
5374         (default_chkp_function_value_bounds): Likewise.
5375         (default_chkp_make_bounds_constant): Likewise.
5376         (default_chkp_initialize_bounds): Likewise.
5377         * toplev.c (compile_file): Likewise.
5378         (process_options): Likewise.
5379         * tree-core.h (DEF_BUILTIN): Likewise.
5380         (DEF_BUILTIN_CHKP): Likewise.
5381         * tree-inline.c (declare_return_variable): Likewise.
5382         (remap_gimple_stmt): Likewise.
5383         (copy_bb): Likewise.
5384         (initialize_inlined_parameters): Likewise.
5385         (expand_call_inline): Likewise.
5386         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5387         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5388         (make_pass_ipa_chkp_produce_thunks): Likewise.
5389         (make_pass_chkp): Likewise.
5390         (make_pass_chkp_opt): Likewise.
5391         (make_pass_chkp_instrumentation_passes): Likewise.
5392         * tree-pretty-print.c (dump_generic_node): Likewise.
5393         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5394         * tree-ssa-dce.c (propagate_necessity): Likewise.
5395         (eliminate_unnecessary_stmts): Likewise.
5396         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5397         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5398         * tree-ssa-sccvn.h: Likewise.
5399         * tree-ssa-strlen.c (get_string_length): Likewise.
5400         (valid_builtin_call): Likewise.
5401         (adjust_last_stmt): Likewise.
5402         (handle_builtin_strchr): Likewise.
5403         (handle_builtin_strcpy): Likewise.
5404         (handle_builtin_stxncpy): Likewise.
5405         (handle_builtin_memcpy): Likewise.
5406         (handle_builtin_strcat): Likewise.
5407         (strlen_check_and_optimize_stmt): Likewise.
5408         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5409         * tree-streamer-in.c: Likewise.
5410         * tree-streamer.c (record_common_node): Likewise.
5411         * tree.c (tree_code_size): Likewise.
5412         (wide_int_to_tree_1): Likewise.
5413         (type_contains_placeholder_1): Likewise.
5414         (build_common_tree_nodes): Likewise.
5415         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5416         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5417         (POINTER_BOUNDS_P): Likewise.
5418         (BOUNDED_TYPE_P): Likewise.
5419         (BOUNDED_P): Likewise.
5420         (CALL_WITH_BOUNDS_P): Likewise.
5421         (pointer_bounds_type_node): Likewise.
5422         * value-prof.c (gimple_ic): Likewise.
5423         * var-tracking.c (vt_add_function_parameters): Likewise.
5424         * varasm.c (make_decl_rtl): Likewise.
5425         (assemble_start_function): Likewise.
5426         (output_constant): Likewise.
5427         (maybe_assemble_visibility): Likewise.
5428         * varpool.c (ctor_for_folding): Likewise.
5429         * chkp-builtins.def: Remove.
5430         * ipa-chkp.c: Remove.
5431         * ipa-chkp.h: Remove.
5432         * rtl-chkp.c: Remove.
5433         * rtl-chkp.h: Remove.
5434         * tree-chkp-opt.c: Remove.
5435         * tree-chkp.c: Remove.
5436         * tree-chkp.h: Remove.
5438 2018-06-07  Carl Love  <cel@us.ibm.com>
5440         * config/rs6000/vsx.md (vextract_fp_from_shorth,
5441         vextract_fp_from_shortl): Add BE support.
5443 2018-06-07  Paul Koning  <ni1d@arrl.net>
5445         * compare-elim.c (try_merge_compare): Don't merge compare if
5446         address contains a side effect.
5447         (try_eliminate_compare): Likewise.
5449 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
5451         * config.gcc: Support "tremont".
5452         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5453         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5454         PROCESSOR_TREMONT.
5455         * config/i386/i386.c (m_TREMONT): Define.
5456         (processor_target_table): Add "tremont".
5457         (PTA_TREMONT): Define.
5458         (ix86_lea_outperforms): Add TARGET_TREMONT.
5459         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5460         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5461         and M_INTEL_GOLDMONT_PLUS.
5462         (fold_builtin_cpu): Add "tremont".
5463         (ix86_add_stmt_cost): Add TARGET_TREMONT.
5464         (ix86_option_override_internal): Add "tremont".
5465         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5466         (processor_type): Add PROCESSOR_TREMONT.
5467         * config/i386/x86-tune.def: Add m_TREMONT.
5468         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5470 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5472         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5473         symbol defined for msp430i* devices to be lower case.
5475 2018-06-07  Richard Biener  <rguenther@suse.de>
5477         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5478         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
5479         Properly wrap signed arithmetic if overflow wraps.
5481 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
5483         PR tree-optimization/69615
5484         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5485         of a cast from a same precision integral SSA_NAME in a bb dominated
5486         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
5487         cast to utype if rhs2 has already a compatible type.
5489 2018-06-07  Richard Biener  <rguenther@suse.de>
5491         PR tree-optimization/85935
5492         * graphite-scop-detection.c (find_params_in_bb): Analyze
5493         condition operands with respect to the correct loop.  Assert
5494         the analysis doesn't fail.
5496 2018-06-04  Carl Love  <cel@us.ibm.com>
5498         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5499         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
5500         as it is slightly cheaper.
5501         (first_match_or_eos_index_<mode>):
5502         Calculate index using natural element order.
5503         (first_match_index_<mode>):
5504         Calculate index using natural element order.
5505         (first_match_or_eos_index_<mode>):
5506         Calculate index using natural order.
5507         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5508         for BE and LE modes.
5509         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5510         P9V_BUILTIN_VCLZLSBB_V16QI.
5511         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5512         specific.
5514 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5516         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5517         indentation and line wrap for many prototypes.  Add missing
5518         @smallexample directives around block of prototypes for vec_xl and
5519         vec_xst.
5521 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
5523         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5524         track if we pass or return IEEE 128-bit floating point.
5525         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5526         C++ mangling that is compatible with GCC 8.1.
5527         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5528         (init_cumulative_args): Note if we pass or return IEEE 128-bit
5529         floating point types.
5530         (rs6000_function_arg_advance_1): Likewise.
5531         (rs6000_mangle_type): Optionally generate mangled names that match
5532         what GCC 8.1 generated for IEEE 128-bit floating point types.
5533         (rs6000_globalize_decl_name): If we have an external function that
5534         passes or returns IEEE 128-bit types, generate a weak reference
5535         from the mangled name used in GCC 8.1 to the current mangled
5536         name.
5537         (rs6000_init_builtins): Make __ibm128 use the long double type if
5538         long double is IBM extended double.  Make __float128 use the long
5539         double type if long double is IEEE 128-bit.
5541         PR target/85657
5542         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5543         macro for __ibm128 built-in functions.
5544         (PACK_IF): Add __ibm128 pack/unpack functions.
5545         (UNPACK_IF): Likewise.
5546         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5547         enable long double built-in functions if long double is IEEE
5548         128-bit floating point.
5549         (rs6000_invalid_builtin): Update long double built-in function
5550         error message.
5551         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5552         functions, adjust the built-in function to use the long double
5553         built-in function if __ibm128 and long double are the same type.
5554         * doc/extend.texi (PowerPC builtins): Update documention for
5555         __builtin_{,un}pack_longdouble.  Add documentation for
5556         __builtin_{,un}pack_ibm128.
5558 2018-06-06  Jim Wilson  <jimw@sifive.com>
5560         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5561         (struct machine_function): New field interrupt_mode.
5562         (riscv_handle_type_attribute): New function.  Add forward declaration.
5563         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5564         (riscv_expand_epilogue): Check interrupt_mode field.
5565         (riscv_set_current_function): Check interrupt attribute args and
5566         set interrupt_mode field.
5567         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5568         (riscv_sret, riscv_uret): New.
5569         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5570         new arguments to interrupt attribute.
5572 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
5574         PR target/63177
5575         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5576         Don't handle -mcpu=power8 if -mpower9-vector is also used.
5578 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5580         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5581         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5582         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5583         several redundant entries.
5585 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
5587         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5588         type from "rtx" to "rtx_insn *".
5589         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5590         for local "call_insn", removing cast.
5591         (ix86_expand_call): Likewise, introducing a "call_insn" local.
5593 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
5595         PR tree-optimization/86066
5596         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5597         for BIT_INSERT_EXPR stores.
5599 2018-06-06  Richard Biener  <rguenther@suse.de>
5601         PR tree-optimization/86062
5602         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5603         component refs ontop
5604         of to be offsetted base.
5606 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5608         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5609         to be static and remove check on interrupt attribute name.
5611 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5613         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5614         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5616 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
5618         PR target/79924
5619         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5620         second argument.
5621         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5622         Remove second argument, change how error is called.
5623         (aarch64_layout_arg): Remove second argument from
5624         aarch64_err_no_fpadvsimd call.
5625         (aarch64_init_cumulative_args): Ditto.
5626         (aarch64_gimplify_va_arg_expr): Ditto.
5627         * config/aarch64/aarch64.md (mov<mode>): Ditto.
5629 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
5631         * config/i386/i386.md (simple_return_indirect_internal): New expander.
5632         (*simple_return_indirect_internal<mode>): Rename from
5633         simple_return_indirect_internal.  Use W mode iterator.
5634         (rstorssp): New expander.
5635         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
5636         (clrssbsy): New expander.
5637         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
5639 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5641         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5642         __typeof__.
5643         (cmse_check_pointed_object): Likewise.
5645 2018-06-05  Martin Liska  <mliska@suse.cz>
5647         PR gcov-profile/47618
5648         * doc/invoke.texi: Document how -fprofile-dir format
5649         is extended.
5651 2018-06-05  Richard Biener  <rguenther@suse.de>
5653         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5654         removal pretend DOM info isn't available so we do not update
5655         it and only remove edges, not dominated blocks.  Actually free
5656         DOM info in case we removed something.  Remove unreachable blocks.
5657         (mfb_keep_latches): Work with either DOM info or marked backedges.
5658         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5659         first.  Mark backedges if DOM info isn't available.
5660         (Re-)compute DOM info after cleanup_control_flow_pre.
5662 2018-06-05  Richard Biener  <rguenther@suse.de>
5664         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5665         (locus_discrim_hasher::hash): Adjust.
5666         (locus_discrim_hasher::equal): Likewise.
5667         (next_discriminator_for_locus): Work on line directly.
5668         (same_line_p): Pass in expanded locus1 as well.
5669         (assign_discriminators): Avoid redundant location expansions.
5671 2018-06-05  Richard Biener  <rguenther@suse.de>
5673         PR tree-optimization/86046
5674         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5675         if required after clearing TREE_ADDRESSABLE.
5677 2018-06-05  Richard Biener  <rguenther@suse.de>
5679         PR tree-optimization/86047
5680         * tree-ssa-loop.c (for_each_index): Glob handling of all
5681         decls and constants and really handle all of them.
5683 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5685         PR target/81497
5686         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5687         qualifier_void_pointer and qualifier_const_void_pointer.
5688         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5689         (arm_init_builtins): Handle the above.
5690         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5691         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5692         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5693         void intrinsics.
5695 2018-06-05  Martin Liska  <mliska@suse.cz>
5697         * auto-profile.c (read_autofdo_file): Do not use
5698         gcov_ctr_summary struct.
5699         (afdo_callsite_hot_enough_for_early_inline): Likewise.
5700         * coverage.c (struct counts_entry): Likewise.
5701         (read_counts_file): Read just single summary entry.
5702         (get_coverage_counts): Use gcov_summary struct.
5703         * coverage.h (get_coverage_counts): Likewise.
5704         * gcov-dump.c (dump_working_sets): Likewise.
5705         (tag_summary): Dump just single summary.
5706         * gcov-io.c (gcov_write_summary): Write just histogram
5707         summary.
5708         (gcov_read_summary): Read just single summary.
5709         (compute_working_sets): Use gcov_summary struct.
5710         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5711         of GCOV_COUNTERS_SUMMABLE.
5712         (GCOV_COUNTERS_SUMMABLE): Remove.
5713         (GCOV_FIRST_VALUE_COUNTER): Replace with
5714         GCOV_COUNTER_V_INTERVAL.
5715         (struct gcov_ctr_summary): Remove.
5716         (struct gcov_summary): Directly use fields of former
5717         gcov_ctr_summary.
5718         (compute_working_sets): Use gcov_summary struct.
5719         * gcov.c (read_count_file): Do not use ctrs fields.
5720         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5721         struct.
5722         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5723         struct.
5724         * profile.c: Likewise.
5725         * profile.h: Likewise.
5727 2018-06-05  Martin Liska  <mliska@suse.cz>
5729         PR gcov-profile/84846
5730         * gcov.c (output_lines): Print working directory only
5731         in intermediate format.
5733 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
5735         * config/s390/s390-builtin-types.def: Add void function type.
5736         * config/s390/s390-builtins.def: Use the function type for the
5737         tbeginc builtin.
5739 2018-06-04  Jim Wilson  <jimw@sifive.com>
5741         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5742         to int.
5743         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5744         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
5745         handle EH_RETURN_DATA_REGNO registers properly.
5746         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5747         (riscv_expand_epilogue): Update comment.  Change argument name and
5748         type.  Update code to use new name and type.  Pass new args to
5749         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
5750         EXCEPTION_RETURN.
5751         * config/riscv/riscv.md (NORMAL_RETURN): New.
5752         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5753         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5754         (eh_return): Call gen_eh_return_internal and emit barrier.
5755         (eh_return_internal): Call riscv_expand_epilogue.
5757 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
5759         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5760         bit_insertion field and declare can_be_merged_into method.
5761         (merged_store_group::can_be_merged_into): New method.
5762         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5763         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
5764         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5766 2018-06-04  Richard Biener  <rguenther@suse.de>
5768         PR tree-optimization/85955
5769         * builtins.c (fold_builtin_sincos): Convert pointers to
5770         destination to appropriate type before dereferencing.
5772 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
5774         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5776 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
5778         * expr.c (expand_expr_real_1): Force the operand into memory if
5779         its TYPE_MODE is BLKmode and if there is no integer mode for
5780         the number of bits being extracted.
5782 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
5784         PR target/85832
5785         PR target/86036
5786         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5787         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5789 2018-06-04  Richard Biener  <rguenther@suse.de>
5791         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5792         (cleanup_tree_cfg_noloop): ... single caller.  Do
5793         start_recording_case_labels later.
5795 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
5797         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5798         to _IMMINTRIN_H_INCLUDED.
5799         * config/i386/pconfigintrin.h: Ditto.
5800         * config/i386/waitpkgintrin.h: Ditto.
5801         * config/i386/immintrin.h: Add includes for sgxintrin.h,
5802         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5803         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5804         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5805         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5806         waitpkgintrin.h and cldemoteintrin.h.
5808 2018-06-04  Richard Biener  <rguenther@suse.de>
5810         PR tree-optimization/86038
5811         * tracer.c (find_best_successor): Check probability for
5812         being initialized, bail out if not.
5814 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
5816         PR target/86003
5817         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5818         of bits to ignore when comparing architectures.
5820 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
5822         PR tree-optimization/69615
5823         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5824         maximum or minimum of the type, try to merge it also as if
5825         range1 is + [-, x - 1] or + [x + 1, -].
5827         PR c++/86025
5828         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5830 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
5832         PR tree-optimization/86034
5833         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5834         the unsigned bitfield type in a bit insertion sequence if it does not
5835         have a larger precision than the bitfield size.
5836         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5838 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
5840         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5842 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5844         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5845         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5846         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5847         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5849 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5851         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5852         Disable -fdelete-null-pointer-checks for ELF toolchain.
5854 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5855             Kito Cheng  <kito.cheng@gmail.com>
5857         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5858         (nds32le-*-*, nds32be-*-*): Integrate checking process.
5859         (nds32*-*-*): Add glibc and uclibc conditions.
5860         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5861         (TARGET_EXCEPT_UNWIND_INFO): Define.
5862         * config/nds32/elf.h: New file.
5863         * config/nds32/linux.h: New file.
5864         * config/nds32/nds32-elf.opt: New file.
5865         * config/nds32/nds32-linux.opt: New file.
5866         * config/nds32/nds32-fp-as-gp.c
5867         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5868         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5869         TARGET_LINUX_ABI.
5870         (nds32_asm_file_end): Ditto.
5871         (nds32_print_operand): Ditto.
5872         (nds32_insert_attributes): Ditto.
5873         (nds32_init_libfuncs): New function.
5874         (TARGET_HAVE_TLS): Define.
5875         (TARGET_INIT_LIBFUNCS): Define.
5876         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5877         spec content.
5878         (TARGET_ELF): Apply different mcmodel setting.
5879         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5880         been migrated into elf.h and linux.h files.
5881         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5882         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5883         (mcmodel): The content has been migrated into nds32-elf.opt and
5884         nds32-linux.opt files.
5885         * config/nds32/t-elf: New file.
5886         * config/nds32/t-linux: New file.
5888 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5889             Shiva Chen  <shiva0217@gmail.com>
5891         * config/nds32/constants.md (unspec_volatile_element): Add
5892         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5893         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5894         optimization.
5895         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5896         (make_pass_nds32_fp_as_gp): Declare.
5897         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5898         optmization pass.
5899         (nds32_asm_function_end_prologue): Remove unused asm output.
5900         (nds32_asm_function_begin_epilogue): Remove unused asm output.
5901         (nds32_asm_file_start): Output necessary fp_as_gp information.
5902         (nds32_option_override): Adjust register usage.
5903         (nds32_expand_prologue): Consider fp_as_gp situation.
5904         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5905         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5906         (epilogue): Ditto.
5907         (return): Ditto.
5908         (simple_return): Ditto.
5909         (omit_fp_begin): Output special directive for fp_as_gp.
5910         (omit_fp_end): Output special directive for fp_as_gp.
5911         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5912         mforbid-fp-as-gp): New options.
5914 2018-06-01  Mark Wielaard  <mark@klomp.org>
5916         * dwarf2out.c (dwarf2out_finish): Remove generation of
5917         DW_AT_loclists_base.
5919 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5921         * gimple-ssa-store-merging.c: Include gimple-fold.h.
5922         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5923         (struct merged_store_group): Add bit_insertion field.
5924         (dump_char_array): Use standard hexadecimal format.
5925         (merged_store_group::merged_store_group): Set bit_insertion to false.
5926         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
5927         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
5928         also print the mask in the dump file.
5929         (pass_store_merging::gate): Minor tweak.
5930         (imm_store_chain_info::coalesce_immediate): Fix wrong association
5931         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
5932         stores with INTEGER_CST stores.
5933         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5934         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5935         and use it throughout.  Generate bit insertion sequences if need be.
5936         (pass_store_merging::process_store): Remove redundant condition.
5937         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5939 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
5941         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5942         the 128-bit floating point types.  Fix function comment.
5944 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5946         * config/aarch64/aarch64-simd.md
5947         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5948         mnemonics.
5949         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5950         mnemonics.
5952 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5954         PR tree-optimization/85989
5955         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5956         variable.
5957         (backprop::intersect_uses): Check it when deciding whether this
5958         is a backedge reference.
5959         (backprop::process_block): Add each phi to m_visited_phis
5960         after visiting it, then clear it at the end.
5962 2018-06-01  Richard Biener  <rguenther@suse.de>
5964         * tree-vectorizer.h (vect_dr_stmt): New function.
5965         (vect_get_load_cost): Adjust.
5966         (vect_get_store_cost): Likewise.
5967         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5968         Use vect_dr_stmt instead of DR_SMTT.
5969         (vect_record_base_alignments): Likewise.
5970         (vect_calculate_target_alignment): Likewise.
5971         (vect_compute_data_ref_alignment): Likewise and make static.
5972         (vect_update_misalignment_for_peel): Likewise.
5973         (vect_verify_datarefs_alignment): Likewise.
5974         (vector_alignment_reachable_p): Likewise.
5975         (vect_get_data_access_cost): Likewise.  Pass down
5976         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5977         (vect_get_peeling_costs_all_drs): Likewise.
5978         (vect_peeling_hash_get_lowest_cost): Likewise.
5979         (vect_enhance_data_refs_alignment): Likewise.
5980         (vect_find_same_alignment_drs): Likewise.
5981         (vect_analyze_data_refs_alignment): Likewise.
5982         (vect_analyze_group_access_1): Likewise.
5983         (vect_analyze_group_access): Likewise.
5984         (vect_analyze_data_ref_access): Likewise.
5985         (vect_analyze_data_ref_accesses): Likewise.
5986         (vect_vfa_segment_size): Likewise.
5987         (vect_small_gap_p): Likewise.
5988         (vectorizable_with_step_bound_p): Likewise.
5989         (vect_prune_runtime_alias_test_list): Likewise.
5990         (vect_analyze_data_refs): Likewise.
5991         (vect_supportable_dr_alignment): Likewise.
5992         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5993         (vect_gen_prolog_loop_niters): Likewise.
5994         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5995         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5996         modify DR_STMT.
5997         (vect_recog_mask_conversion_pattern): Likewise.
5998         (vect_try_gather_scatter_pattern): Likewise.
5999         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6000         to vect_get_store_cost.
6001         (vect_get_store_cost): Get stmt_info instead of DR.
6002         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6003         (vect_get_load_cost): Get stmt_info instead of DR.
6005 2018-06-01  Richard Biener  <rguenther@suse.de>
6007         PR middle-end/86017
6008         * gimple-fold.c (var_decl_component_p): Also allow offsetted
6009         vars wrapped in MEM_REFs.
6011 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
6013         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6014         Fix subreg tests so that we only return a choice between
6015         GENERAL_REGS and FP_REGS if the original classes included both.
6017 2018-06-01  Richard Biener  <rguenther@suse.de>
6019         PR ipa/85960
6020         * tree-ssa-structalias.c (get_function_part_constraint):
6021         Handle NULL fi->decl.
6022         (find_func_aliases_for_call): Properly handle indirect
6023         fi from direct call.
6024         (find_func_clobbers): Likewise.
6025         (ipa_pta_execute): Likewise.
6026         (create_variable_info_for): For functions that are ifunc_resolver
6027         resolve to a varinfo that contains the result of the resolver call.
6028         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6029         aliases.
6031 2018-05-31  Michael Collison  <michael.collison@arm.com>
6033         * config/aarch64/aarch64.md:
6034         (*fix_to_zero_extenddfdi2): New pattern.
6035         * gcc.target/aarch64/fix_extend1.c: New testcase.
6037 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
6039         PR middle-end/78809
6040         PR middle-end/83026
6041         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6042         and BUILT_IN_STRNCMP_EQ.
6043         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6044         BUILT_IN_STRNCMP_EQ.
6045         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6046         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6047         (gimple_fold_builtin): Likewise.
6048         * tree-ssa-strlen.c (compute_string_length): New function.
6049         (determine_min_obsize): New function.
6050         (handle_builtin_string_cmp): New function to handle calls to
6051         string compare functions.
6052         (strlen_optimize_stmt): Add handling to builtin string compare
6053         calls.
6054         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6055         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6056         * tree.c (build_common_builtin_nodes): Add new defines of
6057         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6059 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
6061         PR target/85984
6062         * bb-reorder.c (pass_partition_blocks::gate): Return false for
6063         functions with naked attribute.
6065 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6067         * config/i386/sse.md (avx_vec_concat<mode>):
6068         Substitute concat_tg_mode mode attribute with xtg_mode.
6069         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6070         (concat_tg_mode): Remove mode attribute.
6072 2018-05-31  Martin Sebor  <msebor@redhat.com>
6074         PR c/82063
6075         * calls.c (alloc_max_size): Correct a logic error/typo.
6076         Treat excessive arguments as infinite.  Warn for invalid arguments.
6077         * doc/invoke.texi (-Walloc-size-larger-than): Update.
6079 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
6081         PR target/85829
6082         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6083         and movx for Haswell.
6085 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
6086             Cesar Philippidis  <cesar@codesourcery.com>
6088         PR middle-end/85879
6089         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6090         when emitting error on private/firstprivate reductions.
6091         * omp-low.c (lower_omp_target): Avoid reference-type processing
6092         on pointers for firstprivate clause.
6094 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6096         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6097         (st1x2): Likewise.
6098         (st1x3): Likewise.
6099         * config/aarch64/aarch64-simd.md
6100         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6101         (aarch64_ld1_x3_<mode>): Likewise
6102         (aarch64_st1x2<VALLDIF:mode>): Likewise
6103         (aarch64_st1_x2_<mode>): Likewise
6104         (aarch64_st1x3<VALLDIF:mode>): Likewise
6105         (aarch64_st1_x3_<mode>): Likewise
6106         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6107         (vld1_s8_x3): Likewise.
6108         (vld1_u16_x3): Likewise.
6109         (vld1_s16_x3): Likewise.
6110         (vld1_u32_x3): Likewise.
6111         (vld1_s32_x3): Likewise.
6112         (vld1_u64_x3): Likewise.
6113         (vld1_s64_x3): Likewise.
6114         (vld1_f16_x3): Likewise.
6115         (vld1_f32_x3): Likewise.
6116         (vld1_f64_x3): Likewise.
6117         (vld1_p8_x3): Likewise.
6118         (vld1_p16_x3): Likewise.
6119         (vld1_p64_x3): Likewise.
6120         (vld1q_u8_x3): Likewise.
6121         (vld1q_s8_x3): Likewise.
6122         (vld1q_u16_x3): Likewise.
6123         (vld1q_s16_x3): Likewise.
6124         (vld1q_u32_x3): Likewise.
6125         (vld1q_s32_x3): Likewise.
6126         (vld1q_u64_x3): Likewise.
6127         (vld1q_s64_x3): Likewise.
6128         (vld1q_f16_x3): Likewise.
6129         (vld1q_f32_x3): Likewise.
6130         (vld1q_f64_x3): Likewise.
6131         (vld1q_p8_x3): Likewise.
6132         (vld1q_p16_x3): Likewise.
6133         (vld1q_p64_x3): Likewise.
6134         (vst1_s64_x2): Likewise.
6135         (vst1_u64_x2): Likewise.
6136         (vst1_f64_x2): Likewise.
6137         (vst1_s8_x2): Likewise.
6138         (vst1_p8_x2): Likewise.
6139         (vst1_s16_x2): Likewise.
6140         (vst1_p16_x2): Likewise.
6141         (vst1_s32_x2): Likewise.
6142         (vst1_u8_x2): Likewise.
6143         (vst1_u16_x2): Likewise.
6144         (vst1_u32_x2): Likewise.
6145         (vst1_f16_x2): Likewise.
6146         (vst1_f32_x2): Likewise.
6147         (vst1_p64_x2): Likewise.
6148         (vst1q_s8_x2): Likewise.
6149         (vst1q_p8_x2): Likewise.
6150         (vst1q_s16_x2): Likewise.
6151         (vst1q_p16_x2): Likewise.
6152         (vst1q_s32_x2): Likewise.
6153         (vst1q_s64_x2): Likewise.
6154         (vst1q_u8_x2): Likewise.
6155         (vst1q_u16_x2): Likewise.
6156         (vst1q_u32_x2): Likewise.
6157         (vst1q_u64_x2): Likewise.
6158         (vst1q_f16_x2): Likewise.
6159         (vst1q_f32_x2): Likewise.
6160         (vst1q_f64_x2): Likewise.
6161         (vst1q_p64_x2): Likewise.
6162         (vst1_s64_x3): Likewise.
6163         (vst1_u64_x3): Likewise.
6164         (vst1_f64_x3): Likewise.
6165         (vst1_s8_x3): Likewise.
6166         (vst1_p8_x3): Likewise.
6167         (vst1_s16_x3): Likewise.
6168         (vst1_p16_x3): Likewise.
6169         (vst1_s32_x3): Likewise.
6170         (vst1_u8_x3): Likewise.
6171         (vst1_u16_x3): Likewise.
6172         (vst1_u32_x3): Likewise.
6173         (vst1_f16_x3): Likewise.
6174         (vst1_f32_x3): Likewise.
6175         (vst1_p64_x3): Likewise.
6176         (vst1q_s8_x3): Likewise.
6177         (vst1q_p8_x3): Likewise.
6178         (vst1q_s16_x3): Likewise.
6179         (vst1q_p16_x3): Likewise.
6180         (vst1q_s32_x3): Likewise.
6181         (vst1q_s64_x3): Likewise.
6182         (vst1q_u8_x3): Likewise.
6183         (vst1q_u16_x3): Likewise.
6184         (vst1q_u32_x3): Likewise.
6185         (vst1q_u64_x3): Likewise.
6186         (vst1q_f16_x3): Likewise.
6187         (vst1q_f32_x3): Likewise.
6188         (vst1q_f64_x3): Likewise.
6189         (vst1q_p64_x3): Likewise.
6191 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6193         * config/msp430/msp430.c (msp430_output_labelref): Prepend
6194         user_label_prefix to name.
6196         * tree-core.h: Update comment about the format of NAME string
6197         passed to handler in attribute_spec.
6199         * config/msp430/msp430.md: Remove erroneous subreg expression from
6200         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6201         zero_extend{q,h}isi2.
6203 2018-05-30  Borislav Petkov  <bp@suse.de>
6205         * doc/extend.texi: Document some architecture specific
6206         constraints and sort entries.
6208 2018-05-30  Martin Sebor  <msebor@redhat.com>
6210         PR middle-end/85369
6211         * builtins.c (expand_builtin_stpcpy_1): New function.
6212         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6213         only if the former succeeds.
6215 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6217         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6218         in saphira.
6220 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6222         * doc/invoke.texi (-flinker-output): Document
6224 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6226         * passes.c (ipa_write_summaries): Only modify statements if body
6227         is in memory.
6228         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6229         incrementally linking.
6230         (ipa_passes): Likewise.
6231         * lto-cgraph.c (lto_output_node): When incrementally linking do not
6232         pass down resolution info.
6233         * common.opt (flag_incremental_link): Update info.
6234         * gcc.c (plugin specs): Turn flinker-output=* to
6235         -plugin-opt=-linker-output-known
6236         * toplev.c (compile_file): Also cut compilation when doing incremental
6237         link.
6238         * flag-types. (enum lto_partition_model): Add
6239         LTO_LINKER_OUTPUT_NOLTOREL.
6240         (invoke.texi): Add -flinker-output docs.
6241         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
6242         link same way as WPA; do not stream in dead initializers.
6244         * dwarf2out.c (dwarf2out_die_ref_for_decl,
6245         darf2out_register_external_decl): Support incremental link.
6247 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6249         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
6251 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6253         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
6254         it down to simple_object_copy_lto_debug_sections.
6255         (run_gcc): Determine incremental LTO link time and configure
6256         lto1 into non-wpa mode, disable renaming of debug sections.
6258 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6260         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6261         descriptions of various incorrectly documented functions.
6263 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6265         Revert:
6266         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6267         address check not strict.
6269 2018-05-30  Richard Biener  <rguenther@suse.de>
6271         PR tree-optimization/85964
6272         * tracer.c (better_p): Drop initialized count check, we only
6273         call the function with initialized counts now.
6274         (find_best_successor): Do find a best edge if one
6275         has uninitialized count.
6276         (find_best_predecessor): Likewise.  Do BB frequency check only
6277         if count is initialized.
6279 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
6281         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
6282         (aarch64_ldrstr_offset_compare): New.
6283         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6284         load/store orderings.
6285         (aarch64_gen_adjusted_ldpstp): Likewise.
6287 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
6289         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6290         Check for subset of GENERAL_REGS and FP_REGS.
6291         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
6292         r=w alternative.
6294 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
6296         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
6297         and wi::to_poly_offset.  Add the current offset and then check
6298         whether the sum fits, rather than using an unchecked addition of
6299         a checked term.  Check for a shwi rather than a uhwi.
6300         * expr.c (get_bit_range): Use tree_to_poly_uint64.
6301         (store_constructor): Use poly_int_tree_p.
6302         (expand_expr_real_1): Likewise.
6303         * function.c (assign_temp): Likewise.
6304         * fold-const.c (const_binop): Use poly_int_tree_p and
6305         wi::to_poly_offset.
6306         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
6307         division.
6308         * ipa-icf-gimple.c (func_checker::compare_operand): Use
6309         to_poly_offset for MEM offsets.
6310         * ipa-icf.c (sem_variable::equals): Likewise.
6311         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
6312         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
6313         wi::to_poly_offset for BIT_FIELD_REF offsets.
6314         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6315         wi::to_poly_offset.
6316         * var-tracking.c (emit_note_insn_var_location): Use
6317         tree_to_poly_uint64.
6319 2018-05-29  Jim Wilson  <jimw@sifive.com>
6321         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6323 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
6325         PR target/85950
6326         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6327         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6328         sequence.
6329         (sse4_1_round<mode>2): Use nonimmediate_operand
6330         for operand 1 predicate.
6332 2018-05-29  Martin Sebor  <msebor@redhat.com>
6333             Richard Biener  <rguenther@suse.de>
6335         PR testsuite/85888
6336         * calls.c (get_size_range): Call determine_value_range instead
6337         of get_value_range..
6338         * tree-vrp.h (determine_value_range): Declared new function.
6339         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6341 2018-05-29  Richard Biener  <rguenther@suse.de>
6343         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6344         sure to use non-pattern stmts for get_earlier_stmt arguments.
6345         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6346         called on pattern stmts.
6347         (get_later_stmt): Likewise.
6349 2018-05-29  Martin Liska  <mliska@suse.cz>
6351         PR gcov-profile/85759
6352         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6353         env variables.
6355 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
6357         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6358         VEC_UNPACK_*_EXPR.
6359         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6360         VEC_PACK_*_EXPR.
6362         PR target/85918
6363         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6364         VEC_PACK_FLOAT_EXPR): New tree codes.
6365         * tree-pretty-print.c (op_code_prio): Handle
6366         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6367         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6368         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6369         * tree-inline.c (estimate_operator_cost): Likewise.
6370         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6371         * fold-const.c (const_binop): Likewise.
6372         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6373         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6374         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6375         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6376         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6377         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6378         * expr.c (expand_expr_real_2): Likewise.
6379         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6380         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6381         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6382         optabs.
6383         * optabs.c (expand_widen_pattern_expr): For
6384         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6385         sign from result type rather than operand's type.
6386         (expand_binop_directly): For vec_packu_float_optab and
6387         vec_packs_float_optab allow result type to be different from operand's
6388         type.
6389         * optabs-tree.c (optab_for_tree_code): Handle
6390         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6391         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
6392         * tree-vect-generic.c (expand_vector_operations_1):  Handle
6393         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6394         VEC_PACK_FLOAT_EXPR.
6395         * tree-vect-stmts.c (supportable_widening_operation): Handle
6396         FIX_TRUNC_EXPR.
6397         (supportable_narrowing_operation): Handle FLOAT_EXPR.
6398         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6399         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6400         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
6401         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6402         mode attributes.
6403         (vec_pack<floatprefix>_float_<mode>): New expander.
6404         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6405         attributes.
6406         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6407         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6408         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6409         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6410         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6411         Document.
6412         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6413         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6414         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6415         VEC_PACK_FLOAT_EXPR): Document.
6417 2018-05-29  Richard Biener  <rguenther@suse.de>
6419         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6420         member.
6421         (stmt_vec_info_vec): Make pointer.
6422         (init_stmt_vec_info_vec): Remove.
6423         (free_stmt_vec_info_vec): Likewise.
6424         (set_stmt_vec_info_vec): New function.
6425         (free_stmt_vec_infos): Likewise.
6426         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6427         (set_vinfo_for_stmt): Likewise.
6428         (get_earlier_stmt): Likewise.
6429         (get_later_stmt): Likewise.
6430         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6431         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6432         (vec_info::~vec_info): Free stmt_vec_infos.
6433         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6434         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6435         (pass_slp_vectorize::execute): Likewise.
6436         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6437         (free_stmt_vec_info_vec): Likewise.
6438         (set_stmt_vec_info_vec): New function.
6439         (free_stmt_vec_infos): Likewise.
6440         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6441         the global stmt_vec_info_vec.
6442         * tree-parloops.c (gather_scalar_reductions): Use
6443         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6444         vector.
6446 2018-05-29  Richard Biener  <rguenther@suse.de>
6448         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6450 2018-05-29  Martin Liska  <mliska@suse.cz>
6451             David Malcolm  <dmalcolm@redhat.com>
6453         * vec.c (test_reverse): New.
6454         (vec_c_tests): Add new test.
6455         * vec.h (vl_ptr>::reverse): New function.
6457 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
6459         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6461         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6462         and later.
6464 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6466         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6468 2018-05-28  Richard Biener  <rguenther@suse.de>
6470         PR tree-optimization/85933
6471         * tree-vect-data-refs.c (vect_record_base_alignments): Only
6472         look at stmts marked as vectorizable.
6474 2018-05-28  Richard Biener  <rguenther@suse.de>
6476         PR tree-optimization/85934
6477         * tree-vect-generic.c (expand_vector_operations_1): Hoist
6478         vector boolean check before scalar optimization.
6480 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
6482         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6483         for armv5te.
6485 2018-05-28  Mark Wielaard  <mark@klomp.org>
6487         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6488         if it is an expression containing a minus sign.
6490 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
6492         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6494 2018-05-27  Paul Koning  <ni1d@arrl.net>
6496         * config/pdp11/pdp11.md (truncsihi2): Remove.
6498 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
6499             Chung-Ju Wu  <jasonwucj@gmail.com>
6501         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6502         implementation.
6503         (unaligned_store_dw): Ditto.
6504         * config/nds32/nds32-memory-manipulation.c
6505         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6506         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6507         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6508         (emit_setmem_word_loop): Rename to ...
6509         (emit_setmem_doubleword_loop): ... this.
6510         (nds32_gen_dup_4_byte_to_word_value): New function.
6511         (nds32_gen_dup_8_byte_to_double_word_value): New function.
6512         (nds32_expand_setmem_loop): Refine implementation.
6513         (nds32_expand_setmem_loop_v3m): Ditto.
6514         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6515         pattern.
6517 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6519         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6521 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6523         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6524         (nds32_init_machine_status): Initialize machine->attr_naked_p and
6525         machine->attr_no_prologue_p.
6526         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6527         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6528         (nds32_expand_epilogue): Consider attr_naked_p.
6529         (nds32_expand_epilogue_v3pop): Likewise.
6530         (nds32_can_use_return_insn): Likewise.
6531         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6532         attr_no_prologue_p fields.
6533         * config/nds32/nds32.opt (mret-in-naked-func): New option.
6535 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
6537         PR target/85918
6538         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6539         attributes.
6540         * config/i386/sse.md
6541         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6542         Rename to ...
6543         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6544         ... this.
6545         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6546         Rename to ...
6547         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6548         ... this.
6549         (*<floatsuffix>floatv2div2sf2): Rename to ...
6550         (*float<floatunssuffix>v2div2sf2): ... this.
6551         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6552         (float<floatunssuffix>v2div2sf2_mask): ... this.
6553         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6554         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6555         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6556         to ...
6557         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6558         ... this.
6559         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6560         Rename to ...
6561         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6562         ... this.
6563         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6564         Rename to ...
6565         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6566         ... this.
6567         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6568         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6569         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6570         gen_ufix_truncv8dfv8si2.
6571         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6572         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6573         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6574         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6575         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6576         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6577         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6578         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6580 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6582         PR target/85900
6583         PR target/85345
6584         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6586 2018-05-25  Jim Wilson  <jimw@sifive.com>
6588         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6589         * config/riscv/riscv.c (struct machine_function): Add
6590         interrupt_handler_p and attribute_checked_p fields.
6591         (riscv_attribute_table): Add interrupt.
6592         (riscv_interrupt_type_p): New.
6593         (riscv_save_reg_p): Save extra regs for interrupt handler.
6594         (riscv_use_save_libcall): Return false  for interrupt handler.
6595         (riscv_first_stack_step): Add forward declaration.
6596         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
6597         for interrupt handler with large frame.  Use it for saved reg list.
6598         (riscv_expand_prologue): Move flag_stack_usage_info support to
6599         eliminate duplication.
6600         (riscv_expand_epilogue): Generate mret for interrupt handler.
6601         (riscv_epilogue_uses): New.
6602         (riscv_can_use_return_insn): Return false for interrupt handler.
6603         (riscv_function_ok_for_sibcall): Likewise.
6604         (riscv_set_current_function): Add interrupt handler support.
6605         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6606         * config/riscv/riscv.md (UNSPECV_MRET): New.
6607         (GP_REGNUM): New.
6608         (riscv_frflags, riscv_fsflags): Use tab after opcode.
6609         (riscv_mret): New.
6610         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6612 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
6614         PR tree-optimization/85712
6615         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6616         this candidate has already been replaced in-situ by a copy.
6618 2018-05-25  Jason Merrill  <jason@redhat.com>
6620         PR c++/80485 - inline function non-zero address.
6621         * symtab.c (nonzero_address): Check DECL_COMDAT.
6623 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
6625         PR target/83628
6626         * config/alpha/alpha.md (ashlsi3): New insn pattern.
6627         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
6628         extension of SImode operation.  Use const123_operand predicate.
6629         (*saddsi_1): Remove.
6630         (*saddl_se_1): Ditto.
6631         (*ssubsi_1): Ditto.
6632         (*ssubl_se_1): Ditto.
6633         * config/alpha/predicates.md (const123_operand): New predicate.
6634         * config/alpha/constraints.md (P): Use IN_RANGE.
6636 2018-05-25  Richard Biener  <rguenther@suse.de>
6638         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6639         defaulted to true.
6640         (ref_maybe_used_by_stmt_p): Likewise.
6641         (stmt_may_clobber_ref_p): Likewise.
6642         (stmt_may_clobber_ref_p_1): Likewise.
6643         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6644         and pass it along.
6645         (ref_maybe_used_by_stmt_p): Likewise.
6646         (stmt_may_clobber_ref_p): Likewise.
6647         (stmt_may_clobber_ref_p_1): Likewise.
6648         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6649         the alias oracle to disambiguate DRs with stmts DR analysis
6650         couldn't handle.
6651         (vect_analyze_data_refs): Do not give up on not analyzable
6652         DRs for BB vectorization.  Remove code truncating the dataref
6653         vector.
6655 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
6657         PR target/85832
6658         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6659         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
6660         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6662 2018-05-25  Richard Biener  <rguenther@suse.de>
6664         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6665         function, combining stmt data ref gathering and fatal analysis
6666         parts.
6667         (vect_analyze_data_refs): Remove now redudnant code and simplify.
6668         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6669         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6670         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6671         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6673 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6675         PR tree-optimization/85720
6676         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6677         SCC if all partitions are builtins.
6678         (version_loop_by_alias_check): New parameter.  Generate cancelable
6679         runtime alias check if all partitions are builtins.
6680         (distribute_loop): Update call to above function.
6682 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6684         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6685         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6686         (parm_default_def_partition_arg): Ditto.
6687         (set_parm_default_def_partition): Ditto.
6688         (get_parm_default_def_partitions): Ditto and make it static.
6689         (get_undefined_value_partitions): Ditto and make it static.
6690         (remove_ssa_form): Refactor call to init_var_map here.
6691         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6692         computation for loop region.
6693         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6694         (register_default_def): Delete.
6695         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6696         (parm_default_def_partition_arg): Ditto.
6697         (set_parm_default_def_partition): Ditto.
6698         (get_parm_default_def_partitions): Ditto and make it static.
6699         (get_undefined_value_partitions): Ditto and make it static.
6700         (coalesce_with_default, coalesce_with_default): Update comment.
6701         (create_coalesce_list_for_region): New func factored out from
6702         create_outofssa_var_map.
6703         (populate_coalesce_list_for_outofssa): New func factored out from
6704         create_outofssa_var_map and coalesce_ssa_name.
6705         (create_outofssa_var_map): Delete.
6706         (coalesce_ssa_name): Refactor to support live range computation.
6707         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6708         (get_parm_default_def_partitions): Delete.
6709         (get_undefined_value_partitions): Ditto.
6710         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6711         computation for loop region.
6712         (new_tree_live_info, loe_visit_block): Ditto.
6713         (live_worklist, set_var_live_on_entry): Ditto.
6714         (calculate_live_on_exit, verify_live_on_entry): Ditto.
6715         * tree-ssa-live.h (struct _var_map): New fields.
6716         (init_var_map): Change decl.
6717         (region_contains_p): New.
6719 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6721         * tree-ssa-live.h (live_merge_and_clear): Delete.
6723 2018-05-25  Richard Biener  <rguenther@suse.de>
6725         PR c++/85912
6726         * tree-dump.c (dequeue_and_dump): Remove access to removed
6727         operand 2 of a SWITCH_EXPR.
6729 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6731         * doc/sourcebuild.texi (vect_double_cond_arith): Include
6732         multiplication and division.
6733         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6734         (cond_udiv@var{m}, cond_umod@var{m}): Document.
6735         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6736         (cond_udiv_optab, cond_umod_optab): New optabs.
6737         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6738         (IFN_COND_RDIV): New internal functions.
6739         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6740         TRUNC_MOD_EXPR and RDIV_EXPR.
6741         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6742         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6743         New unspecs.
6744         (SVE_INT_BINARY): Include mult.
6745         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6746         (optab, sve_int_op): Handle mult.
6747         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6748         UNSPEC_COND_DIV.
6749         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6750         for SVE_INT_BINARY_SD.
6752 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6754         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6755         (optab, sve_int_op): Handle div and udiv.
6756         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6757         for SVE_INT_BINARY_SD.
6758         (*<optab><mode>3): New insn for the same.
6760 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6762         * tree-vect-patterns.c: Include predict.h.
6763         (vect_recog_divmod_pattern): Restrict check for division support
6764         to when optimizing for size.
6766 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6768         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6769         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6770         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6771         (gimple_match_op::set_op): Likewise.
6772         (gimple_resimplify4): Declare.
6773         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6774         (expr::gen_transform): Likewise.
6775         (decision_tree::gen): Generate a simplification routine for 4 operands.
6776         * gimple-match-head.c (gimple_simplify): Add an overload for
6777         4 operands.  In the top-level function, handle up to 4 call
6778         arguments and call gimple_resimplify4.
6779         (gimple_resimplify4): New function.
6780         (build_call_internal): Pass a fourth operand.
6781         (maybe_push_to_seq): Likewise.
6782         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6783         Fold VEC_COND_EXPRs of an operation and a default value into
6784         an IFN_COND_* function if possible.
6785         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6786         New unspecs.
6787         (SVE_COND_FP_BINARY): Include them.
6788         (optab, sve_fp_op): Handle them.
6789         (SVE_INT_BINARY_REV): New code iterator.
6790         (SVE_COND_FP_BINARY_REV): New int iterator.
6791         (commutative): New int attribute.
6792         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6793         Declare.
6794         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6795         function.
6796         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6797         (*cond_<optab><mode>): New patterns for reversed operands.
6799 2018-05-25  Richard Biener  <rguenther@suse.de>
6801         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6802         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6803         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6804         (STMT_VINFO_GROUPED_ACCESS): Adjust.
6805         * tree-vect-data-refs.c (everywhere): Adjust users.
6806         * tree-vect-loop.c (everywhere): Likewise.
6807         * tree-vect-slp.c (everywhere): Likewise.
6808         * tree-vect-stmts.c (everywhere): Likewise.
6809         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6811 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6813         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6814         Rename to...
6815         (gcc_cv_as_section_exclude): ... this.
6816         Try Solaris as #exclude syntax.
6817         * configure: Regenerate.
6818         * config.in: Regenerate.
6819         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6820         SECTION_EXCLUDE.
6821         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6822         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6824         * varasm.c (default_elf_asm_named_section): Don't check if
6825         HAVE_GAS_SECTION_EXCLUDE is defined.
6827 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6829         * doc/md.texi: Update the documentation of the cond_* optabs
6830         to mention the new final operand.  Fix GET_MODE_NUNITS call.
6831         Describe the scalar case too.
6832         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6833         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6834         instead of 2.
6835         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6836         (get_conditional_internal_fn): Update comment.
6837         * tree-vect-loop.c (vectorizable_reduction): Pass the original
6838         accumulator value as a final argument to conditional functions.
6839         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6840         a define_expand and add an "else" operand.  Assert for now that
6841         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
6842         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6843         (*cond_<optab><mode>): New patterns.
6844         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6845         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6846         (UNSPEC_COND_EOR): Delete.
6847         (optab): Remove associated mappings.
6848         (SVE_INT_BINARY): New code iterator.
6849         (sve_int_op): Remove int attribute and add "minus" to the code
6850         attribute.
6851         (SVE_COND_INT_OP): Delete.
6852         (SVE_COND_FP_OP): Rename to...
6853         (SVE_COND_FP_BINARY): ...this.
6855 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6857         * optabs.c (can_reuse_operands_p): New function.
6858         (maybe_legitimize_operands): Try to reuse the results for
6859         earlier operands.
6861 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6863         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6864         Add {q} suffix to insn mnemonic.
6866 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6868         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6869         (msp430_warn_func_return): New.
6871 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
6873         * fold-const.c (tree_nonzero_bits): New function.
6874         * fold-const.h (tree_nonzero_bits): Likewise.
6875         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6876         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6878 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6880         PR target/85900
6881         PR target/85345
6882         * varasm.c (assemble_alias): Check ifunc_resolver only on
6883         FUNCTION_DECL.
6885 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6887         PR target/85903
6888         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6889         when memory input operand is handled.
6891 2018-05-24  Luis Machado  <luis.machado@linaro.org>
6893         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6894         global.
6895         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6897 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6899         * match.pd: Delay FMA folds until after vectorization.
6901 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6903         PR target/83009
6904         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6905         address check not strict.
6907 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6909         * gimple-match.h (gimple_match_op): New class.
6910         (mprts_hook): Replace parameters with a gimple_match_op *.
6911         (maybe_build_generic_op): Likewise.
6912         (gimple_simplified_result_is_gimple_val): Replace parameters with
6913         a const gimple_match_op *.
6914         (gimple_simplify): Replace code_helper * and tree * parameters with
6915         a gimple_match_op * parameter.
6916         (gimple_resimplify1): Replace code_helper *, tree and tree *
6917         parameters with a gimple_match_op * parameter.
6918         (gimple_resimplify2): Likewise.
6919         (gimple_resimplify3): Likewise.
6920         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6921         parameters with a gimple_match_op * parameter.
6922         * gimple-match-head.c (gimple_simplify): Change prototypes of
6923         auto-generated functions to take a gimple_match_op * instead of
6924         separate code_helper * and tree * parameters.  Make the same
6925         change in the top-level overload and update calls to the
6926         gimple_resimplify routines.  Update calls to the auto-generated
6927         functions and to maybe_push_res_to_seq in the publicly-facing
6928         operation-specific gimple_simplify overloads.
6929         (gimple_match_op::MAX_NUM_OPS): Define.
6930         (gimple_resimplify1): Replace rcode and ops with a single res_op
6931         parameter.  Update call to gimple_simplify.
6932         (gimple_resimplify2): Likewise.
6933         (gimple_resimplify3): Likewise.
6934         (mprts_hook): Replace parameters with a gimple_match_op *.
6935         (maybe_build_generic_op): Likewise.
6936         (build_call_internal): Replace type, nargs and ops with
6937         a gimple_match_op *.
6938         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6939         with a single gimple_match_op *.  Update calls to mprts_hook,
6940         build_call_internal and gimple_simplified_result_is_gimple_val.
6941         Factor out code that is common to the tree_code and combined_fn cases.
6942         * genmatch.c (expr::gen_transform): Replace tem_code and
6943         tem_ops with a gimple_match_op called tem_op.  Update calls
6944         to the gimple_resimplify functions and maybe_push_res_to_seq.
6945         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6946         res_ops.  Update call to the gimple_resimplify functions.
6947         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6948         (decision_tree::gen): Make the functions take a gimple_match_op *
6949         called res_op instead of separate res_code and res_ops parameters.
6950         Update call accordingly.
6951         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6952         and ops with a single res_op parameter.  Update calls to
6953         maybe_build_generic_op and maybe_push_res_to_seq.
6954         (fold_stmt_1): Update calls to gimple_simplify and
6955         replace_stmt_with_simplification.
6956         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6957         and gimple_simplified_result_is_gimple_val.
6958         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6959         gimple_simplify.
6960         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6961         with a gimple_match_op *.
6962         (vn_nary_build_or_lookup): Likewise.  Update call to
6963         vn_nary_build_or_lookup_1.
6964         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6965         gimple_match_op *.  Update calls to the gimple_resimplify routines
6966         and to gimple_simplified_result_is_gimple_val.
6967         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6968         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6969         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6970         (visit_nary_op): Likewise.
6971         (visit_reference_op_load): Likewise.
6973 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6975         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6976         modifier for printing the step amount.
6978 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
6980         PR target/78849
6981         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6982         types.
6984 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
6986         * doc/sourcebuild.texi (Endianness): New subsubsection.
6988 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6990         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6991         <prefetch_dynamic_strides>: New const bool field.
6992         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6993         prefetch_dynamic_strides.
6994         (exynosm1_prefetch_tune): Likewise.
6995         (thunderxt88_prefetch_tune): Likewise.
6996         (thunderx_prefetch_tune): Likewise.
6997         (thunderx2t99_prefetch_tune): Likewise.
6998         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6999         false.
7000         (aarch64_override_options_internal): Update to set
7001         PARAM_PREFETCH_DYNAMIC_STRIDES.
7002         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7003         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7004         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7005         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7006         prefetch-dynamic-strides setting.
7008 2018-05-23  Luis Machado  <luis.machado@linaro.org>
7010         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7011         <minimum_stride>: New const int field.
7012         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7013         minimum_stride field defaulting to -1.
7014         (exynosm1_prefetch_tune): Likewise.
7015         (thunderxt88_prefetch_tune): Likewise.
7016         (thunderx_prefetch_tune): Likewise.
7017         (thunderx2t99_prefetch_tune): Likewise.
7018         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7019         <default_opt_level>: Set to 3.
7020         (aarch64_override_options_internal): Update to set
7021         PARAM_PREFETCH_MINIMUM_STRIDE.
7022         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7023         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7024         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7025         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7026         stride is constant and is below the minimum stride threshold.
7028 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7030         * config/arm/arm-cpus.in (mode26): Delete.
7031         (armv4): Delete mode26 reference.
7032         * config/arm/arm.c (arm_configure_build_target): Delete use of
7033         isa_bit_mode26.
7035 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
7037         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7038         New insn pattern.
7039         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7040         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
7041         for non-SSE modes.
7042         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
7043         (floatunsdidf2): Ditto.
7045 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
7047         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7048         (fixuns_trunc<mode>si2_avx512f): Ditto.
7049         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7050         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7051         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7053 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
7055         PR rtl-optimization/79985
7056         * df-scan.c (df_insn_refs_collect): Remove special case for
7057         global registers and asm statements.
7059 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
7061         * extend.texi (Global Register Variables): Rewrite the bullet list.
7062         Note that the register is available for allocation. Note that access
7063         via inline asm must use constraints. Add note about async-signal
7064         handlers. Remove paragraph about automagic register selection.
7066 2018-05-23  Richard Biener  <rguenther@suse.de>
7068         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7069         of fixed offset from memset VN.
7071 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
7073         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7074         first_interp field.
7075         (alloc_cand_and_find_basis): Initialize first_interp field.
7076         (slsr_process_mul): Modify first_interp field.
7077         (slsr_process_add): Likewise.
7078         (slsr_process_cast): Modify first_interp field for each new
7079         interpretation.
7080         (slsr_process_copy): Likewise.
7081         (dump_candidate): Dump first_interp field.
7082         (replace_mult_candidate): Process all interpretations, not just
7083         subsequent ones.
7084         (replace_rhs_if_not_dup): Likewise.
7085         (replace_one_candidate): Likewise.
7087 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
7089         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7090         Add new boolean.
7091         (aarch64_needs_frame_chain): New function.
7092         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7094 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
7096         PR target/84882
7097         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7098         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7099         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7100         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7101         as true for strict-align.
7102         (aarch64_can_inline_p): Perform checks even when callee has no
7103         attributes to check for strict alignment.
7104         * doc/extend.texi (AArch64 Function Attributes): Document
7105         no-strict-align.
7106         * doc/invoke.texi: (AArch64 Options): Likewise.
7108 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
7110         PR tree-optimization/85853
7111         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7112         the handling of the root of the node to...
7113         (vect_slp_analyze_node_operations_1): ...this new function,
7114         and run the whole thing with the child nodes' def types
7115         set according to their SLP node's def type.
7117 2018-05-23  Richard Biener  <rguenther@suse.de>
7119         PR middle-end/85874
7120         * tree-data-ref.c (create_runtime_alias_checks): Defer
7121         and ignore overflow warnings.
7123 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
7125         PR tree-optimization/85822
7126         * tree-vrp.c (is_masked_range_test): Fix handling of negative
7127         constants.
7129 2018-05-23  Richard Biener  <rguenther@suse.de>
7131         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7132         memset constants via native_interpret_expr.
7134 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
7136         PR target/85345
7137         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7138         attribute.
7139         (cgraph_node::create_alias): Likewise.
7140         (cgraph_node::get_availability): Check ifunc_resolver instead
7141         of looking up ifunc attribute.
7142         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7143         * varasm.c (do_assemble_alias): Likewise.
7144         (assemble_alias): Likewise.
7145         (default_binds_local_p_3): Likewise.
7146         * cgraph.h (cgraph_node): Add ifunc_resolver.
7147         (cgraph_node::only_called_directly_or_aliased_p): Return false
7148         for IFUNC resolver.
7149         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7150         attribute.
7151         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7152         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7153         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7154         instead of looking up ifunc attribute.
7156 2018-05-22  Luis Machado  <luis.machado@linaro.org>
7158         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7160 2018-05-22  Martin Sebor  <msebor@redhat.com>
7162         PR middle-end/85359
7163         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7164         only when expasion succeeds.
7165         (expand_builtin_strcmp): Same.
7166         (expand_builtin_strncmp): Same.
7168 2018-05-22  Martin Sebor  <msebor@redhat.com>
7170         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7172 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
7173             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7175         * config/aarch64/aarch64-ldpstp.md: Replace uses of
7176         aarch64_mem_pair_operand with memory_operand and delete operand swapping
7177         code.
7178         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7179         Add check for legitimate_address.
7180         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7181         (aarch64_swap_ldrstr_operands): New.
7182         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7183         Define prototype.
7185 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
7186             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7188         * config/aarch64/aarch64.md: New patterns to generate stp
7189         and ldp.
7190         (store_pair_sw, store_pair_dw): New patterns to generate stp for
7191         single words and double words.
7192         (load_pair_sw, load_pair_dw): Likewise.
7193         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7194         Delete.
7195         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7196         Delete.
7197         * config/aarch64/aarch64-ldpstp.md: Modify peephole
7198         for different mode ldpstp and add peephole for merged zero stores.
7199         Likewise for loads.
7200         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7201         Add size check.
7202         (aarch64_gen_store_pair): Rename calls to match new patterns.
7203         (aarch64_gen_load_pair): Rename calls to match new patterns.
7204         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7205         (load_pair<DREG:mode><DREG2:mode>): ... This.
7206         (store_pair<mode>): Rename to...
7207         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7208         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7209         New mode iterators.
7210         (V_INT_EQUIV): Handle SImode.
7211         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7212         New predicate.
7214 2018-05-22  Martin Sebor  <msebor@redhat.com>
7216         PR c/85623
7217         * calls.c (maybe_warn_nonstring_arg): Use string length to set
7218         or ajust the presumed bound on an operation to avoid unnecessary
7219         warnings.
7221 2018-05-22  Martin Sebor  <msebor@redhat.com>
7223         PR tree-optimization/85826
7224         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7225         assuming that a DECL necesarily has a constant size.
7227 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
7229         PR middle-end/85862
7230         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7232 2018-05-22  Richard Biener  <rguenther@suse.de>
7234         PR tree-optimization/85834
7235         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
7236         non-constant and non-zero memset arguments.
7238 2018-05-22  Martin Liska  <mliska@suse.cz>
7240         PR ipa/85607
7241         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
7243 2018-05-22  Richard Biener  <rguenther@suse.de>
7245         PR tree-optimization/85863
7246         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
7247         comparisons when vectype is specified.
7248         (vectorizable_condition): Do not specify vectype for
7249         vect_is_simple_cond when SLP vectorizing.
7251 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
7253         PR target/85657
7254         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
7255         define __ibm128 as long double.
7256         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
7257         as a distinct type when IEEE 128-bit support is enabled.
7258         (init_float128_ieee): Fix up conversions between IFmode and IEEE
7259         128-bit types to use the correct functions.
7260         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
7261         convert between 128-bit floating point types that have different
7262         modes but the same representation, instead of using gen_lowpart to
7263         makean alias.
7264         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
7265         KFmode.
7266         (IFKF_reg): New attributes to give the register constraints for
7267         IFmode and KFmode.
7268         (extend<mode>tf2_internal): New insns to mark an explicit
7269         conversion between 128-bit floating point types that have a
7270         different mode but share the same representation.
7272 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
7274         PR tree-optimization/85814
7275         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
7276         a null return from get_strinfo when unsharing the next
7277         strinfo in the chain.
7279 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7281         PR gcc/84923
7282         * varasm.c (weak_finish): Clean up weak_decls.
7284 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7286         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
7287         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
7288         UNSPEC_UADALP values.
7289         * config/aarch64/iterators.md (ABAL): New int iterator.
7290         (ABDL2): Likewise.
7291         (ADALP): Likewise.
7292         (sur): Add mappings for the above.
7293         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
7294         New define_insn.
7295         (aarch64_<sur>abal<mode>_4): Likewise.
7296         (aarch64_<sur>adalp<mode>_3): Likewise.
7297         (<sur>sadv16qi): New define_expand.
7299 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
7301         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
7302         (*movdf_internal): Ditto.
7303         (*rcpsf2_sse): Ditto.
7304         (*rsqrtsf2_sse): Ditto.
7305         (*sqrt<mode>2_sse): Ditto.
7307 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
7309         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
7310         eor3q<mode>4.
7311         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
7312         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
7313         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
7314         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7315         vbcaxq_s64): New.
7316         * config/aarch64/arm_neon.h: Likewise.
7317         * config/aarch64/iterators.md (VQ_I): New.
7319 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
7321         * config.gcc: Add arc/t-multilib-linux to tmake_file for
7322         arc*-*-linux*.
7323         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7324         MULTILIB_DIRNAMES
7326 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7328         * config/nds32/constraints.md (S): New constraint.
7329         * config/nds32/nds32.md (call_internal): Use constraint S.
7330         (call_value_internal): Likewise.
7331         (sibcall_internal): Likewise.
7332         (sibcall_value_internal): Likewise.
7334 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7335             Chung-Ju Wu  <jasonwucj@gmail.com>
7337         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7338         into consideration.
7340 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7341             Chung-Ju Wu  <jasonwucj@gmail.com>
7343         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7344         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7345         (nds32_rtx_costs_impl): Simplify.
7346         (nds32_address_cost_impl): Simplify.
7347         (nds32_init_rtx_costs): New function.
7348         (nds32_rtx_costs_speed_prefer): Likewise.
7349         (nds32_rtx_costs_size_prefer): Likewise.
7350         (nds32_address_cost_speed_prefer): Likewise.
7351         (nds32_address_cost_speed_fwprop): Likewise.
7352         (nds32_address_cost_size_prefer): Likewise.
7353         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7354         * config/nds32/nds32.c (nds32_option_override): Use
7355         nds32_init_rtx_costs function.
7357 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7359         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7360         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7361         (TARGET_PIPELINE_N8): Likewise.
7362         (TARGET_PIPELINE_N10): Likewise.
7363         (TARGET_PIPELINE_N13): Likewise.
7364         (TARGET_PIPELINE_GRAYWOLF): Likewise.
7366 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
7368         * config/nds32/nds32-fpu.md: Update copyright year.
7370 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7372         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7374 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7376         * config/nds32/nds32.c
7377         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7378         * config/nds32/nds32.opt (minline-asm-r15): New option.
7380 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7382         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7383         MASK_HW_ABS.
7384         * config/nds32/nds32.md (abssi2): New pattern.
7386 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
7388         * config/i386/i386.md (rex64namesuffix): New mode attribute.
7389         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7390         Merge insn pattern from sse_cvtsi2ss<round_name> and
7391         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7392         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7393         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7394         using SWI48 mode iterator.
7395         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7396         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7397         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7398         pattern from sse_cvttss2si<round_saeonly_name>
7399         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7400         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7401         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7402         using SWI48 mode iterator.
7403         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7404         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7405         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7406         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7407         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7408         using SWI48 mode iterator.
7409         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7410         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7411         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7412         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7413         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7414         SWI48 mode iterator.
7415         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7416         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7417         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7418         pattern from sse_cvttsd2si<round_saeonly_name>
7419         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7421 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7423         * config/nds32/nds32-md-auxiliary.c
7424         (nds32_valid_smw_lwm_base_p): Refine.
7425         (nds32_output_smw_single_word): Refine.
7426         (nds32_output_smw_double_word): New.
7427         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7429 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7431         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7432         (nds32_output_stack_pop): Refine.
7433         (nds32_expand_unaligned_load): Refine.
7434         (nds32_expand_unaligned_store): Refine.
7436 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7437             Chung-Ju Wu  <jasonwucj@gmail.com>
7439         * config/nds32/constants.md: Add TP_REGNUM constant.
7440         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7441         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7442         UNSPEC_ADD32.
7443         * config/nds32/nds32-doubleword.md: Consider flag_pic.
7444         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7445         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7446         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7447         and PIC code generation.
7448         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7449         code generation.
7450         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7451         optimization.
7452         * config/nds32/nds32.md: Support TLS and PIC.
7453         * config/nds32/nds32.c: Support TLS and PIC.
7454         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7455         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7456         predicate.
7458 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7460         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7461         mode with E_ prefix.
7463 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7464             Chung-Ju Wu  <jasonwucj@gmail.com>
7466         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7467         * config/nds32/nds32-md-auxiliary.c
7468         (symbolic_reference_mentioned_p): New.
7469         (nds32_legitimize_ict_address): New.
7470         (nds32_expand_ict_move): New.
7471         (nds32_indirect_call_referenced_p): New.
7472         (nds32_symbol_binds_local_p): Delete.
7473         (nds32_long_call_p): Modify.
7474         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7475         * config/nds32/nds32-protos.h
7476         (symbolic_reference_mentioned_p): Declare.
7477         (nds32_legitimize_ict_address): Declare.
7478         (nds32_expand_ict_move): Declare.
7479         (nds32_indirect_call_referenced_p): Declare.
7480         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7481         (nds32_relax_group): Use nds32_ict_const_p as condition.
7482         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7483         (nds32_asm_file_start): Output ict_model directive in asm code.
7484         (nds32_legitimate_address_p): Consider indirect call.
7485         (nds32_print_operand): Consider indirect call.
7486         (nds32_print_operand_address): Consider indirect call.
7487         (nds32_insert_attributes): Handle "indirect_call" attribute.
7488         (TARGET_LEGITIMATE_ADDRESS_P): Define.
7489         (TARGET_LEGITIMATE_CONSTANT_P): Define.
7490         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7491         (TARGET_DELEGITIMIZE_ADDRESS): Define.
7492         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7493         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7494         (TARGET_ICT_MODEL_SMALL): Define.
7495         (TARGET_ICT_MODEL_LARGE): Define.
7496         * config/nds32/nds32.md (movsi): Consider ict model.
7497         (call, call_value): Consider ict model.
7498         (sibcall, sibcall_value): Consider ict model.
7499         * config/nds32/nds32.opt (mict-model): New option.
7500         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7501         model.
7503 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
7504             Monk Chiang  <sh.chiang04@gmail.com>
7505             Jim Wilson <jimw@sifive.com>
7507         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7508         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
7509         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7510         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7511         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
7512         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7513         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7514         compute save_libcall_adjustment properly.
7515         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7516         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7517         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7518         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7519         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7520         (ABI_SPEC): Handle mabi=ilp32e.
7521         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7522         (RVE): Add RVE mask.
7523         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7524         <-march>: Add rv32e as an example.
7526 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
7528         PR c++/82899
7529         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7530         (intra_create_variable_infos): Handle C++ constructors.
7532 2018-05-18  Martin Liska  <mliska@suse.cz>
7534         * passes.def: Remove a redundant pass.
7536 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7538         PR bootstrap/85838
7539         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7541 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7543         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7544         (ARMv4): Update.
7545         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7546         (ARMv6m): Update.
7547         (armv2, armv2a, armv3, armv3m): Delete architectures.
7548         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7549         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7550         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7551         Delete cpus.
7552         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7553         (*mulsidi3adddi): Likewise.
7554         (mulsidi3): Likewise.
7555         (*mulsidi3_nov6): Likewise.
7556         (umulsidi3): Likewise.
7557         (umulsidi3_nov6): Likewise.
7558         (umaddsidi4): Likewise.
7559         (*umulsidi3adddi): Likewise.
7560         (smulsi3_highpart): Likewise.
7561         (*smulsi3_highpart_nov6): Likewise.
7562         (umulsi3_highpart): Likewise.
7563         (*umulsi3_highpart_nov6): Likewise.
7564         * config/arm/arm.h (arm_arch3m): Delete.
7565         * config/arm/arm.c (arm_arch3m): Delete.
7566         (arm_option_override_internal): Update armv3-related comment.
7567         (arm_configure_build_target): Delete use of isa_bit_mode32.
7568         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7569         (arm_rtx_costs_internal): Delete check of arm_arch3m.
7570         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7571         (mulsa3): Likewise.
7572         (mulusa3): Likewise.
7573         * config/arm/arm-protos.h (arm_arch3m): Delete.
7574         * config/arm/arm-tables.opt: Regenerate.
7575         * config/arm/arm-tune.md: Likewise.
7576         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7577         deleted architectures.
7579 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7581         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7582         (armv5t, armv5te): New features.
7583         (ARMv5, ARMv5e): Delete fgroups.
7584         (ARMv5t, ARMv5te): Adjust for above changes.
7585         (ARMv6m): Likewise.
7586         (armv5, armv5e): Delete arches.
7587         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7588         arm_arch5.
7589         (*call_reg_arm): Likewise.
7590         (*call_value_reg_armv5): Likewise.
7591         (*call_value_reg_arm): Likewise.
7592         (*call_symbol): Likewise.
7593         (*call_value_symbol): Likewise.
7594         (*sibcall_insn): Likewise.
7595         (*sibcall_value_insn): Likewise.
7596         (clzsi2): Likewise.
7597         (prefetch): Likewise.
7598         (define_split and define_peephole2 dependent on arm_arch5):
7599         Likewise.
7600         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7601         arm_arch5e.
7602         (TARGET_ARM_QBIT): Likewise.
7603         (TARGET_DSP_MULTIPLY): Likewise.
7604         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7605         (arm_arch5, arm_arch5e): Delete.
7606         (arm_arch5t, arm_arch5te): Declare.
7607         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7608         (arm_arch5t): Declare.
7609         (arm_option_reconfigure_globals): Update for the above.
7610         (arm_options_perform_arch_sanity_checks): Update comment, replace
7611         use of arm_arch5 with arm_arch5t.
7612         (use_return_insn): Likewise.
7613         (arm_emit_call_insn): Likewise.
7614         (output_return_instruction): Likewise.
7615         (arm_final_prescan_insn): Likewise.
7616         (arm_coproc_builtin_available): Likewise.
7617         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7618         arm_arch5e with arm_arch5t and arm_arch5te.
7619         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7620         (arm_arch5t, arm_arch5te): Declare.
7621         * config/arm/arm-tables.opt: Regenerate.
7622         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7623         * config/arm/t-multilib: Likewise.
7624         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7625         instead of arm_arch5.
7626         (*call_reg_thumb1): Likewise.
7627         (*call_value_reg_thumb1_v5): Likewise.
7628         (*call_value_reg_thumb1): Likewise.
7629         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7630         unreachable path.
7631         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7633 2018-05-18  Martin Liska  <mliska@suse.cz>
7635         PR gcov-profile/84846
7636         * doc/gcov.texi: Document -t option of gcov tool.
7638 2018-05-18  Martin Liska  <mliska@suse.cz>
7640         PR gcov-profile/84846
7641         * gcov.c (print_usage): Add new -t option.
7642         (process_args): Handle the option.
7643         (generate_results): Use stdout as output when requested by
7644         the option.
7646 2018-05-18  Martin Liska  <mliska@suse.cz>
7648         PR gcov-profile/84846
7649         * coverage.c (coverage_init): Write PWD to .gcno file.
7650         * doc/gcov.texi: Document how working directory is printed.
7651         * gcov-dump.c (dump_gcov_file): Print PWD.
7652         * gcov.c (output_intermediate_file): Likewise.
7653         (read_graph_file): Read PWD string.
7654         (output_lines): Print PWD.
7656 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7658         PR middle-end/85817
7659         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7660         for retval and return false if all args to phi are zero.
7662 2018-05-18  Richard Biener  <rguenther@suse.de>
7664         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7665         method.
7666         (evrp_dom_walker::before_dom_children): Call it.
7668 2018-05-18  Richard Biener  <rguenther@suse.de>
7670         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7671         results when processing array refs with variable index.
7673 2018-05-18  Toon Moene  <toon@moene.org>
7675         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7676         directly after that of -floop-interchange. Indicate that both
7677         options are enabled by default when specifying -O3.
7679 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7681         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7682         iterator.  Delete separate integer-mode vec_set<mode> expander.
7683         (aarch64_simd_vec_setv2di): Delete.
7684         (vec_setv2di): Delete.
7685         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7686         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
7687         the "w, r" alternative.
7689 2018-05-18  Martin Liska  <mliska@suse.cz>
7691         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7692         * tree-pass.h (make_pass_lower_switch_O0): New function.
7693         * tree-switch-conversion.c (node_has_low_bound): Remove.
7694         (node_has_high_bound): Likewise.
7695         (node_is_bounded): Likewise.
7696         (class pass_lower_switch): Make it a template type and create
7697         two instances.
7698         (pass_lower_switch::execute): Add template argument.
7699         (make_pass_lower_switch): New function.
7700         (make_pass_lower_switch_O0): New function.
7701         (do_jump_if_equal): Remove.
7702         (emit_case_nodes): Simplify to just handle all 3 cases and leave
7703         all the hard work to tree optimization passes.
7705 2018-05-18  Martin Liska  <mliska@suse.cz>
7707         * dbgcnt.c (limit_low): Renamed from limit.
7708         (limit_high): New variable.
7709         (dbg_cnt_is_enabled): Check for upper limit.
7710         (dbg_cnt): Adjust dumping.
7711         (dbg_cnt_set_limit_by_index): Add new argument for high
7712         value.
7713         (dbg_cnt_set_limit_by_name): Likewise.
7714         (dbg_cnt_process_single_pair): Parse new format.
7715         (dbg_cnt_process_opt): Use strtok.
7716         (dbg_cnt_list_all_counters): Remove 'value' and add
7717         'limit_high'.
7718         * doc/invoke.texi: Document changes.
7720 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
7722         * doc/sourcebuild.texi (scalar_all_fma): Document.
7723         * tree.def (FMA_EXPR): Delete.
7724         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7725         * internal-fn.c (ternary_direct): New macro.
7726         (expand_ternary_optab_fn): Likewise.
7727         (direct_ternary_optab_supported_p): Likewise.
7728         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7729         * builtins.c (fold_builtin_fma): Delete.
7730         (fold_builtin_3): Don't call it.
7731         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7732         * expr.c (expand_expr_real_2): Likewise.
7733         * fold-const.c (operand_equal_p): Likewise.
7734         (fold_ternary_loc): Likewise.
7735         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7736         * gimple.c (DEFTREECODE): Likewise.
7737         * gimplify.c (gimplify_expr): Likewise.
7738         * optabs-tree.c (optab_for_tree_code): Likewise.
7739         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7740         * tree-eh.c (operation_could_trap_p): Likewise.
7741         (stmt_could_throw_1_p): Likewise.
7742         * tree-inline.c (estimate_operator_cost): Likewise.
7743         * tree-pretty-print.c (dump_generic_node): Likewise.
7744         (op_code_prio): Likewise.
7745         * tree-ssa-loop-im.c (stmt_cost): Likewise.
7746         * tree-ssa-operands.c (get_expr_operands): Likewise.
7747         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7748         * fold-const-call.h (fold_fma): Delete.
7749         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7750         CFN_FNMA and CFN_FNMS.
7751         (fold_fma): Delete.
7752         * genmatch.c (combined_fn): New enum.
7753         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7754         (commutative_op): New function.
7755         (commutate): Use it.  Handle more than 2 operands.
7756         (dt_operand::gen_gimple_expr): Use commutative_op.
7757         (parser::parse_expr): Allow :c to be used with non-binary
7758         operators if the commutative operand is known.
7759         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7760         CFN_FMS, CFN_FNMA and CFN_FNMS.
7761         (backprop::process_assign_use): Remove FMA_EXPR handling.
7762         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7763         (gen_hsa_fma): New function.
7764         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7765         IFN_FNMA and IFN_FNMS.
7766         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7767         * gimple-fold.h (follow_all_ssa_edges): Declare.
7768         * gimple-fold.c (follow_all_ssa_edges): New function.
7769         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7770         gimple_build interface and use follow_all_ssa_edges to fold the result.
7771         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7772         instead of checking for optabs directly.
7773         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7774         rather than FMA_EXPRs.
7775         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7776         call to IFN_FMA instead of an FMA_EXPR.
7778 2018-05-17  Jim Wilson  <jimw@sifive.com>
7780         * expr.c (do_tablejump): When converting index to Pmode, if we have a
7781         sign extended promoted subreg, and the range does not have the sign bit
7782         set, then do a sign extend.
7784         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7785         test, check for sign extended subreg and/or constant operands, and
7786         do a sign extend in that case.
7788 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
7790         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7791         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7792         Add untyped.
7793         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7794         Change logics_shift_reg to logics_shift_imm.
7795         (thunderx2t99_fp_loadpair_basic): Delete.
7796         (thunderx2t99_fp_storepair_basic): Delete.
7797         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7798         (thunderx2t99_asimd_polynomial): Delete.
7799         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7800         and neon_fp_mul_d_scalar_q.
7801         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7802         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7803         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7804         (thunderx2t99_asimd_lut): Add missing tbl types.
7805         (thunderx2t99_asimd_ext): Delete.
7806         (thunderx2t99_asimd_load1_1_mult): Delete.
7807         (thunderx2t99_asimd_load1_2_mult): Delete.
7808         (thunderx2t99_asimd_load1_ldp): New.
7809         (thunderx2t99_asimd_load1): New.
7810         (thunderx2t99_asimd_load2): Add missing *load2* types.
7811         (thunderx2t99_asimd_load3): New.
7812         (thunderx2t99_asimd_load4): New.
7813         (thunderx2t99_asimd_store1_1_mult): Delete.
7814         (thunderx2t99_asimd_store1_2_mult): Delete.
7815         (thunderx2t99_asimd_store2_mult): Delete.
7816         (thunderx2t99_asimd_store2_onelane): Delete.
7817         (thunderx2t99_asimd_store_stp): New.
7818         (thunderx2t99_asimd_store1): New.
7819         (thunderx2t99_asimd_store2): New.
7820         (thunderx2t99_asimd_store3): New.
7821         (thunderx2t99_asimd_store4): New.
7823 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
7825         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7826         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
7828 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
7829             Segher Boessenkool  <segher@kernel.crashing.org>
7831         PR target/85698
7832         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7833         operand.
7835 2018-05-17  Richard Biener  <rguenther@suse.de>
7837         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7838         for pruning loop and prune defs feeding only already visited PHIs.
7840 2018-05-17  Richard Biener  <rguenther@suse.de>
7842         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7844 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
7845             Richard Biener  <rguenther@suse.de>
7847         PR tree-optimization/85793
7848         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7849         for VMAT_ELEMENTWISE.
7851 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7853         * internal-fn.h (lookup_internal_fn): Declare
7854         * internal-fn.c (lookup_internal_fn): New function.
7855         * gimple.c (gimple_build_call_from_tree): Handle calls to
7856         internal functions.
7857         * gimple-pretty-print.c (dump_gimple_call): Print "." before
7858         internal function names.
7859         * tree-pretty-print.c (dump_generic_node): Likewise.
7860         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7862 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7864         * gimple-fold.h (gimple_build): Make the function forms take
7865         combined_fn rather than built_in_function.
7866         (gimple_simplify): Likewise.
7867         * gimple-match-head.c (gimple_simplify): Likewise.
7868         * gimple-fold.c (gimple_build): Likewise.
7869         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7870         rather than gimple_build_call_internal.
7871         (get_initial_defs_for_reduction): Likewise.
7872         (vect_create_epilog_for_reduction): Likewise.
7873         (vectorizable_live_operation): Likewise.
7875 2018-05-17  Martin Liska  <mliska@suse.cz>
7877         * gimple-ssa-sprintf.c (format_directive): Do not use
7878         space in between 'G_' and '('.
7880 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
7882         PR target/85323
7883         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7884         even if the mask is not all ones.
7886         PR target/85323
7887         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7888         vector.
7889         (ix86_gimple_fold_builtin): Likewise.
7891         PR target/85323
7892         * config/i386/i386.c: Include tree-vector-builder.h.
7893         (ix86_vector_shift_count): New function.
7894         (ix86_fold_builtin): Fold shift builtins by scalar count.
7895         (ix86_gimple_fold_builtin): Likewise.
7897         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7898         _mm512_setzero): New intrinsics.
7900 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
7901             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7903         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7904         code generation for cases where splatting a value is not useful.
7905         * simplify-rtx.c (simplify_ternary_operation): Simplify
7906         vec_merge across a vec_duplicate and a paradoxical subreg forming
7907         a vector mode to a vec_concat.
7909 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
7911         * config.gcc: Support "goldmont-plus".
7912         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7913         "goldmont-plus".
7914         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7915         PROCESSOR_GOLDMONT_PLUS.
7916         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7917         (processor_target_table): Add "goldmont-plus".
7918         (PTA_GOLDMONT_PLUS): Define.
7919         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7920         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7921         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7922         (fold_builtin_cpu): Add "goldmont-plus".
7923         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7924         (ix86_option_override_internal): Add "goldmont-plus".
7925         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7926         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7927         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7928         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7930 2018-05-17  Richard Biener  <rguenther@suse.de>
7932         PR tree-optimization/85757
7933         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7934         remove defs that only feed that PHI from further processing.
7936 2018-05-16  Jim Wilson  <jimw@sifive.com>
7938         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7939         asterisk to name.
7940         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7942 2018-05-16  Mark Wielaard  <mark@klomp.org>
7944         * dwarf2out.c (count_index_strings): New function.
7945         (output_indirect_strings): Call count_index_strings and generate
7946         header for dwarf_version >= 5.
7948 2018-05-16  Mark Wielaard  <mark@klomp.org>
7950         * dwarf2out.c (dwarf_FORM): New function.
7951         (set_indirect_string): Use dwarf_FORM.
7952         (reset_indirect_string): Likewise.
7953         (size_of_die): Likewise.
7954         (value_format): Likewise.
7955         (output_die): Likewise.
7956         (add_skeleton_AT_string): Likewise.
7957         (output_macinfo_op): Likewise.
7958         (index_string): Likewise.
7959         (output_index_string_offset): Likewise.
7960         (output_index_string): Likewise.
7961         (count_index_strings): Likewise.
7963 2018-05-16  Carl Love  <cel@us.ibm.com>
7965         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7966         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7968 2018-05-16  Martin Jambor  <mjambor@suse.cz>
7970         * ipa-prop.c (ipa_free_all_edge_args): Remove.
7971         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7973 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
7975         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7976         (fnma<mode>4): Likewise.
7977         (fms<mode>4): Likewise.
7978         (fnms<mode>4): Likewise.
7979         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7980         (aarch64_fnma<mode>4): Likewise.
7981         (aarch64_fms<mode>4): Likewise.
7982         (aarch64_fnms<mode>4): Likewise.
7983         (aarch64_fnmadd<mode>4): Likewise.
7985 2018-05-16  Jason Merrill  <jason@redhat.com>
7987         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
7989 2018-05-16  Richard Biener  <rguenther@suse.de>
7991         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7992         (dump_stmt_cost): Declare.
7993         (add_stmt_cost): Dump cost we add.
7994         (add_stmt_costs): New function.
7995         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7996         No longer exported.
7997         (vect_analyze_stmt): Adjust prototype.
7998         (vectorizable_condition): Likewise.
7999         (vectorizable_live_operation): Likewise.
8000         (vectorizable_reduction): Likewise.
8001         (vectorizable_induction): Likewise.
8002         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8003         cost vector to pass to vectorizable_ and record afterwards.
8004         (vect_model_reduction_cost): Take cost vector argument and adjust.
8005         (vect_model_induction_cost): Likewise.
8006         (vectorizable_reduction): Likewise.
8007         (vectorizable_induction): Likewise.
8008         (vectorizable_live_operation): Likewise.
8009         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8010         SLP_TREE_NUMBER_OF_VEC_STMTS.
8011         (vect_analyze_slp_cost_1): Remove.
8012         (vect_analyze_slp_cost): Likewise.
8013         (vect_slp_analyze_node_operations): Take visited args and
8014         a target cost vector.  Avoid processing already visited stmt sets.
8015         (vect_slp_analyze_operations): Use a local cost vector to gather
8016         costs and register those of non-discarded instances.
8017         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8018         (vect_schedule_slp_instance): Remove copying of
8019         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
8020         zero.
8021         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8022         adding cost.  Record cost entry location.
8023         (vect_prologue_cost_for_slp_op): Function to compute cost of
8024         a constant or invariant generated for SLP vect in the prologue,
8025         split out from vect_analyze_slp_cost_1.
8026         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
8027         (vect_model_promotion_demotion_cost): Likewise.
8028         (vect_model_store_cost): Likewise, make static.
8029         (vect_model_load_cost): Likewise.
8030         (vectorizable_bswap): Add cost vector arg and adjust.
8031         (vectorizable_call): Likewise.
8032         (vectorizable_simd_clone_call): Likewise.
8033         (vectorizable_conversion): Likewise.
8034         (vectorizable_assignment): Likewise.
8035         (vectorizable_shift): Likewise.
8036         (vectorizable_operation): Likewise.
8037         (vectorizable_store): Likewise.
8038         (vectorizable_load): Likewise.
8039         (vectorizable_condition): Likewise.
8040         (vectorizable_comparison): Likewise.
8041         (can_vectorize_live_stmts): Likewise.
8042         (vect_analyze_stmt): Likewise.
8043         (vect_transform_stmt): Adjust calls to vectorizable_*.
8044         * tree-vectorizer.c: Include gimple-pretty-print.h.
8045         (dump_stmt_cost): New function.
8047 2018-05-16  Richard Biener  <rguenther@suse.de>
8049         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8050         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8051         * tree-ssa-dse.c: Include tree-ssa-loop.h.
8052         (check_name): New callback.
8053         (dse_classify_store): Track cycles via a visited bitmap of PHI
8054         defs and simplify handling of in-loop and across loop dead stores
8055         and properly fail for loop-variant refs.  Handle byte-tracking with
8056         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8057         limiting the walk.
8059 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
8061         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8062         (vect_get_mask_type_for_stmt): Likewise.
8063         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8064         split out from...
8065         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
8066         to determine the statement's vector type and the vector type that
8067         should be used for calculating nunits.  Deal with cases in which
8068         the type has to be deferred.
8069         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8070         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8071         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8072         (vect_determine_vf_for_stmt): New functions, split out from...
8073         (vect_determine_vectorization_factor): ...here.
8074         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8075         (vect_get_mask_type_for_stmt): New functions, split out from
8076         vect_determine_vectorization_factor.
8078 2018-05-16  Richard Biener  <rguenther@suse.de>
8080         * tree-cfg.c (verify_gimple_assign_ternary): Properly
8081         verify the [VEC_]COND_EXPR embedded comparison.
8083 2018-05-15  Martin Sebor  <msebor@redhat.com>
8085         PR tree-optimization/85753
8086         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8087         RECORD_TYPE in addition to ARRAY_TYPE.
8089 2018-05-15  Martin Sebor  <msebor@redhat.com>
8091         PR middle-end/85643
8092         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8094 2018-05-15  Richard Biener  <rguenther@suse.de>
8096         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8097         add by_clobber_p one.  Change algorithm to collect all defs
8098         representing uses we need to walk and try reducing them to
8099         a single one before failing.
8100         (dse_dom_walker::dse_optimize_stmt): Adjust.
8102 2018-05-13  Mark Wielaard  <mark@klomp.org>
8104         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8105         (size_of_loc_descr): Likewise.
8106         (output_loc_operands): Likewise.
8107         (output_loc_operands_raw): Likewise.
8108         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8109         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8110         (hash_loc_operands): Likewise.
8111         (compare_loc_operands): Likewise.
8113 2018-05-14  Mark Wielaard  <mark@klomp.org>
8115         * dwarf2out.c (count_index_addrs): New function.
8116         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8118 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8120         PR tree-optimization/83648
8121         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8122         return value as malloc candidate.
8124 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8126         PR ipa/85734
8127         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8128         param as true in call to suggest_attribute.
8130 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
8132         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8133         -mreadonly-in-sdata.
8135 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8137         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8138         New pattern.
8139         (aarch64_crypto_aesd_fused): Likewise.
8141 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
8143         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8144         (movsi_aarch64): Likewise.
8145         (load_pairsi): Likewise.
8146         (load_pairdi): Likewise.
8147         (store_pairsi): Likewise.
8148         (store_pairdi): Likewise.
8149         (load_pairsf): Likewise.
8150         (load_pairdf): Likewise.
8151         (store_pairsf): Likewise.
8152         (store_pairdf): Likewise.
8153         (zero_extend): Likewise.
8154         (trunc): Swap alternatives.
8155         (fcvt_target): Add '?' to prefer w over r.
8157 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
8159         PR target/85756
8160         * config/i386/i386.md: Disallow non-commutative arithmetics in
8161         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8162         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
8163         in the peephole2 before it.
8165 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
8167         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8168         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8169         (ix86_handle_option): Handle -mcldemote.
8170         * config.gcc: New header.
8171         * config/i386/cldemoteintrin.h: New file.
8172         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8173         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8174         -mcldemote.
8175         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8176         OPTION_MASK_ISA_CLDEMOTE.
8177         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8178         (ix86_valid_target_attribute_inner_p): Ditto.
8179         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8180         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8181         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8182         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8183         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8184         (cldemote): New.
8185         * config/i386/i386.opt: Add -mcldemote.
8186         * config/i386/x86intrin.h: New header.
8187         * doc/invoke.texi: Add -mcldemote.
8189 2018-05-14  Richard Biener  <rguenther@suse.de>
8191         * doc/match-and-simplify.texi: Adjust :s documentation.
8193 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
8195         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8196         intended memcpy size.
8197         (REORDER_45): Likewise.
8199 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
8201         * sort.cc: New file.
8202         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8203         * vec.c (qsort_chk): Use gcc_qsort.
8204         * Makefile.in (OBJS-libcommon): Add sort.o.
8205         (build/sort.o): New target.  Use it...
8206         (BUILD_RTL): ... here, and...
8207         (build/gencfn-macros): ... here, and...
8208         (build/genmatch): ... here.
8210 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8211             Chung-Ju Wu  <jasonwucj@gmail.com>
8213         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8214         * config/nds32/nds32-graywolf.md: New file.
8215         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8216         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8217         pipeline.
8218         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8219         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8220         * config/nds32/nds32.md (pipeline_model): Add graywolf.
8221         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8222         * config/nds32/pipelines.md: Include n15 settings.
8224 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8225             Chung-Ju Wu  <jasonwucj@gmail.com>
8227         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8228         * config/nds32/nds32-n13.md: New file.
8229         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8230         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8231         pipeline.
8232         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8233         * config/nds32/nds32.md (pipeline_model): Add n13.
8234         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
8235         * config/nds32/pipelines.md: Include n13 settings.
8237 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8238             Chung-Ju Wu  <jasonwucj@gmail.com>
8240         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
8241         * config/nds32/nds32-n10.md: New file.
8242         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
8243         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
8244         pipeline.
8245         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
8246         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
8247         * config/nds32/nds32.md (pipeline_model): Add n10.
8248         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
8249         * config/nds32/pipelines.md: Include n10 settings.
8251 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
8252             Kito Cheng  <kito.cheng@gmail.com>
8253             Chung-Ju Wu  <jasonwucj@gmail.com>
8255         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
8256         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8257         Add enum values for DSP extension instructions.
8258         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
8259         New constraints.
8260         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
8261         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
8262         New code iterators.
8263         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
8264         * config/nds32/nds32-dspext.md: New file for DSP implementation.
8265         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
8266         * config/nds32/nds32-intrinsic.md: Likewise.
8267         * config/nds32/nds32_intrinsic.h: Likewise.
8268         * config/nds32/nds32-md-auxiliary.c: Likewise.
8269         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
8270         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
8271         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
8272         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
8273         * config/nds32/nds32-protos.h: New declarations for DSP extension.
8274         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
8275         TYPE_DMAC in switch statement.
8276         * config/nds32/nds32.c: New checking and implementation for DSP
8277         extension instructions.
8278         * config/nds32/nds32.h: Likewise.
8279         * config/nds32/nds32.md: Likewise.
8280         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
8281         * config/nds32/predicates.md: Implement new predicates for DSP
8282         extension.
8284 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
8286         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
8287         Reformat alternatives and attributes so it is easier to identify
8288         which constraints/attributes go with which instruction.
8289         (mov<mode>_hardfloat32, FMOVE64): Likewise.
8290         (mov<mode>_softfloat32, FMOVE64): Likewise.
8291         (mov<mode>_hardfloat64, FMOVE64): Likewise.
8292         (mov<mode>_softfloat64, FMOVE64): Likewise.
8294 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8296         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8297         subsection.
8298         (Basic PowerPC Built-in Functions): The new name of the
8299         subsection previously known as "PowerPC Built-in Functions".
8300         (Basic PowerPC Built-in Functions Available on all Configurations):
8301         New subsubsection.
8302         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
8303         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
8304         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
8305         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
8307 2018-05-11  Martin Jambor  <mjambor@suse.cz>
8309         PR ipa/85655
8310         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
8311         single const.
8313 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8315         PR target/85733
8316         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8318 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
8320         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8321         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8322         (ix86_handle_option): Handle -mwaitpkg.
8323         * config.gcc: New header.
8324         * config/i386/cpuid.h (bit_WAITPKG): New bit.
8325         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8326         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8327         function type.
8328         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8329         OPTION_MASK_ISA_WAITPKG.
8330         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8331         (ix86_option_override_internal): Add PTA_WAITPKG.
8332         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8333         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8334         IX86_BUILTIN_TPAUSE.
8335         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8336         __builtin_ia32_umwait and __builtin_ia32_tpause.
8337         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8338         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8339         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8340         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8341         UNSPECV_TPAUSE): New.
8342         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8343         * config/i386/i386.opt: Add -mwaitpkg.
8344         * config/i386/waitpkgintrin.h: New file.
8345         * config/i386/x86intrin.h: New header.
8346         * doc/invoke.texi: Add -mwaitpkg.
8348 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8350         PR target/85606
8351         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8352         equivalent.
8353         (cortex-m0): Use armv6s-m isa.
8354         (cortex-m0plus): Likewise.
8355         (cortex-m1): Likewise.
8356         (cortex-m0.small-multiply): Likewise.
8357         (cortex-m0plus.small-multiply): Likewise.
8358         (cortex-m1.small-multiply): Likewise.
8360 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
8361             Jakub Jelinek  <jakub@redhat.com>
8363         PR tree-optimization/85692
8364         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8365         source permute as well.
8367 2018-05-11  Martin Liska  <mliska@suse.cz>
8369         PR sanitizer/85556
8370         * doc/extend.texi: Document LLVM style format for no_sanitize
8371         attribute.
8373 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
8375         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8376         mode_supports_vsx_dform_quad to mode_supports_dq_form.
8377         (mode_supports_vsx_dform_quad): Likewise.
8378         (mode_supports_vmx_dform): Move these functions to be next to the
8379         other mode_supports functions.
8380         (mode_supports_dq_form): Likewise.
8381         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8382         mode_supports_dq_form.
8383         (reg_offset_addressing_ok_p): Likewise.
8384         (offsettable_ok_by_alignment): Likewise.
8385         (rs6000_legitimate_offset_address_p): Likewise.
8386         (legitimate_lo_sum_address_p): Likewise.
8387         (rs6000_legitimize_address): Likewise.
8388         (rs6000_legitimize_reload_address): Likewise.
8389         (rs6000_secondary_reload_inner): Likewise.
8390         (rs6000_preferred_reload_class): Likewise.
8391         (rs6000_output_move_128bit): Likewise.
8393 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8395         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8396         Generate SImode target register for null target.
8397         <case IX86_BUILTIN_XGETBV>: Ditto.
8398         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8399         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8401 2018-05-10  Carl Love  <cel@us.ibm.com>
8403         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8404         dcbtt and dcbtstt if operands[2] is 0.
8406 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8408         PR target/85693
8409         * config/i386/sse.md (usadv64qi): New expander.
8411 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
8413         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8414         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8415         -maltivec=be support.
8416         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8417         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8418         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8419         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8420         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8421         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8422         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8423         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8424         altivec_vsumsws): Adjust.
8425         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8426         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8427         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8428         support.
8429         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8430         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8431         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8432         (altivec_lve<VI_char>x): Delete expand.
8433         (*altivec_lve<VI_char>x_internal): Rename to...
8434         (altivec_lve<VI_char>x): ... this.
8435         (altivec_lvxl_<mode>): Delete expand.
8436         (*altivec_lvxl_<mode>_internal): Rename to ...
8437         (altivec_lvxl_<mode>): ... this.
8438         (altivec_stvxl_<mode>): Delete expand.
8439         (*altivec_stvxl_<mode>_internal): Rename to ...
8440         (altivec_stvxl_<mode>): ... this.
8441         (altivec_stve<VI_char>x): Delete expand.
8442         (*altivec_stve<VI_char>x_internal): Rename to ...
8443         (altivec_stve<VI_char>x): ... this.
8444         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8445         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8446         reduc_plus_scal_<mode>): Adjust.
8447         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8448         comment.
8449         (rs6000_cpu_cpp_builtins): Adjust.
8450         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8451         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8452         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8453         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8454         -maltivec=be support.
8455         (rs6000_split_vec_extract_var): Adjust.
8456         (rs6000_split_v4si_init): Adjust.
8457         (swap_selector_for_mode): Delete.
8458         (altivec_expand_lvx_be, altivec_expand_stvx_be,
8459         altivec_expand_stvex_be): Delete.
8460         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8461         -maltivec=be support.
8462         (rs6000_gimple_fold_builtin): Ditto.
8463         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8464         Adjust.
8465         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8466         (TARGET_DIRECT_MOVE_64BIT): Adjust.
8467         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8468         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8469         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8470         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8471         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8472         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8473         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8474         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8475         anonymous split): Adjust.
8476         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8477         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8479 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
8481         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8482         when --with-gxx-include-dir is also specified.
8483         * configure: Regenerate.
8485 2018-05-09  Jim Wilson  <jimw@sifive.com>
8487         PR target/84797
8488         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8489         * config/riscv/t-withmultilib: New.
8490         * config/riscv/withmultilib.h: New.
8491         * doc/install.texi: Document RISC-V --with-multilib-list support.
8493 2018-05-09  Richard Biener  <rguenther@suse.de>
8495         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8496         vector.
8497         (vect_bb_vectorization_profitable_p): Adjust.  Compute
8498         actual scalar cost using the cost vector and the add_stmt_cost
8499         machinery.
8501 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8503         PR rtl-optimization/85645
8504         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8505         in the REG_CFA_REGISTER note for LR, don't leave it empty.
8507 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8509         PR rtl-optimization/85645
8510         * shrink-wrap.c (spread_components): Return a boolean saying if
8511         anything was changed.
8512         (try_shrink_wrapping_separate): Iterate spread_components until
8513         nothing changes anymore.
8515 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8517         PR rtl-optimization/85645
8518         * regrename.c (build_def_use): Also kill the chains that include the
8519         destination of a REG_CFA_REGISTER note.
8521 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8523         PR rtl-optimization/85645
8524         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8525         insn that has a REG_CFA_REGISTER note.
8527 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
8529         * cfgexpand.c (expand_clobber): New function.
8530         (expand_gimple_stmt_1): Use it.
8531         * tree-vect-stmts.c (vect_clobber_variable): New function,
8532         split out from...
8533         (vectorizable_simd_clone_call): ...here.
8534         (vectorizable_store): Emit a clobber either side of an
8535         IFN_STORE_LANES sequence.
8536         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8538 2018-05-09  Tom de Vries  <tom@codesourcery.com>
8540         PR target/85626
8541         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8542         (define_insn "trap_if_false"): Add exit after trap.
8544 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
8546         PR rtl-optimization/85638
8547         * bb-reorder.c: Include common/common-target.h.
8548         (create_forwarder_block): New function extracted from...
8549         (fix_up_crossing_landing_pad): ...here.  Rename into...
8550         (dw2_fix_up_crossing_landing_pad): ...this.
8551         (sjlj_fix_up_crossing_landing_pad): New function.
8552         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8553         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8554         from both partitions and exit the loop after one iteration.
8556 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8558         Revert:
8559         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8560         subsection.
8561         (Basic PowerPC Built-in Functions): The new name of the
8562         subsection previously known as "PowerPC Built-in Functions".
8563         (Basic PowerPC Built-in Functions Available on all Configurations):
8564         New subsubsection.
8565         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8566         subsubsection.
8567         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8568         subsubsection.
8569         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8570         subsubsection.
8571         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8572         subsubsection.
8574 2018-05-08  Jim Wilson  <jimw@sifive.com>
8576         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8577         (LD_EMUL_SUFFIX): New.
8578         (LINK_SPEC): Use it.
8580 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8582         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8583         subsection.
8584         (Basic PowerPC Built-in Functions): The new name of the
8585         subsection previously known as "PowerPC Built-in Functions".
8586         (Basic PowerPC Built-in Functions Available on all Configurations):
8587         New subsubsection.
8588         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8589         subsubsection.
8590         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8591         subsubsection.
8592         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8593         subsubsection.
8594         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8595         subsubsection.
8597 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
8599         PR target/85683
8600         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8601         after cmpelim optimization.
8603 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
8605         * config.gcc: Support "goldmont".
8606         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8607         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8608         PROCESSOR_GOLDMONT.
8609         * config/i386/i386.c (m_GOLDMONT): Define.
8610         (processor_target_table): Add "goldmont".
8611         (PTA_GOLDMONT): Define.
8612         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8613         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8614         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8615         (fold_builtin_cpu): Add "goldmont".
8616         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8617         (ix86_option_override_internal): Add "goldmont".
8618         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8619         (processor_type): Add PROCESSOR_GOLDMONT.
8620         * config/i386/i386.md: Add CPU "glm".
8621         * config/i386/glm.md: New file.
8622         * config/i386/x86-tune.def: Add m_GOLDMONT.
8623         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8625 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
8627         PR target/85572
8628         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8629         E_V4DImode.
8630         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8631         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
8632         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
8634         PR target/85317
8635         * config/i386/i386.c (ix86_fold_builtin): Handle
8636         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8638         PR target/85480
8639         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8640         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8642 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
8644         PR target/85658
8645         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8646         (check_arch): Likewise.
8647         (check_fpu): Return the result rather than printing it.
8648         (end arch): Fix operator precedence.
8649         (end cpu): Likewise.
8650         (END): Print the result from check_fpu.
8652 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
8653             Alan Hayward  <alan.hayward@arm.com>
8654             David Sherwood  <david.sherwood@arm.com>
8656         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8657         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8658         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8659         (*fcmuo<mode>_and): New patterns.
8661 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
8663         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8664         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8665         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8666         (cmp_op, sve_imm_con): New code attributes.
8667         (SVE_COND_INT_CMP, imm_con): Delete.
8668         (cmp_op): Remove above unspecs from int attribute.
8669         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8670         to...
8671         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
8672         comparison-specific unspecs.
8673         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8674         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8675         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8676         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8677         (*vec_fcm<cmp_op><mode>): Rename to...
8678         (*fcm<cmp_op><mode>): ...this and adjust likewise.
8679         (*vec_fcmuo<mode>): Rename to...
8680         (*fcmuo<mode>): ...this and adjust likewise.
8681         (*pred_fcm<cmp_op><mode>): New pattern.
8682         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8683         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8684         functions.
8685         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8686         and UNORDERED.
8687         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8688         (aarch64_emit_sve_predicated_cond): New function.
8689         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8690         (aarch64_emit_unspec_cond_or): Replace with...
8691         (aarch64_emit_sve_or_conds): ...this new function.  Use
8692         aarch64_emit_sve_ptrue_op for the individual comparisons and
8693         aarch64_emit_binop to OR them together.
8694         (aarch64_emit_inverted_unspec_cond): Replace with...
8695         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
8696         aarch64_emit_sve_ptrue_op for the comparison and
8697         aarch64_emit_unop to invert the result.
8698         (aarch64_expand_sve_vec_cmp_float): Update after the above
8699         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
8701 2018-05-07  Nathan Sidwell  <nathan@acm.org>
8703         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8704         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8705         (Backwards Compatibility): Likewise.
8707 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8709         PR bootstrap/85681
8710         Revert:
8711         2018-05-07  Luis Machado  <luis.machado@linaro.org>
8713         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8714         <prefetch_dynamic_strides>: New const bool field.
8715         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8716         prefetch_dynamic_strides.
8717         (exynosm1_prefetch_tune): Likewise.
8718         (thunderxt88_prefetch_tune): Likewise.
8719         (thunderx_prefetch_tune): Likewise.
8720         (thunderx2t99_prefetch_tune): Likewise.
8721         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8722         to false.
8723         (aarch64_override_options_internal): Update to set
8724         PARAM_PREFETCH_DYNAMIC_STRIDES.
8725         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8726         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8727         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8728         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8729         prefetch-dynamic-strides setting.
8731         2018-05-07  Luis Machado  <luis.machado@linaro.org>
8733         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8734         <minimum_stride>: New const int field.
8735         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8736         minimum_stride field.
8737         (exynosm1_prefetch_tune): Likewise.
8738         (thunderxt88_prefetch_tune): Likewise.
8739         (thunderx_prefetch_tune): Likewise.
8740         (thunderx2t99_prefetch_tune): Likewise.
8741         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8742         (aarch64_override_options_internal): Update to set
8743         PARAM_PREFETCH_MINIMUM_STRIDE.
8744         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8745         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8746         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8747         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8748         stride is constant and is below the minimum stride threshold.
8750 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8752         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8753         to 512.
8755 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8757         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8758         <prefetch_dynamic_strides>: New const bool field.
8759         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8760         prefetch_dynamic_strides.
8761         (exynosm1_prefetch_tune): Likewise.
8762         (thunderxt88_prefetch_tune): Likewise.
8763         (thunderx_prefetch_tune): Likewise.
8764         (thunderx2t99_prefetch_tune): Likewise.
8765         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8766         to false.
8767         (aarch64_override_options_internal): Update to set
8768         PARAM_PREFETCH_DYNAMIC_STRIDES.
8769         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8770         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8771         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8772         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8773         prefetch-dynamic-strides setting.
8775 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8777         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8778         <minimum_stride>: New const int field.
8779         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8780         minimum_stride field.
8781         (exynosm1_prefetch_tune): Likewise.
8782         (thunderxt88_prefetch_tune): Likewise.
8783         (thunderx_prefetch_tune): Likewise.
8784         (thunderx2t99_prefetch_tune): Likewise.
8785         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8786         (aarch64_override_options_internal): Update to set
8787         PARAM_PREFETCH_MINIMUM_STRIDE.
8788         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8789         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8790         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8791         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8792         stride is constant and is below the minimum stride threshold.
8794 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
8796         PR c++/85659
8797         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8798         the type is addressable.  Don't force op into register if it has
8799         BLKmode.
8801 2018-05-05  Roland McGrath  <mcgrathr@google.com>
8803         PR other/77609
8804         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8805         any section for which we don't know a specific type it should have,
8806         regardless of name.  Previously this was done only for the exact
8807         names ".init_array", ".fini_array", and ".preinit_array".
8808         (default_elf_asm_named_section): Add comment about
8809         relationship with default_section_type_flags and SECTION_NOTYPE.
8810         (get_section): Don't consider it a type conflict if one side has
8811         SECTION_NOTYPE and the other doesn't, as long as neither has the
8812         SECTION_BSS et al used in the default_section_type_flags logic.
8814 2018-05-05  Tom de Vries  <tom@codesourcery.com>
8816         PR target/85653
8817         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8818         (workaround_barsyncs): New function.
8819         (nvptx_reorg): Use workaround_barsyncs.
8820         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8821         (define_expand "nvptx_membar_cta"): New define_expand.
8822         (define_insn "*nvptx_membar_cta"): New insn.
8824 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
8826         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8827         To improve optimization opportunities.
8828         * builtin-types.def: The new needed builtin types for the above.
8830 2018-05-04  Richard Biener  <rguenther@suse.de>
8832         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8833         * gimple-ssa-store-merging.c
8834         (imm_store_chain_info::output_merged_store): Remove redundant create,
8835         release split_store vector contents on failure.
8836         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8837         scalar stmt vector on cache hit.
8839 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
8841         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8842         Xilinx FP support.
8843         * config.gcc (powerpc-xilinx-eabi*): Remove.
8844         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8845         support.
8846         (fusion_addis_mem_combo_load): Ditto.
8847         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8848         FP support.
8849         (rs6000_cpu_cpp_builtins): Ditto.
8850         * config/rs6000/rs6000-linux.c
8851         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8852         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8853         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8854         support.
8855         (rs6000_setup_reg_addr_masks): Ditto.
8856         (rs6000_init_hard_regno_mode_ok): Ditto.
8857         (rs6000_option_override_internal): Ditto.
8858         (legitimate_lo_sum_address_p): Ditto.
8859         (rs6000_legitimize_address): Ditto.
8860         (rs6000_legitimize_reload_address): Ditto.
8861         (rs6000_legitimate_address_p): Ditto.
8862         (abi_v4_pass_in_fpr): Ditto.
8863         (setup_incoming_varargs): Ditto.
8864         (rs6000_gimplify_va_arg): Ditto.
8865         (rs6000_split_multireg_move): Ditto.
8866         (rs6000_savres_strategy): Ditto.
8867         (rs6000_emit_prologue_components): Ditto.
8868         (rs6000_emit_epilogue_components): Ditto.
8869         (rs6000_emit_prologue): Ditto.
8870         (rs6000_emit_epilogue): Ditto.
8871         (rs6000_elf_file_end): Ditto.
8872         (rs6000_function_value): Ditto.
8873         (rs6000_libcall_value): Ditto.
8874         * config/rs6000/rs6000.h: Ditto.
8875         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8876         (TARGET_MINMAX): ... this.  New.
8877         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8878         * config/rs6000/rs6000.md: Remove Xilinx FP support.
8879         (*movsi_internal1_single): Delete.
8880         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8881         mfpu=, mxilinx-fpu): Delete.
8882         * config/rs6000/singlefp.h: Delete.
8883         * config/rs6000/sysv4.h: Remove Xilinx FP support.
8884         * config/rs6000/t-rs6000: Ditto.
8885         * config/rs6000/t-xilinx: Delete.
8886         * config/rs6000/titan.md: Adjust for fp_type removal.
8887         * config/rs6000/vsx.md: Remove Xilinx FP support.
8888         (VStype_simple): Delete.
8889         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8890         * config/rs6000/xfpu.h: Delete.
8891         * config/rs6000/xfpu.md: Delete.
8892         * config/rs6000/xilinx.h: Delete.
8893         * config/rs6000/xilinx.opt: Delete.
8894         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8895         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8897 2018-05-04  Tom de Vries  <tom@codesourcery.com>
8899         PR libgomp/85639
8900         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8901         if ignore == 0.
8903 2018-05-04  Richard Biener  <rguenther@suse.de>
8905         PR middle-end/85627
8906         * tree-complex.c (update_complex_assignment): We are always in SSA form.
8907         (expand_complex_div_wide): Likewise.
8908         (expand_complex_operations_1): Likewise.
8909         (expand_complex_libcall): Preserve EH info of the original stmt.
8910         (tree_lower_complex): Handle removed blocks.
8911         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8912         on complex multiplication and division libcall builtins.
8914 2018-05-04  Richard Biener  <rguenther@suse.de>
8916         PR middle-end/85574
8917         * fold-const.c (negate_expr_p): Restrict negation of operand
8918         zero of a division to when we know that can happen without
8919         overflow.
8920         (fold_negate_expr_1): Likewise.
8922 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
8924         PR libstdc++/85466
8925         * real.h (real_nextafter): Declare.
8926         * real.c (real_nextafter): New function.
8927         * fold-const-call.c (fold_const_nextafter): New function.
8928         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8929         CASE_CFN_NEXTTOWARD.
8930         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8931         even when arg1_mode is different from arg0_mode.
8933 2018-05-03  Nathan Sidwell  <nathan@acm.org>
8935         * doc/extend.texi (Deprecated Features): Remove
8936         -ffriend-injection.
8937         (Backwards Compatibility): Likewise.
8938         * doc/invoke.texi (C++ Language Options): Likewise.
8939         (C++ Dialect Options): Likewise.
8941 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
8943         PR target/85530
8944         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8945         _mm512_mask_mullox_epi64): New intrinsics.
8947 2018-05-03  Tom de Vries  <tom@codesourcery.com>
8949         PR testsuite/85106
8950         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8951         dump files): Add offload-tree.
8953 2018-05-03  Richard Biener  <rguenther@suse.de>
8955         PR tree-optimization/85615
8956         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8957         to loops not nested in BBs loop father to avoid creating multi-entry
8958         loops.
8960 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8962         PR tree-optimization/70291
8963         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8964         arguments.  Change return type to tree.  Emit libcall as a new
8965         statement rather than replacing existing one when inplace_p is true.
8966         (expand_complex_multiplication_components): New function.
8967         (expand_complex_multiplication): Expand floating-point complex
8968         multiplication using the above.
8969         (expand_complex_division): Rename inner_type parameter to type.
8970         Update expand_complex_libcall call-site.
8971         (expand_complex_operations_1): Update expand_complex_multiplication
8972         and expand_complex_division call-sites.
8974 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
8976         PR target/85582
8977         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8978         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8979         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8980         the highest significant bit of the shift count mask is clear.  In
8981         check whether and[sq]i3 is needed verify that all significant bits
8982         of the shift count other than the highest are set.
8984 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8986         PR libgomp/82428
8987         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8988         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8989         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8990         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8991         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8992         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8993         __builtin_goacc_parlevel_size.
8995 2018-05-02  Richard Biener  <rguenther@suse.de>
8997         PR tree-optimization/85597
8998         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8999         do not use split vect_get_vec_defs call but call vect_get_slp_defs
9000         directly.
9002 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9004         PR testsuite/85106
9005         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9006         dump files): Add ltrans-tree.
9008 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9010         PR testsuite/85106
9011         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9012         dump files): Add wpa-ipa.
9014 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
9016         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
9017         powerpc*-*-linux*paired* target.
9018         * config/rs6000/750cl.h: Delete.
9019         * config/rs6000/paired.h: Delete.
9020         * config/rs6000/paired.md: Delete.
9021         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9022         float support.
9023         * config/rs6000/rs6000-builtin.def: Remove paired float support.
9024         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9025         comment.  Remove paired float support.
9026         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9027         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9028         VECTOR_PAIRED.
9029         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9030         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9031         declarations.
9032         * config/rs6000/rs6000.c: Remove paired float support.
9033         (paired_expand_vector_init, paired_expand_vector_move,
9034         paired_emit_vector_compare, paired_emit_vector_cond_expr,
9035         (paired_expand_lv_builtin, paired_expand_stv_builtin,
9036         paired_expand_builtin, paired_expand_predicate_builtin,
9037         paired_init_builtins): Delete.
9038         * config/rs6000/rs6000.h: Remove paired float support.
9039         * config/rs6000/rs6000.md: Remove paired float support.
9040         (move_from_CR_ov_bit): Delete.
9041         * config/rs6000/rs6000.opt (mpaired): Delete.
9042         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9043         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9045 2018-05-02  Richard Biener  <rguenther@suse.de>
9047         PR middle-end/85567
9048         * gimplify.c (gimplify_save_expr): When in SSA form allow
9049         SAVE_EXPRs to compute to SSA vars.
9051 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
9053         PR target/85582
9054         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9055         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9056         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9057         clobber operands[2], instead use a new pseudo.  Formatting fixes.
9059 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
9061         PR tree-optimization/85586
9062         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9063         exit early for statements in the same group if the accesses are
9064         not strided.
9066 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9068         PR lto/85451
9069         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9070         error message.
9072 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
9074         PR tree-optimization/85143
9075         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9077 2018-05-01  Tom de Vries  <tom@codesourcery.com>
9079         PR lto/85451
9080         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9081         not found" error message.
9083 2018-05-01  Tom de Vries  <tom@codesourcery.com>
9085         PR other/83786
9086         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9087         * vec.c (test_ordered_remove_if): New function.
9088         (vec_c_tests): Call test_ordered_remove_if.
9089         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9090         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9091         * tree-vect-patterns.c (vect_pattern_recog_1): Use
9092         VEC_ORDERED_REMOVE_IF.
9094 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9096         PR tree-optimization/82665
9097         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9098         pointer subtraction where arguments come from a memchr call.
9100 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
9102         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9103         --push-state --as-needed and --pop-state instead of --as-needed and
9104         --no-as-needed if ld supports it.
9105         * configure: Regenerated.
9107         PR web/85578
9108         * doc/install.texi2html: Replace _002d with - and _002a with * in
9109         generated html files using sed.
9111 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9113         PR c++/85523
9114         * gcc-rich-location.c (blank_line_before_p): New function.
9115         (use_new_line): New function.
9116         (gcc_rich_location::add_fixit_insert_formatted): New function.
9117         * gcc-rich-location.h
9118         (gcc_rich_location::add_fixit_insert_formatted): New function.
9120 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9122         * selftest.c (assert_streq): Rename "expected" and "actual" to
9123         "val1" and "val2".  Extend NULL-handling to cover both inputs
9124         symmetrically, while still requiring both to be non-NULL for a pass.
9125         * selftest.h (assert_streq): Rename "expected" and "actual" to
9126         "val1" and "val2".
9127         (ASSERT_EQ): Likewise.
9128         (ASSERT_EQ_AT): Likewise.
9129         (ASSERT_KNOWN_EQ): Likewise.
9130         (ASSERT_KNOWN_EQ_AT): Likewise.
9131         (ASSERT_NE): Likewise.
9132         (ASSERT_MAYBE_NE): Likewise.
9133         (ASSERT_MAYBE_NE_AT): Likewise.
9134         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
9135         the assertion to pass.
9136         (ASSERT_STREQ_AT): Likewise.
9138 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
9140         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9141         interaction with -pie.
9143 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9145         * selftest.h: Fix alphabetization of per-source-file selftest
9146         declarations.
9148 2018-04-30  Jason Merrill  <jason@redhat.com>
9150         PR c++/61982 - dead stores to destroyed objects.
9151         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9152         of clobber.
9154 2018-04-30  Jason Merrill  <jason@redhat.com>
9156         * tree.c (build_clobber): New.
9157         * tree.h: Declare it.
9158         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9160 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9162         * diagnostic-show-locus.c (layout::layout): Update for
9163         location_get_source_line returning a char_span.
9164         (struct char_span): Move to input.h.
9165         (struct correction): Update for fields in char_span becoming
9166         private.
9167         (struct source_line): Update for location_get_source_line
9168         returning a char_span.
9169         (layout::print_line): Likewise.
9170         * edit-context.c (edited_file::print_content): Likewise.
9171         (edited_file::print_diff_hunk): Likewise.
9172         (edited_file::print_run_of_changed_lines): Likewise.
9173         (edited_file::get_num_lines): Likewise.
9174         (edited_line::edited_line): Likewise.
9175         * final.c (asm_show_source): Likewise.
9176         * input.c (location_get_source_line): Convert return type
9177         from const char * to char_span, losing the final "line_len"
9178         param.
9179         (dump_location_info): Update for the above.
9180         (get_substring_ranges_for_loc): Likewise.  Use a char_span
9181         when handling the literal within the line.
9182         (test_reading_source_line): Update for location_get_source_line
9183         returning a char_span.
9184         * input.h (class char_span): Move here from
9185         diagnostic-show-locus.c, converting from a struct to a class.
9186         Make data members private.
9187         (char_span::operator bool): New.
9188         (char_span::length): New.
9189         (char_span::get_buffer): New.
9190         (char_span::operator[]): New.
9191         (char_span::subspan): Make const.
9192         (char_span::xstrdup): New.
9193         (location_get_source_line): Convert return type from const char *
9194         to char_span, losing the final "line_size" param.
9196 2018-04-30  Jan Hubicka  <jh@suse.cz>
9198         * lto-wrapper.c (ltrans_priorities): New static var.
9199         (cmp_priority): New.
9200         (run_gcc): Read priorities and if doing parallel build order
9201         the Makefile by them.
9203 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9205         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9207 2018-04-30  Richard Biener  <rguenther@suse.de>
9209         * tree-cfg.c (verify_address): Remove base argument, add
9210         flag whether to check TREE_ADDRESSABLE and do that.
9211         (verify_expr): Remove.
9212         (verify_types_in_gimple_reference): Add pieces from verify_expr.
9213         (verify_gimple_assign_single): Likewise.
9214         (verify_gimple_switch): Likewise.
9215         (verify_expr_location_1): Dereference tp once.  Add (disabled)
9216         piece from verify_expr.
9217         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9219 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9221         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9223 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9225         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9226         (small_data_pattern): Likewise.
9227         (arc_rewrite_small_data): Likewise.
9228         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9229         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9230         (get_symbol_alignment): New function.
9231         (legitimate_small_data_address_p): Likewise.
9232         (legitimate_scaled_address): Update, call
9233         legitimate_small_data_address_p.
9234         (output_sdata): New static variable.
9235         (arc_print_operand): Update how we handle small data operands.
9236         (arc_print_operand_address): Likewise.
9237         (arc_legitimate_address_p): Update, use
9238         legitimate_small_data_address_p.
9239         (arc_rewrite_small_data_p): Remove.
9240         (arc_rewrite_small_data_1): Likewise.
9241         (arc_rewrite_small_data): Likewise.
9242         (small_data_pattern): Likewise.
9243         (compact_sda_memory_operand): Update to use
9244         legitimate_small_data_address_p and get_symbol_alignment.
9245         (prepare_move_operands): Don't rewite sdata pattern.
9246         (prepare_extend_operands): Remove.
9247         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
9248         pattern.
9249         (zero_extendqisi2): Likewise.
9250         (zero_extendhisi2): Likewise.
9251         (extendqihi2): Likewise.
9252         (extendqisi2): Likewise.
9253         (extendhisi2): Likewise.
9254         (addsi3): Likewise.
9255         (subsi3): Likewise.
9256         (andsi3): Likewise.
9257         * config/arc/constraints.md (Usd): Change it to memory constraint.
9259 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9261         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
9262         as source of std instructions.
9263         * config/arc/arc.md (movsi_insn): Update pattern predicate to
9264         allow 6-bit constants as source for store instructions.
9265         (movdi_insn): Update instruction pattern to allow 6-bit constants
9266         as source for store instructions.
9268 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
9270         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
9272 2018-04-30  Nathan Sidwell  <nathan@acm.org>
9273             Sandra Loosemore <sandra@codesourcery.com>
9275         * dumpfile.c (dump_open): Allow '-' for stdout.
9276         * doc/invoke.texi (Developer Options): Document dump filename
9277         determination early.  Document stdin/stdout selection.
9279 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
9281         Microblaze Target: PIC data text relative
9283         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
9284         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
9285         Add declaration.
9286         * config/microblaze/microblaze.h (microblaze_constant_address_p):
9287         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
9288         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
9289         New addressing mode for data-text relative position indepenedent code.
9290         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
9291         'ADDRESS_SYMBOLIC_TXT_REL'.
9292         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
9293         (microblaze_legitimate_pic_operand): Exclude function calls from
9294         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
9295         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
9296         addresses cases.
9297         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9298         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9299         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
9300         for 'address + offset'.
9301         (microblaze_expand_prologue): Add new function prologue call for
9302         'r20' assignation.
9303         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
9304         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
9305         table in case of TARGET_PIC_DATA_TEXT_REL.
9306         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
9307         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
9308         Add new macros 'UNSPEC_TEXT',
9309         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
9310         + exclude function calls from 'UNSPEC_PLT' in case of data text
9311         relative mode.
9312         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9313         new target hook for generating address diff vector tables in case of
9314         flag_pic.
9315         * doc/tm.texi : Regenerate.
9316         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9317         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9318         of addr diff vector generation.
9319         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9320         target hook definition.
9321         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9322         Add default function for generate_pic_addr_diff_vec -> flag_pic.
9323         * doc/invoke.texi (Add new pic option): Add new microblaze pic
9324         option for data text relative.
9326 2018-04-30  Richard Biener  <rguenther@suse.de>
9328         * tree-chrec.h (evolution_function_is_constant_p): Remove
9329         redundant check.
9330         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9332 2018-04-30  Richard Biener  <rguenther@suse.de>
9334         PR bootstrap/85571
9335         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9337 2018-04-30  Richard Biener  <rguenther@suse.de>
9339         PR tree-optimization/28364
9340         PR tree-optimization/85275
9341         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9342         copying first exit test.
9344 2018-04-28  Mark Wielaard  <mark@klomp.org>
9346         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9347         dwarf_version >= 5.
9348         (dwarf_AT): Handle DW_AT_addr_base.
9349         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9351 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
9353         PR target/84431
9354         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9355         (*ashl<dwi>3_doubleword_mask_1): Ditto.
9356         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9357         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9359 2018-04-28  Richard Biener  <rguenther@suse.de>
9361         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9362         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9363         to reflect use.  Only add interesting stmts.
9365 2018-04-27  Martin Jambor  <mjambor@suse.cz>
9367         PR ipa/85549
9368         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9369         the jump function allows for passing through aggregate values.
9371 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
9373         * input.h (in_system_header_at): Convert from macro to inline
9374         function.
9375         (from_macro_expansion_at): Likewise.
9376         (from_macro_definition_at): Likewise.
9378 2018-04-27  Jeff Law  <law@redhat.com>
9380         * config.gcc: Mark tile* targets as deprecated/obsolete.
9382 2018-04-27  Richard Biener  <rguenther@suse.de>
9384         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9385         fix for ILP32.
9387 2018-04-27  Richard Biener  <rguenther@suse.de>
9389         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9391 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
9393         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9394         with Yd constraint. Set "preferred_for_speed" attribute from
9395         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9396         with Yd constraint.
9397         (*movdi_internal): Ditto.
9398         (movti_interunit splitters): Remove
9399         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9400         (movdi_interunit splitters): Ditto.
9401         * config/i386/constraints.md (Ye): Remove.
9402         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9404 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9406         PR target/85512
9407         * config/aarch64/constraints.md (Usg): Limit to 31.
9408         (Usj): Limit to 63.
9410 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
9412         PR tree-optimization/85529
9413         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9414         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9415         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9416         zero extension or masking of the MSB bit.
9417         (optimize_range_tests): Add FIRST_BB argument, pass it through
9418         to optimize_range_tests_var_bound.
9419         (maybe_optimize_range_tests, reassociate_bb): Adjust
9420         optimize_range_tests callers.
9422 2018-04-26  Richard Biener  <rguenther@suse.de>
9423             Jakub Jelinek  <jakub@redhat.com>
9425         * cgraph.h (symbol_table): Just declare debug method here.
9426         * symtab.c (symbol_table::debug): Define.
9428 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
9430         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9432 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
9434         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9435         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9436         (*movdi_internal): Substitute Yi and Yj constraint with x
9437         and Ym and Yn constraint with y constraint.  Update "isa"
9438         attribute and set "preferred_for_speed" attribute from
9439         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9440         (*movsi_internal): Ditto.
9441         (*movdf_internal): Ditto.
9442         (*movsf_internal): Ditto.
9443         (*zero_extendsidi2): Ditto.
9444         * config/i386/sse.md (vec_set<mode>_0): Ditto.
9445         (sse2_loadld): Ditto.
9446         (*vec_extract<ssevecmodelower>_0): Ditto.
9447         (*vec_extractv4si_0_zext_sse4): Ditto.
9448         (vec_concatv2di): Ditto.
9449         (*vec_dup<mode>): Ditto.
9450         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9451         * config/i386/constraints.md (Yi): Remove.
9452         (Yj): Remove.
9453         (Ym): Remove.
9454         (Yn): Remove.
9456 2018-04-26  Nathan Sidwell  <nathan@acm.org>
9458         * dumpfile.c (dump_open): New.
9459         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9460         (dump_finish): Detect stdio/stderr by value not name.
9462 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
9464         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9466 2018-04-26  Tom de Vries  <tom@codesourcery.com>
9468         PR target/84952
9469         * config/nvptx/nvptx.c (verify_neutering_jumps)
9470         (verify_neutering_labels): New function
9471         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9473 2018-04-26  Tom de Vries  <tom@codesourcery.com>
9475         PR target/84025
9476         * config/nvptx/nvptx.c (needs_neutering_p): New function.
9477         (nvptx_single): Use needs_neutering_p to skip over insns that do not
9478         need neutering.
9480 2018-04-26  Richard Biener <rguenther@suse.de>
9481             Tom de Vries  <tom@codesourcery.com>
9483         PR lto/85422
9484         * lto-streamer-out.c (output_function): Fixup loops if required to match
9485         discovery done in the reader.
9487 2018-04-26  Richard Biener  <rguenther@suse.de>
9489         PR tree-optimization/85116
9490         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9491         have a loop exit from the single latch predecessor.  Remove
9492         case of header with just condition.
9493         (ch_base::copy_headers): Exclude infinite loops from any
9494         processing.
9495         (pass_ch::execute): Record exits.
9497 2018-04-26  Richard Biener  <rguenther@suse.de>
9499         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9500         prologue cost vector and pass it to vect_get_load_cost.
9501         (vect_get_peeling_costs_all_drs): Likewise.
9502         (vect_peeling_hash_get_lowest_cost): Likewise.
9503         (vect_enhance_data_refs_alignment): Likewise.
9505 2018-04-26  Richard Biener  <rguenther@suse.de>
9507         PR middle-end/85450
9508         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9509         checking of integer<->pointer conversions.
9510         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9511         sign-/zero-extending pointer types.
9512         (expand_omp_for_static_chunk): Likewise.
9514 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
9515             Jean Lee  <xiaoyur347@gmail.com>
9517         * config/mips/mips.c (mips_asan_shadow_offset): New function.
9518         (TARGET_ASAN_SHADOW_OFFSET): Define.
9519         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9520         true for -fsanitize=address.
9522 2018-04-25  Mark Wielaard  <mark@klomp.org>
9524         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9525         shorter ones.
9527 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
9529         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9530         than "alu", remove explicit "memory" and "imm_disp" attributes.
9531         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9533         PR middle-end/85414
9534         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9535         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9536         gen_lowpart_no_emit.
9538 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
9540         PR target/85473
9541         * config/i386/i386.c (ix86_expand_builtin): Change memory
9542         operand to XI, extend p0 to Pmode.
9543         * config/i386/i386.md: Change unspec volatile and operand
9544         1 mode to XI, change operand 0 mode to P.
9546 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9548         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9549         GET_MODE_MASK before any checking.
9550         (nds32_can_use_bset_p): Likewise.
9551         (nds32_can_use_btgl_p): Likewise.
9553 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9555         * config/nds32/nds32-doubleword.md: New define_split pattern for
9556         illegal register number.
9558 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9560         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9562 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9564         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9566 2018-04-25  Richard Biener  <rguenther@suse.de>
9568         * lto-streamer.h (LTO_major_version): Bump to 8.
9570 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
9572         * BASE-VER: Set to 9.0.0.
9574 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
9576         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9577         in __abskf2 and __powikf2.
9579 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9581         PR target/85512
9582         * config/aarch64/constraints.md (Usg, Usj): New constraints.
9583         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9584         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9585         Use the above on operand 2.  Reindent.
9586         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9588 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
9590         PR target/85485
9591         * common/config/i386/i386-common.c (ix86_handle_option): Don't
9592         handle OPT_mcet.
9593         * config/i386/i386.opt (mcet): Removed.
9594         * doc/install.texi: Remove -mcet documentation.
9595         * doc/invoke.texi: Likewise.
9597 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
9599         PR target/85485
9600         * doc/install.texi: Remove -mcet from bootstrap-cet.
9602 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9604         PR target/85511
9605         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9606         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9607         if TARGET_64BIT.
9609         PR target/85503
9610         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9611         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9612         containing a CONST_VECTOR.
9614 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
9616         * doc/install.texi: Update newlib dependency for nvptx.
9618 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9620         PR target/85508
9621         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9622         instead of INTVAL when shifting x left.
9624 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
9626         PR tree-optimization/85478
9627         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9628         vect_grouped_store_supported for single element vectors.
9630 2018-04-24  Richard Biener  <rguenther@suse.de>
9632         PR target/85491
9633         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9634         load cost increase to the case of non-constant step.
9636 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9638         PR target/84828
9639         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9640         destination if any_malformed_asm.
9642 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
9644         PR middle-end/85496
9645         * expr.c (store_field): In the bitfield case, if the value comes from
9646         a function call and is returned in registers by means of a PARALLEL,
9647         do not change the mode of the temporary unless BLKmode and VOIDmode.
9649 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
9651         PR rtl-optimization/85423
9652         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9653         dependencies to debug insns when the previous insn is non-debug.
9655 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
9657         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9658         enums into a single definition.
9659         (fls): Fix predicates and printing.
9660         (seti): Likewise.
9662 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
9664         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9665         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9666         and short u6 immediate.
9667         (check_if_valid_sleep_operand): Remove.
9668         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9670 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9672         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9673         flag_always_save_lp condition.
9674         * config/nds32/nds32.opt (malways-save-lp): New option.
9676 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9678         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9679         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9680         * config/nds32/nds32.h
9681         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9682         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9684 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9686         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9687         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9689 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9690             Chung-Ju Wu  <jasonwucj@gmail.com>
9692         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9693         Declare.
9694         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9695         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9697 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9699         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9701 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9703         * config/nds32/nds32-protos.h (nds32_data_alignment,
9704         nds32_local_alignment): Declare.
9705         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9706         nds32_local_alignment): New functions.
9707         (TARGET_CONSTANT_ALIGNMENT): Define.
9708         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9710 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9712         * config/nds32/nds32.c
9713         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9714         (TARGET_MODES_TIEABLE_P): Likewise.
9716 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9718         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9719         level Ofast and Og.
9721 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
9722             Chung-Ju Wu  <jasonwucj@gmail.com>
9724         * config/nds32/constants.md (unspec_volatile_element): Add enum values
9725         for unaligned access.
9726         * config/nds32/nds32-intrinsic.c: Implementation of expanding
9727         unaligned access.
9728         * config/nds32/nds32-intrinsic.md: Likewise.
9729         * config/nds32/nds32_intrinsic.h: Likewise.
9730         * config/nds32/nds32.h (nds32_builtins): Likewise.
9731         * config/nds32/nds32.opt (munaligned-access): New option.
9732         * config/nds32/nds32.c (nds32_asm_file_start): Display
9733         flag_unaligned_access status.
9735 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
9737         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9738         -mno-relax is present.
9739         * config/riscv/linux.h (LINK_SPEC): Ditto.
9741 2018-04-20  Martin Sebor  <msebor@redhat.com>
9743         PR c/85365
9744         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9745         for null pointers.
9746         (gimple_fold_builtin_stxcpy_chk): Same.
9747         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9749 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
9751         PR target/85456
9752         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9753         __powikf2 when long double is IEEE 128-bit.
9755 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
9757         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9758         step to make sure stack always aligned.
9760 2018-04-20  Carl Love  <cel@us.ibm.com>
9762         PR target/83402
9763         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9764         size check for arg0.
9766 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9767             Tom de Vries  <tom@codesourcery.com>
9769         PR target/85445
9770         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9771         Emit insns for calls too.
9772         (nvptx_find_par): Always look for worker-level predecessor insn.
9773         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
9774         calls.
9775         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9776         (nvptx_process_pars): Propagate frames for calls.
9778 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
9780         PR target/85469
9781         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9782         Removed.
9783         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9784         (ix86_handle_option): Don't handle OPT_mibt.
9785         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9786         __SHSTK__.
9787         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9788         has_ibt and ibt.
9789         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9790         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9791         (ix86_target_macros): Define __CET__ with flag_cf_protection
9792         for -fcf-protection.
9793         * config/i386/i386.c (isa2_opts): Remove -mibt.
9794         * config/i386/i386.h (TARGET_IBT): Removed.
9795         (TARGET_IBT_P): Likewise.
9796         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9797         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9798         * config/i386/i386.opt (mcet): Update help message.
9799         (mshstk): Likewise.
9800         (mibt): Removed.
9801         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
9802         -mcet as an alias for -mshstk.
9804 2018-04-20  Richard Biener <rguenther@suse.de>
9806         PR middle-end/85475
9807         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9808         complexity by forcing a single use of the multiply operand.
9810 2018-04-20  Martin Jambor  <mjambor@suse.cz>
9812         ipa/85449
9813         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9814         recursion dependency to only apply to non-clones.
9816 2018-04-20  Martin Jambor  <mjambor@suse.cz>
9818         ipa/85447
9819         * ipa-cp.c (create_specialized_node): Check that clones of
9820         self-recursive edges exist during IPA-CP.
9822 2018-04-19  Toon Moene  <toon@moene.org>
9824         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9825         by -O3.
9827 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
9829         PR tree-optimization/85467
9830         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9831         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
9832         VECTOR_CST element to type.
9834 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9836         PR target/85397
9837         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9838         * config/i386/i386.md (builtin_setjmp_setup): Removed.
9839         (builtin_longjmp): Likewise.
9840         (save_stack_nonlocal): New pattern.
9841         (restore_stack_nonlocal): Likewise.
9843 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9845         PR target/85404
9846         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9847         Replace ASM_OUTPUT_LABEL with fprintf.
9849 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9851         PR target/85417
9852         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9853         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9854         * config/i386/i386-c.c (ix86_target_macros_internal): Also
9855         define __IBT__ and __SHSTK__ for -fcf-protection.
9856         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9857         TARGET_IBT.
9858         (ix86_trampoline_init): Likewise.
9859         (x86_output_mi_thunk): Likewise.
9860         (ix86_notrack_prefixed_insn_p): Likewise.
9861         (ix86_option_override_internal): Don't disallow -fcf-protection.
9862         * config/i386/i386.md (rdssp<mode>): Also enable for
9863         -fcf-protection.
9864         (incssp<mode>): Likewise.
9865         (nop_endbr): Likewise.
9866         * config/i386/i386.opt (mcet): Change help message to built-in
9867         functions only.
9868         (mibt): Likewise.
9869         (mshstk): Likewise.
9870         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9871         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
9872         enable CET built-in functions.
9874 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
9876         * common/config/i386/i386-common.c
9877         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9878         OPTION_MASK_ISA_MOVDIRI_UNSET,
9879         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9880         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9881         * config.gcc (movdirintrin.h): New header.
9882         * config/i386/cpuid.h (bit_MOVDIRI,
9883         bit_MOVDIR64B): New bits.
9884         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9885         and -mmvodir64b.
9886         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9887         (VOID, PVOID, PCVOID)): New function types.
9888         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9889         __builtin_ia32_directstoreu_u64,
9890         __builtin_ia32_movdir64b): New builtins.
9891         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9892         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9893         and -mmovdiri.
9894         (ix86_valid_target_attribute_inner_p): Ditto.
9895         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9896         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9897         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9898         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9899         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9900         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9901         (movdiri<mode>, movdir64b_<mode>): New.
9902         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9903         * config/i386/immintrin.h: Include movdirintrin.h.
9904         * config/i386/movdirintrin.h: New file.
9905         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9907 2018-04-19  Richard Biener  <rguenther@suse.de>
9909         PR middle-end/85455
9910         * cfg.c (clear_bb_flags): When loop state says we have
9911         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9913 2018-04-19  Richard Biener  <rguenther@suse.de>
9915         PR tree-optimization/84737
9916         * tree-vect-data-refs.c (vect_copy_ref_info): New function
9917         copying restrict info.
9918         (vect_setup_realignment): Use it.
9919         * tree-vectorizer.h (vect_copy_ref_info): Declare.
9920         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9921         the first DR to all generated stores.
9922         (vectorizable_load): Likewise for loads.
9924 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
9926         PR tree-optimization/85446
9927         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9928         the integral and pointer types to have the same precision.
9930         * doc/install.texi: Document --disable-cet being the default and
9931         --enable-cet=auto.
9933 2018-04-18  Martin Liska  <mliska@suse.cz>
9935         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9936         style.
9938 2018-04-18  Martin Liska  <mliska@suse.cz>
9940         Revert
9941         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
9943         PR ipa/83983
9944         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9945         arguments if they are comparable.
9947 2018-04-18  Martin Liska  <mliska@suse.cz>
9949         Revert
9950         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9952         PR lto/84805
9953         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9954         incomplete types.
9956 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
9958         PR target/85388
9959         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9960         ENDBR after calling __morestack.
9962 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
9964         PR jit/85384
9965         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9966         by using gcc_base_ver to generate a gcc_driver_version, and use
9967         it when generating GCC_DRIVER_NAME.
9968         * configure: Regenerate.
9970 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
9972         PR target/81084
9973         * config.gcc: Obsolete powerpc*-*-*spe*.
9975 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9977         PR debug/84637
9978         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9979         (stabstr_D): Change type of unum from unsigned int to
9980         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
9981         type.
9983 2018-04-17  Jim Wilson  <jimw@sifive.com>
9985         PR 84856
9986         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9987         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9988         Set arg_pointer_offset after using pretend_args_size.
9990 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9992         PR rtl-optimization/85431
9993         * dse.c (record_store): Ignore zero width stores.
9995         PR sanitizer/85230
9996         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
9997         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9998         __builtin_stack_restore rather than after it.
9999         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10000         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10001         argument instead of virtual_dynamic_stack_rtx.
10003 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10005         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10006         New prototype.
10007         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10008         Add note to error message to explain internal mapping of overloaded
10009         built-in function name to non-overloaded built-in function name.
10010         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10011         function.
10013 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
10015         PR target/85424
10016         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10017         where the inputs overlap with the output.
10019 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10021         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10022         (=v, v) alternative and explicit "memory" attribute.
10023         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
10024         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10025         attributes.
10026         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10027         "sselog1" type instead of "sselog".
10028         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10029         "sselog".  Remove explicit "memory" attribute.
10030         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10031         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10032         attributes.
10033         (vec_extract_hi_v32hi): Merge all alternatives into one, use
10034         "sselog1" type instead of "sselog".  Remove explicit "memory"
10035         attribute.
10036         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10037         use "sselog1" type instead of "sselog".  Remove explicit "memory"
10038         attribute.
10039         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10040         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10041         attributes.
10042         (vec_extract_hi_v64qi): Merge all alternatives into one, use
10043         "sselog1" type instead of "sselog".  Remove explicit "memory"
10044         attribute.
10045         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10046         use "sselog1" type instead of "sselog".  Remove explicit "memory"
10047         attribute.
10049         PR target/85430
10050         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10052         PR middle-end/85414
10053         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10054         on a SUBREG.
10056 2018-04-17  Martin Jambor  <mjambor@suse.cz>
10058         PR ipa/85421
10059         * ipa-cp.c (create_specialized_node): Call
10060         expand_all_artificial_thunks if necessary.
10062 2018-04-17  Martin Liska  <mliska@suse.cz>
10064         PR lto/85405
10065         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10066         in message, remote space in between '_G' and '('.
10068 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10070         PR target/85281
10071         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10072         avx512f_vmcmp<mode>3<round_saeonly_name>,
10073         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10074         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10075         avx512f_rndscale<mode><round_saeonly_name>,
10076         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10077         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10078         Use %<iptr>2 instead of %2 for -masm=intel.
10079         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10080         avx512f_vcvttss2usi<round_saeonly_name>,
10081         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10082         -masm=intel.
10083         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10084         avx512f_vcvttsd2usi<round_saeonly_name>,
10085         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10086         Use %q1 instead of %1 for -masm=intel.
10087         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10088         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10089         of %3 for -masm=intel.
10090         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10091         -masm=intel.
10092         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10093         -masm=intel.
10094         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10095         -masm=intel.
10096         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10097         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10098         %g1.
10099         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10100         -masm=intel.
10101         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10102         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10103         %g1 and one with %0 and %1.
10104         (avx512er_vmrcp28<mode><round_saeonly_name>,
10105         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10106         %1 for -masm=intel.
10107         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10108         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10109         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10110         of %0 and %{%4%} for -masm=intel.
10111         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10112         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10113         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10114         order of %0 and %{%5%}%{z%} for -masm=intel.
10116 2018-04-17  Jan Hubicka  <jh@suse.cz>
10118         PR lto/85405
10119         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10121 2018-04-17  Martin Liska  <mliska@suse.cz>
10123         PR ipa/85329
10124         * multiple_target.c (create_dispatcher_calls): Set apostrophes
10125         for target_clone error message.  Make default implementation
10126         clone to be a local declaration.
10127         (separate_attrs): Add new argument and check for an empty
10128         string.
10129         (expand_target_clones): Handle it.
10130         (ipa_target_clone): Make redirection just for target_clones
10131         functions.
10133 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
10134             Tom de Vries  <tom@codesourcery.com>
10136         PR middle-end/84955
10137         * omp-expand.c (expand_oacc_for): Add dummy false branch for
10138         tiled basic blocks without omp continue statements.
10140 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
10142         PR target/83660
10143         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10144         vec_extract expression as having side effects to make sure it gets
10145         a cleanup point.
10147 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
10149         PR target/85403
10150         * config/i386/i386.c (get_builtin_code_for_version): Check
10151         error_mark_node.
10153 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
10155         PR target/84331
10156         * config.gcc: Support "skylake".
10157         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10158         PROCESSOR_SKYLAKE.
10159         * config/i386/i386.c (m_SKYLAKE): Define.
10160         (processor_target_table): Add "skylake".
10161         (ix86_option_override_internal): Add "skylake".
10162         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10163         PROCESSOR_CANNONLAKE.
10164         (get_builtin_code_for_version): Fix priority for
10165         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10166         PROCESSOR_SKYLAKE-AVX512.
10167         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10168         (processor_type): Add PROCESSOR_SKYLAKE.
10170 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
10171             Jason Merrill  <jason@redhat.com>
10173         PR c++/85112
10174         * convert.c (convert_to_integer_1): Use direct recursion for
10175         enumeral types and types with a precision less than the number
10176         of bits in their mode.
10178 2018-04-16  Julia Koval  <julia.koval@intel.com>
10180         PR target/84413
10181         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10182         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10184 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
10186         PR target/85293
10187         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10188         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10189         and -mno-direct-move.
10191 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
10193         PR target/83402
10194         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10195         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10196         Ensure negative shifts result in {0}.
10198 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
10200         PR rtl-optimization/79916
10201         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10202         regs (if any) to define how to gnerate SD moves when LRA is in
10203         progress.
10205 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
10207         PR rtl-optimization/85393
10208         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10209         * except.c (expand_dw2_landing_pad_for_region): Make static.
10210         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10211         a label and unconditional jump to old_bb, rather than
10212         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10213         basic block.
10215         PR rtl-optimization/85376
10216         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10217         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10218         instead of a specific value.
10220 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
10221             Bin Cheng  <bin.cheng@arm.com>
10223         PR tree-optimization/82965
10224         PR tree-optimization/83991
10225         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10226         by_profile_only parameter.
10227         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10228         information if the loop was predicted to iterate too many times.
10229         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10231 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
10233         PR lto/71991
10234         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
10235         always inline.
10237 2018-04-13  Martin Liska  <mliska@suse.cz>
10238             Jakub Jelinek  <jakub@redhat.com>
10240         PR middle-end/81657
10241         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
10242         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
10243         * builtins.c (expand_builtin_memory_copy_args): Use
10244         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
10245         handle dest_addr == pc_rtx.
10247 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
10249         PR target/85291
10250         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
10251         asked to not generate direct moves.
10252         (fix_trunc<mode>si2_stfiwx): Similar.
10253         (fix_trunc<mode>si2_internal): Similar.
10255 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10257         PR debug/83157
10258         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
10259         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
10260         lookup if dest in some wider mode is known to be const0_rtx and
10261         if so, record permanent equivalence for it to be ZERO_EXTEND of
10262         the narrower mode destination.
10264 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
10266         * lto-streamer-out.c (output_function): Revert 259346.
10267         * omp-expand.c (expand_oacc_for): Likewise.
10269 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
10271         PR rtl-optimization/85354
10272         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
10273         * sel-sched.c (sel_global_init): ... here.
10275 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
10277         PR target/85238
10278         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
10279         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10280         mode for PE-COFF targets.
10281         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
10282         (i386_pe_asm_lto_end): Likewise.
10283         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
10284         (TARGET_ASM_LTO_END): Likewise.
10285         * config/i386/winnt.c (saved_debug_info_level): New static variable.
10286         (i386_pe_asm_lto_start): New function.
10287         (i386_pe_asm_lto_end): Likewise.
10289 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
10290             Richard Biener  <rguenther@suse.de>
10292         PR middle-end/84955
10293         * lto-streamer-out.c (output_function): Fix CFG loop state before
10294         streaming out.
10295         * omp-expand.c (expand_oacc_for): Handle calls to internal
10296         functions like regular functions.
10298 2018-04-12  Richard Biener  <rguenther@suse.de>
10300         PR lto/85371
10301         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
10302         for the early LTO debug to properly generate references to it
10303         during DIE emission.  Do not re-use that for the skeleton for
10304         split-dwarf.
10305         (dwarf2out_early_finish): Likewise.
10307 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10309         PR target/85328
10310         * config/i386/sse.md
10311         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
10312         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
10313         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
10314         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10315         and output is a reg, avoid creating invalid lowpart subreg, but
10316         instead split into a 512-bit move.  Don't split if not AVX512VL,
10317         input is xmm16+ reg and output is a mem.
10318         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10319         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10320         xmm16+ reg and output is a mem.
10322 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10324         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10325         also for flag_dwarf2_cfi_asm.
10327 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10329         PR rtl-optimization/85342
10330         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10331         a bool scalar var inside of the loop instead.  Don't try to update
10332         recog_data.operand after failed apply_change_group.
10334 2018-04-12  Tom de Vries  <tom@codesourcery.com>
10336         PR target/85296
10337         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10338         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
10339         array with flexible array member as array without given dimension.
10340         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10341         argument for undefined param to true.
10343 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
10345         PR target/85321
10346         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10347         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10348         from PowerPC section.
10349         * config/rs6000/sysv4.opt (mcall-): Improve help text.
10350         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10351         help text that is too long.
10352         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10353         help text that is too long.
10354         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10355         help text that is too long.
10357 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
10359         * config/alpha/alpha.md (stack_probe_internal): Rename
10360         from "probe_stack".  Update all callers.
10362 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10364         PR rtl-optimization/84566
10365         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10366         sched_macro_fuse_insns.
10368 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10370         PR target/84301
10371         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10372         (compute_block_dependences): ... from here.
10374 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10376         PR tree-optimization/85331
10377         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10378         from int to HOST_WIDE_INT.
10380 2018-04-11  Martin Jambor  <mjambor@suse.cz>
10382         PR ipa/84149
10383         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10384         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10385         not the same as the source val.
10386         (cgraph_edge_brings_value_p): New parameter.
10387         (gather_edges_for_value): Pass destination value to
10388         cgraph_edge_brings_value_p.
10389         (perhaps_add_new_callers): Likewise.
10390         (get_info_about_necessary_edges): Likewise and exclude values brought
10391         only by self-recursive edges.
10392         (create_specialized_node): Redirect only clones of self-calling edges.
10393         (+self_recursive_pass_through_p): New function.
10394         (find_more_scalar_values_for_callers_subset): Use it.
10395         (find_aggregate_values_for_callers_subset): Likewise.
10396         (known_aggs_to_agg_replacement_list): Removed.
10397         (decide_whether_version_node): Re-calculate known constants for all
10398         remaining context clones.
10400 2018-04-11  Richard Biener  <rguenther@suse.de>
10402         PR lto/85339
10403         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10404         from early DWARF output.
10405         (dwarf2out_early_finish): Output line info unconditionally into
10406         early DWARF and add reference to it.
10408 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10410         PR target/85281
10411         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10412         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10413         other than V2DFmode using iptr mode attribute.
10414         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10416 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10418         PR rtl-optimization/84659
10419         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10421 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10423         PR debug/85302
10424         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10425         SIZEP is NULL.
10426         (output_loc_list): Pass address of a dummy size variable even in the
10427         locview handling loop.
10428         (index_location_lists): Add comment on why skip_loc_list_entry can't
10429         call size_of_locs.
10431 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10433         PR target/85261
10434         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10435         into register.
10437 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
10439         PR target/85321
10440         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10441         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10442         and -mstring-compare-inline-limit.
10444 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10446         PR target/85287
10447         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10448         for stack clash protection in a register whenever we need it to be in
10449         a register.
10451 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10453         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10454         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10456 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10458         PR target/85321
10459         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10460         the help text.
10461         (mlong-double-): Ditto.
10462         * config/rs6000/sysv4.opt (msdata=): Ditto.
10463         (mtls-size=): Ditto.
10465 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10467         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10468         erroneous entries for
10469         "vector int vec_ldl (int, long int *)", and
10470         "vector unsigned int vec_ldl (int, unsigned long int *)".
10471         Add comments and entries for
10472         "vector bool char vec_ldl (int, bool char *)",
10473         "vector bool short vec_ldl (int, bool short *)",
10474         "vector bool int vec_ldl (int, bool int *)",
10475         "vector bool long long vec_ldl (int, bool long long *)",
10476         "vector pixel vec_ldl (int, pixel *)",
10477         "vector long long vec_ldl (int, long long *)",
10478         "vector unsigned long long vec_ldl (int, unsigned long long *)".
10479         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10480         type tree bool_long_long_type_node and correct definition of
10481         bool_V2DI_type_node to make reference to this new type tree.
10482         (rs6000_mangle_type): Replace erroneous reference to
10483         bool_long_type_node with bool_long_long_type_node.
10484         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10485         comments to emphasize sign distinctions for char and int types and
10486         replace RS6000_BTI_bool_long constant with
10487         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
10488         use of RS6000_BTI_pixel.
10489         (bool_long_type_node): Remove this macro definition.
10490         (bool_long_long_type_node): New macro definition
10492 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
10494         PR rtl-optimization/85300
10495         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10496         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10497         simplify_unary_operation fails.
10499 2018-04-10  Martin Liska  <mliska@suse.cz>
10501         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10502         cgraph_edge and ipa_ref.
10504 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
10506         PR target/85177
10507         PR target/85255
10508         * config/i386/sse.md
10509         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10510         computation of the VEC_MERGE selector from mask.
10511         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10512         Fix decoding of the VEC_MERGE selector into mask.
10514 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
10516         PR tree-optimization/85286
10517         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10519 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
10521         * final.c (final_1): Set insn_last_address as well as
10522         insn_current_address.
10524 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10526         PR target/85173
10527         * explow.c (emit_stack_probe): Call validize_mem on memory location
10528         before passing it to gen_probe_stack.  Create address operand and
10529         legitimize it for the probe_stack_address case.
10531 2018-04-09  Jan Hubicka  <jh@suse.cz>
10533         PR lto/85078
10534         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10535         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10536         * tree.c (free_lang_data_in_type): Fix handling of binfos;
10537         walk basetypes.
10538         (free_lang_data): Rebuild type inheritance graph.
10540 2018-04-09  Martin Sebor  <msebor@redhat.com>
10542         * invoke.texi (-finline-small-functions): Mention other optimization
10543         options.
10544         (-findirect-inlining, -fpartial-inlining): Same.
10545         (-finline-functions-called-once): Same.
10546         (-freorder-blocks-and-partition): Same.
10548 2018-04-09  Jan Hubicka  <jh@suse.cz>
10550         PR rtl/84058
10551         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10552         jumps; choose last target that matches the criteria (i.e.
10553         no partition changes for non-crossing jumps).
10554         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10555         support for redirecting crossing jumps to non-crossing.
10557 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
10559         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10560         also for naked functions.
10562 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
10564         * config/arc/arc.md (add_shift): New pattern.
10565         (add_shift2): Likewise.
10566         (sub_shift): Likewise.
10567         (sub_shift_cmp0_noout): Likewise.
10568         (compare_si_ashiftsi): Likewise.
10569         (xbfu_cmp0_noout): New combine pattern.
10570         (xbfu_cmp0"): Likewise.
10571         (movsi_set_cc_insn): Place the predicable variant first.
10572         (commutative_binary_cmp0_noout): Remove clobber.
10573         (commutative_binary_cmp0): New pattern.
10574         (noncommutative_binary_cmp0): Likewise.
10575         (noncommutative_binary_cmp0_noout): Likewise.
10576         (noncommutative_binary_comparison_result_used): Removed.
10577         (rsub_cmp0): New pattern.
10578         (rsub_cmp0_noout): Likewise.
10579         (extzvsi): Changed, keep only meaningful variants.
10580         (SQH, SEZ): New iterators.
10581         (SQH_postfix): New mode attribute.
10582         (SEZ_prefix): New code attribute.
10583         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10584         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10585         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10586         of numerical value.
10587         (noncommutative_operator): Check the availability of barrel
10588         shifter option.
10590 2018-04-09  Richard Biener  <rguenther@suse.de>
10592         PR tree-optimization/85284
10593         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10594         Only use the niter constraining form of simple_iv when the exit
10595         is always executed.
10597 2018-04-09  Tom de Vries  <tom@codesourcery.com>
10599         PR target/84041
10600         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10601         (define_expand "*memory_barrier"): New define_expand.
10602         (define_insn "memory_barrier"): New insn.
10604 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10606         PR rtl-optimization/80463
10607         PR rtl-optimization/83972
10608         PR rtl-optimization/83480
10610         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10611         correct producer for the insn.
10612         (tidy_control_flow): Fixup seqnos in case of debug insns.
10614 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10616         PR rtl-optimization/83913
10618         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10619         different sched-times when merging exprs.
10621 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10623         PR rtl-optimization/83962
10625         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10626         tidy_fallthru_edge and tidy_control_flow.
10628 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10630         PR rtl-optimization/83530
10632         * sel-sched.c (force_next_insn): New global variable.
10633         (remove_insn_for_debug): When force_next_insn is true, also leave only
10634         next insn in the ready list.
10635         (sel_sched_region): When the region wasn't scheduled, make another pass
10636         over it with force_next_insn set to 1.
10638 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
10640         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10641         into tm_file.
10642         * config/nds32/constants.md (unspec_volatile_element): Add enum values
10643         for interrupt control.
10644         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10645         functions for interrupt control.
10646         * config/nds32/nds32-intrinsic.md: Likewise.
10647         * config/nds32/nds32_intrinsic.h: Likewise.
10648         * config/nds32/nds32.h (nds32_builtins): Likewise.
10650 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
10652         * config/nds32/nds32.c (nds32_init_machine_status,
10653         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10654         strict_aligned_p field.
10655         (nds32_expand_to_rtl_hook): New function.
10656         (TARGET_EXPAND_TO_RTL_HOOK): Define.
10657         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10659 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10660             Chung-Ju Wu  <jasonwucj@gmail.com>
10662         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10663         * config/nds32/nds32-n7.md: New file.
10664         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10665         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10666         pipeline.
10667         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10668         * config/nds32/nds32.md (pipeline_model): Add n7.
10669         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10670         * config/nds32/pipelines.md: Include n7 settings.
10672 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10673             Chung-Ju Wu  <jasonwucj@gmail.com>
10675         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10676         * config/nds32/nds32-e8.md: New file.
10677         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10678         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10679         pipeline.
10680         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10681         * config/nds32/nds32.md (pipeline_model): Add e8.
10682         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10683         * config/nds32/pipelines.md: Include e8 settings.
10685 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10686             Chung-Ju Wu  <jasonwucj@gmail.com>
10688         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10689         * config/nds32/nds32-n8.md: New file.
10690         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10691         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10692         pipeline.
10693         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10694         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10695         * config/nds32/nds32.md (pipeline_model): Add n8.
10696         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10697         * config/nds32/pipelines.md: Include n8 settings.
10699 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10700             Chung-Ju Wu  <jasonwucj@gmail.com>
10702         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10703         * config/nds32/nds32-n9-2r1w.md: New file.
10704         * config/nds32/nds32-n9-3r2w.md: New file.
10705         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10706         nds32_register_ports): New or modify for cpu n9.
10707         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10708         pipeline.
10709         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10710         * config/nds32/nds32-utils.c: New file.
10711         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10712         TARGET_MUL_SLOW): Define.
10713         * config/nds32/nds32.md (pipeline_model): New attribute.
10714         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10715         New options that support cpu n9.
10716         * config/nds32/pipelines.md: Include n9 settings.
10717         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10719 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
10721         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10722         information if necessary.
10723         (output_cond_branch_compare_zero): Likewise.
10724         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10725         (nds32_target_alignment): Refine for alignment.
10726         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10727         (FUNCTION_BOUNDARY): Modify.
10728         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10729         align case.
10730         * config/nds32/nds32.opt (malways-align, malign-functions): New.
10732 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
10734         * config/nds32/constants.md (unspec_volatile_element): Add values for
10735         TLB operation and data prefetch.
10736         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10737         functions for TLB operation and data prefetch.
10738         * config/nds32/nds32-intrinsic.md: Likewise.
10739         * config/nds32/nds32_intrinsic.h: Likewise.
10740         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10741         (nds32_print_operand): Likewise.
10742         * config/nds32/nds32.h (nds32_builtins): Likewise.
10744 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
10745         Andrew Pinski <pinsika@gcc.gnu.org>
10747         PR middle-end/82976
10748         * match.pd: Use constant_boolean_node of correct type instead of
10749         boolean_true_node or boolean_false_node for simplifying
10750         pointer comparisons to zero.
10752 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
10754         PR tree-optimization/80021
10755         * tree.c (verify_type_variant): Make error call in verify_variant_match
10756         translatable and remove final full stop.
10758 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10760         * config/nds32/constants.md (unspec_volatile_element): Add
10761         UNSPEC_VOLATILE_EH_RETURN.
10762         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10763         nds32_output_stack_pop): Support dwarf exception handling process.
10764         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10765         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10766         exception handling process.
10767         (nds32_compute_stack_frame): Likewise.
10768         (nds32_return_addr_rtx): Likewise.
10769         (nds32_initial_elimination_offset): Likewise.
10770         (nds32_expand_prologue): Likewise.
10771         (nds32_expand_epilogue): Likewise.
10772         (nds32_dynamic_chain_address): New function.
10773         * config/nds32/nds32.h (machine_function): Add fields for dwarf
10774         exception handling.
10775         (DYNAMIC_CHAIN_ADDRESS): Define.
10776         (EH_RETURN_DATA_REGNO): Define.
10777         (EH_RETURN_STACKADJ_RTX): Define.
10778         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10779         patterns for dwarf exception handling.
10781 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10783         * config/nds32/nds32.h: Clean up obsolete macros.
10785 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10787         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10788         Add enum values for particular instructions.
10789         * config/nds32/nds32-intrinsic.c: Implementation of expanding
10790         particular intrinsic functions.
10791         * config/nds32/nds32-intrinsic.md: Likewise.
10792         * config/nds32/nds32_intrinsic.h: Likewise.
10793         * config/nds32/nds32.h (nds32_builtins): Likewise.
10794         * config/nds32/nds32.md (type): Add pbsad and pbsada.
10795         (btst, ave): New patterns for particular instructions.
10797 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10799         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10800         Add enum values for atomic load/store and memory sync.
10801         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10802         and memory sync.
10803         * config/nds32/nds32-intrinsic.md: Likewise.
10804         * config/nds32/nds32_intrinsic.h: Likewise.
10805         * config/nds32/nds32.h (nds32_builtins): Likewise.
10807 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
10809         PR tree-optimization/85257
10810         * fold-const.c (native_encode_vector): If not all elts could fit
10811         and off is -1, return 0 rather than offset.
10812         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10813         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10814         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
10815         adjust buffer in native_interpret_expr call.
10817 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10819         * config/nds32/constants.md (unspec_volatile_element): Add cache
10820         control enum values.
10821         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10822         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10823         * config/nds32/nds32.c (nds32_cctl_names): New.
10824         (nds32_print_operand): Handle cache control register names.
10825         * config/nds32/nds32.h (nds32_builtins): New enum values.
10826         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10827         macros.
10828         * config/nds32/nds32.md (type): Add mmu.
10829         * config/nds32/pipelines.md (simple_insn): Add mmu.
10831 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10833         * config/nds32/nds32.md (type): Remove call.
10834         * config/nds32/pipelines.md (simple_insn): Likewise.
10836 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10838         * config/nds32/constants.md (unspec_volatile_element): Add
10839         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10840         UNSPEC_VOLATILE_FMFCFG.
10841         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10842         description for fmfcfg and fmfcsr.
10843         (bdesc_1arg): Add fmtcsr.
10844         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10845         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10846         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10847         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10848         unspec_fmfcfg): New patterns.
10849         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10850         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10851         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10852         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10853         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10854         __nds32__fmfcfg): Define.
10856 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10858         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10859         intrinsic register names.
10860         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10861         intrinsic register enum values and macros.
10863 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10865         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10866         for load/store addressing form.
10867         (nds32_print_operand_address): Likewise.
10869 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
10871         PR target/85196
10872         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10873         based on LABEL_REF.  Remove useless assertion.
10874         (pic_address_needs_scratch): Fix formatting.
10875         (sparc_legitimize_pic_address): Minor tweaks.
10876         (sparc_delegitimize_address): Adjust assertion accordingly.
10877         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10878         into symbolic_operand.
10879         (movsi_high_pic_label_ref): Likewise.
10880         (movsi_lo_sum_pic_label_ref): Likewise.
10881         (movdi_pic_label_ref): Likewise.
10882         (movdi_high_pic_label_ref): Likewise.
10883         (movdi_lo_sum_pic_label_ref): Likewise.
10885 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
10887         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10888         custom LIB_SPEC setup.
10890 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
10891             Kito Cheng  <kito.cheng@gmail.com>
10893         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10894         * config/riscv/freebsd.h: New.
10896 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10898         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10899         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10900         file.
10902 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10903             Kito Cheng  <kito.cheng@gmail.com>
10905         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10906         nds32_output_call, nds32_symbol_binds_local_p): New functions.
10907         * config/nds32/nds32-protos.h (nds32_output_call,
10908         nds32_output_return): Declare.
10909         * config/nds32/nds32.md: Refine all the call and return patterns.
10911 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10913         PR debug/85252
10914         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10915         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10917         PR rtl-optimization/84872
10918         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10919         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10920         EDGE_CROSSING edge.
10922 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
10924         * expr.c (copy_blkmode_to_reg): Revert 254862.
10925         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10927 2018-04-06  Richard Biener  <rguenther@suse.de>
10929         PR middle-end/85244
10930         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10931         after seeing a component reference with an adjacent field.  Treat
10932         refs to arrays at struct end of external decls similar to
10933         refs to unconstrained commons.
10935 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10937         PR sanitizer/85213
10938         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10939         look through SAVE_EXPRs with non-side-effects argument.  Adjust
10940         recursive calls.
10941         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10942         save_p here.
10944 2018-04-06  Richard Biener  <rguenther@suse.de>
10946         PR middle-end/85180
10947         * alias.c (find_base_term): New wrapper around find_base_term
10948         unwinding CSELIB_VAL_PTR changes.
10949         (find_base_term): Do not restore CSELIB_VAL_PTR during the
10950         recursion.
10952 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10954         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10955         instructions.
10956         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10957         constant definitions.
10958         ("nop"): lr 0,0 -> nopr r0
10959         ("nop_lr0", "nop_lr1"): New insn definitions.
10961 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10963         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10964         NDS32_V3PUSH_AVAILABLE_P macro.
10966 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
10967             Chung-Ju Wu  <jasonwucj@gmail.com>
10969         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10970         (nds32*-*-*): Add float and fpu_config into supported_defaults.
10971         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10972         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10973         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10974         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10975         * config/nds32/constraints.md: New constraints and checking for hard
10976         float configuration.
10977         * config/nds32/iterators.md: New mode iterator and attribute for hard
10978         float configuration.
10979         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10980         patterns.
10981         * config/nds32/nds32-fpu.md: New file.
10982         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10983         deal with hard float code generation.
10984         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10985         ARCH_V3S.
10986         (abi_type, float_reg_number): New enum type.
10987         * config/nds32/nds32-predicates.c: New predicates for hard float.
10988         * config/nds32/nds32-protos.h: Declare functions for hard float.
10989         * config/nds32/nds32.c: Implementation for hard float configuration.
10990         * config/nds32/nds32.h: Definitions for hard float configuration.
10991         * config/nds32/nds32.md: Include hard float machine description and
10992         modify patterns for hard float configuration.
10993         * config/nds32/nds32.opt: New options for hard float configuration.
10994         * config/nds32/predicates.md: New predicates for hard float
10995         configuration.
10997 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
10999         * common/config/nds32/nds32-common.c
11000         (nds32_option_optimization_table): Enable -mreleax-hint by default.
11002 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
11004         PR middle-end/85195
11005         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11006         CONSTRUCTOR_ELT (ctor, ...)->value.
11008 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
11010         PR target/85193
11011         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11013 2018-04-05  Tom de Vries  <tom@codesourcery.com>
11015         PR target/85204
11016         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11017         cond jump.
11019 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
11020             Kito Cheng  <kito.cheng@gmail.com>
11022         * config/nds32/constraints.md (U33): Fine-tune checking condition.
11023         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11024         * config/nds32/nds32.h (nds32_16bit_address_type): Add
11025         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11027 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
11028             Kito Cheng  <kito.cheng@gmail.com>
11030         * config/nds32/constraints.md (Ufe): New memory constraint.
11031         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11032         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11033         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11034         operands.
11035         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11036         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11038 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11040         * config/nds32/nds32.md: Use optimize_size in the condition for
11041         alu-shift instructions.
11043 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11045         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11047 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11049         * config/nds32/nds32.md (negsi2): Refine pattern.
11051 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
11052             Chung-Ju Wu  <jasonwucj@gmail.com>
11054         * config/nds32/iterators.md (shift_rotate): New code iterator.
11055         (shift): New code attribute.
11056         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11057         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11058         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11059         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11060         bit-wise operations.
11061         (andsi3, *andsi3): Ditto.
11062         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11063         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11064         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11065         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11066         nds32_ior_operand, nds32_xor_operand): New predicates.
11068 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11070         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11071         (addsi3, subsi3): ... this.
11073 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11075         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11077 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11079         * config/nds32/nds32.md: Adjust indention.
11081 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
11083         * config/nds32/nds32.md (feature): New attribute.
11085 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11087         * config/nds32/nds32.md (subtype): New attribute.
11089 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11091         PR target/85203
11092         * config/arm/arm-builtins.c (arm_expand_builtin): Change
11093         expansion to perform a bitwise AND of the argument followed by a
11094         boolean negation of the result.
11096 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
11098         PR rtl-optimization/84878
11099         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11100         the basic block.  Assert the use reference is not artificial and that
11101         it has an associated insn.
11103 2018-04-04  Michael Matz  <matz@suse.de>
11105         * builtins.c (compute_objsize): Pass correct operand
11106         to array_at_struct_end_p.
11108 2018-04-04  Richard Biener  <rguenther@suse.de>
11110         PR lto/85176
11111         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11112         from contexts for DINFO_LEVEL_TERSE and below.
11114 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11116         * config/nds32/nds32-doubleword.md (move_<mode>): Require
11117         resiter_operand condition.
11118         * config/nds32/nds32.md (*move<mode>): Ditto.
11120 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11121             Monk Chiang  <sh.chiang04@gmail.com>
11123         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11125 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11127         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11129 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11130             Kito Cheng  <kito.cheng@gmail.com>
11132         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11133         nds32_cond_code_str, output_cond_branch,
11134         output_cond_branch_compare_zero, nds32_expand_cbranch,
11135         nds32_expand_cstore, nds32_expand_movcc,
11136         nds32_output_cbranchsi4_equality_zero,
11137         nds32_output_cbranchsi4_equality_reg,
11138         nds32_output_cbranchsi4_equality_reg_or_const_int,
11139         nds32_output_cbranchsi4_greater_less_zero: New functions.
11140         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11141         nds32_expand_cstore, nds32_expand_movcc,
11142         nds32_output_cbranchsi4_equality_zero,
11143         nds32_output_cbranchsi4_equality_reg,
11144         nds32_output_cbranchsi4_equality_reg_or_const_int,
11145         nds32_output_cbranchsi4_greater_less_zero): Declare.
11146         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11147         nds32_rimm11s_operand): New predicates.
11148         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11149         * config/nds32/nds32.md: Rewrite all the branch and conditional move
11150         patterns.
11152 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11154         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11155         * config/nds32/nds32.md: Ditto.
11156         * config/nds32/pipelines.md: Ditto.
11158 2018-04-04  Richard Biener  <rguenther@suse.de>
11160         PR tree-optimization/85168
11161         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11162         propagating abnormals.
11164 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11166         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11168 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11169             Kito Cheng  <kito.cheng@gmail.com>
11171         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11172         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11173         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11174         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11175         * config/nds32/nds32.md (sibcall_internal): New.
11176         (sibcall_register): Remove.
11177         (sibcall_immediate): Remove.
11178         (sibcall_value_internal): New.
11179         (sibcall_value_register): Remove.
11180         (sibcall_value_immediate): Remove.
11181         * config/nds32/predicates.md (nds32_general_register_operand): New.
11182         (nds32_call_address_operand): New.
11184 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
11186         PR rtl-optimization/85167
11187         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11188         bb_defs if *split_p, instead preinitialize it to NULL.
11190         PR tree-optimization/85156
11191         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11192         evaluating the argument multiple times.
11194 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
11196         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11197         than vector.
11198         (_mm_cvtpd_ps): Likewise.
11199         (_mm_cvttpd_epi32): Likewise.
11200         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11201         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11202         vector, pixel, and bool following altivec.h include.
11204 2018-04-03  Martin Sebor  <msebor@redhat.com>
11206         * doc/extend.texi (Common Function Attributes): Clarify.
11207         (const attribute): Likewise.
11208         (pure attribute): Likewise.
11210 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
11212         PR target/85169
11213         * config/i386/i386.c (ix86_expand_vector_set): Use
11214         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
11216 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
11218         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11219         instructions when changing rounding bits to preserve precision bits
11220         in the x87 control word.
11222 2018-04-03  Martin Liska  <mliska@suse.cz>
11224         PR tree-optimization/82491
11225         * rtl.h (strip_offset_and_add): Replace += suboffset with
11226         poly_uint64 () + suboffset.
11228 2018-03-29  Martin Liska  <mliska@suse.cz>
11229             Martin Jambor  <mjambor@suse.cz>
11231         PR ipa/84947
11232         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11233         param_type is not an integral or pointer type.
11235 2018-04-03  Richard Biener  <rguenther@suse.de>
11237         * sese.h (recompute_all_dominators): Remove.
11239 2018-04-02  Martin Sebor  <msebor@redhat.com>
11241         * doc/invoke.texi (-Wrestrict): Fix typos.
11243 2018-04-02  Jim Wilson  <jimw@sifive.com>
11245         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
11246         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
11247         (<optab>di3, <optab>si3_extend): Likewise.
11248         (<optab>si3_mask, <optab>si3_mask_1): New.
11249         (<optab>di3_mask, <optab>di3_mask_1): New.
11250         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
11251         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
11252         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
11254 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
11256         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
11257         example.
11259 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
11261         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
11262         (nds32_canonicalize_comparison): New function.
11264 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11265             Kito Cheng  <kito.cheng@gmail.com>
11266             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
11268         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
11269         * config/nds32/constants.md (unspec_volatile_element): Add
11270         UNSPEC_VOLATILE_RELAX_GROUP.
11271         * config/nds32/nds32-relax-opt.c: New file.
11272         * config/nds32/nds32-predicates.c
11273         (nds32_symbol_load_store_p): New function.
11274         * config/nds32/nds32-protos.h
11275         (nds32_symbol_load_store_p): Declare function.
11276         (make_pass_nds32_relax_opt): Declare new rtl pass function.
11277         * config/nds32/nds32.c
11278         (nds32_register_pass): New function to register pass.
11279         (nds32_register_passes): New function to register passes.
11280         * config/nds32/nds32.md (relax_group): New pattern.
11281         * config/nds32/nds32.opt (mrelax-hint): New option.
11282         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
11284 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
11286         * config/nds32/t-nds32: Modify files dependency.
11288 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11290         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
11291         (PROFILE_HOOK): Define its implementation.
11293 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11295         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
11296         type and 32-bit size.
11298 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
11300         PR middle-end/85090
11301         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
11302         (V_128_256): New mode iterator.
11303         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
11304         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
11305         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
11306         of V.
11307         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
11308         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
11310 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
11312         PR target/83315
11313         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
11314         NaN inputs correctly.
11316 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
11318         PR target/80546
11319         * config/rs6000/vsx.md (??r): New mode attribute.
11320         (*vsx_mov<mode>_64bit): Use it.
11321         (*vsx_mov<mode>_32bit): Likewise.
11323 2018-03-30  Martin Sebor  <msebor@redhat.com>
11325         PR tree-optimization/84818
11326         * builtins.c (check_access): Use warning_n.
11328 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11330         PR target/83822
11331         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11332         condition.
11333         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11334         condition.
11336 2018-03-30  Julia Koval  <julia.koval@intel.com>
11338         PR target/84413
11339         * x86-tune.def (movx, partial_reg_dependency): Enable for
11340         m_SKYLAKE_AVX512.
11342 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
11344         PR inline-asm/84985
11345         * lra-constraints.c (process_alt_operands): Move setting
11346         this_alternative_matches below.
11348 2018-03-29  Martin Liska  <mliska@suse.cz>
11350         PR lto/84995.
11351         * doc/invoke.texi: Document how LTO works with debug info.
11352         Describe auto-load support of binutils.  Mention 'x86-64'
11353         as valid option value of -march option.
11355 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
11357         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11359         PR c/85094
11360         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11361         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11362         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11363         checking.
11365 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11367         PR target/84912
11368         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11369         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11370         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11371         for RS6000_BTM_POWERPC64.
11372         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11373         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11374         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11375         definition.
11376         (DIVDE): Use it.
11377         (DIVDEU): Likewise.
11379 2018-03-28 Carl Love  <cel@us.ibm.com>
11381         Revert
11382         2017-09-27  Carl Love  <cel@us.ibm.com>
11384         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11385         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11386         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11387         fctiw instruction.
11389 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11391         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11392         instead of __vector bool.
11393         (_mm_max_pu8): Likewise.
11394         (_mm_min_pi16): Likewise.
11396 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11398         PR target/84912
11399         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11400         (DIVWEUO): Likewise.
11401         (DIVDEO): Likewise.
11402         (DIVDEUO): Likewise.
11403         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11404         DIVWEUO and DIVDEUO.
11405         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11406         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11407         (div_extend): Likewise.
11408         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11409         builtin function.
11410         (__builtin_divweuo): Likewise.
11411         (__builtin_divdeo): Likewise.
11412         (__builtin_divdeuo): Likewise.
11414 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11416         PR target/85095
11417         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11418         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11420         PR tree-optimization/82004
11421         * gimple-match-head.c (optimize_pow_to_exp): New function.
11422         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11423         Don't fold to exp if optimize_pow_to_exp is false.
11425 2018-03-28  Martin Liska  <mliska@suse.cz>
11427         PR other/84819
11428         * calls.c (initialize_argument_information): Fix trailing space.
11429         * common.opt: Fix typo and provide better explanation for
11430         -fsanitize-coverage option.
11431         * config/i386/i386.opt: Fix typo.
11433 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11434             Martin Liska  <mliska@suse.cz>
11436         PR sanitizer/85081
11437         * gimplify.c (asan_poison_variable): Don't do the check for
11438         gimplify_omp_ctxp here.
11439         (gimplify_decl_expr): Do it here.
11440         (gimplify_target_expr): Likewise.
11442 2018-03-28  Martin Liska  <mliska@suse.cz>
11444         PR target/84988
11445         * config/i386/i386.c (ix86_function_arg_advance): Do not call
11446         chkp_type_bounds_count if MPX is not enabled.
11448 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11450         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11452 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
11454         PR target/84914
11455         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11456         function to create the function decl for complex long double
11457         multiply and divide for -mabi=ieeelongdouble.
11458         (init_float128_ieee): Call it.
11460 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
11462         PR target/85044
11463         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11464         -fcf-protection=branch -mibt.
11465         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11467 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11469         PR target/81863
11470         * config/arm/arm.c (arm_valid_symbolic_address): Handle
11471         arm_word_relocations.
11473 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
11475         PR target/85056
11476         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11477         extern array declarations.
11479 2018-03-27  Richard Biener  <rguenther@suse.de>
11481         PR middle-end/84067
11482         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11483         explicit single_use checks.
11485 2018-03-27  Richard Biener  <rguenther@suse.de>
11487         PR tree-optimization/85082
11488         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11489         Valueize the VUSE.
11491 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11493         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11494         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11495         Turn on fasynchronous-unwind-tables and funwind-tables.
11497 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
11499         PR target/85073
11500         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11501         (*bmi_blsr_<mode>_ccz): Ditto.
11503 2018-03-26  Tom de Vries  <tom@codesourcery.com>
11505         PR tree-optimization/85063
11506         * omp-general.c (offloading_function_p): New function.  Factor out
11507         of ...
11508         * omp-offload.c (pass_omp_target_link::gate): ... here.
11509         * omp-general.h (offloading_function_p): Declare.
11510         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11511         with attribute omp declare target for offloading functions.
11513 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
11515         PR tree-optimization/84005
11516         * tree-data-ref.h (get_base_for_alignment): Declare.
11517         * tree-data-ref.c (get_base_for_alignment_1): New function.
11518         (get_base_for_alignment): Likewise.
11519         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11520         get_base_for_alignment to find a suitable base object, instead
11521         of always using drb->base_address.
11523 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
11525         PR inline-asm/85022
11526         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11527         known size by default.
11529 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
11531         PR inline-asm/85030
11532         * lra-constraints.c (process_alt_operands): Don't match BLKmode
11533         and non BLKmode operands.
11535 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11537         PR target/85026
11538         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11539         Clean up attributes.
11541 2018-03-23  Richard Biener  <rguenther@suse.de>
11543         PR debug/85020
11544         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11545         we are going to emit early debug for LTO.
11547 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
11549         PR inline-asm/85034
11550         * function.c (match_asm_constraints_1): Don't optimize if input
11551         doesn't satisfy general_operand predicate for output's mode.
11553         PR inline-asm/85022
11554         * alias.c (write_dependence_p): Don't require for x_canonicalized
11555         non-VOIDmode if x has VOIDmode.
11557         PR sanitizer/85029
11558         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11559         just don't try to optimize it rather than assert it never happens.
11561 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11563         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11564         macro expansions for definition of ST_INTERNAL_<mode> and
11565         LD_INTERNAL_<mode> builtins.
11566         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11567         Remove prototype.
11568         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11569         function.
11570         (altivec_expand_st_builtin): Likewise.
11571         (altivec_expand_builtin): Remove calls to deleted functions.
11572         (rs6000_address_for_altivec): Delete this function.
11573         * config/rs6000/vector.md: Remove expands for
11574         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11576 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
11578         PR target/84826
11579         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11580         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11581         re-computing once computed.
11582         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11583         (arm_init_machine_status): Initialize
11584         machine->static_chain_stack_bytes.
11586 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11588         PR target/84760
11589         * doc/extend.texi: Add four new prototypes for vec_ld.
11590         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11591         definitions for more logical presentation.
11592         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11593         entries for V1TI variants of __builtin_altivec_ld builtin.
11594         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11595         handling of V1TI variant of LVX icode pattern.
11596         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11597         (rs6000_gimple_fold_builtin): Likewise.
11598         (altivec_init_builtins): Add code to define
11599         __builtin_altivec_lvx_v1ti function.
11601 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
11603         PR inline-asm/84941
11604         * function.c (match_asm_constraints_1): Don't do the optimization
11605         if input isn't a REG, SUBREG, MEM or constant.
11607 2018-03-22  Tom de Vries  <tom@codesourcery.com>
11609         PR tree-optimization/84956
11610         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11611         bb_has_abnormal_pred.
11613 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
11615         PR sanitizer/85018
11616         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11617         DECL_INITIAL (decl) to decl at the end.
11618         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11619         adjust the comment.
11621 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
11623         * doc/extend.texi (__builtin_tgmath): Document when complex
11624         integer types are treated as _Complex _Float64.
11626 2018-03-21  Tom de Vries  <tom@codesourcery.com>
11628         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11630 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11632         PR tree-optimization/84960
11633         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11634         if it is ENTRY block, move them into single succ of ENTRY in that case.
11636 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
11638         PR tree-optimization/84811
11639         * poly-int.h (poly_span_traits): Remove the T3 parameter and
11640         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11641         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11642         (known_subrange_p): Update accordingly.  Cast each value involved
11643         in the size comparison, rather than casting the result of the
11644         subtraction.
11646 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11648         PR tree-optimization/84982
11649         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11650         by flipping the least significant bit rather than all bits from
11651         bitpos to bitpos + bitsize - 1.
11653 2018-03-21  Nathan Sidwell  <nathan@acm.org>
11655         * doc/extend.texi (Deprecated Features): Remove mention of
11656         long-deleted deprecations.
11658 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11660         PR jit/84288
11661         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11662         * configure: Regenerate.
11664 2018-03-21  Tom de Vries  <tom@codesourcery.com>
11666         PR tree-optimization/83126
11667         * tree-parloops.c (num_phis): New function.
11668         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11670 2018-03-21  Nathan Sidwell  <nathan@acm.org>
11672         * doc/extend.texi (Deprecated Features): Update deprecated flags,
11673         mention anon-struct/union members and trailing attributes.
11675 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
11677         PR tree-optimization/84969
11678         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11679         builtin memset partitions if they set different rhs values.
11681 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11683         PR rtl-optimization/84989
11684         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11685         VEC_DUPLICATE with scalar result mode.
11687 2018-03-21  Martin Liska  <mliska@suse.cz>
11689         PR ipa/84963
11690         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11691         not intended return statement.
11693 2018-03-21  Martin Liska  <mliska@suse.cz>
11695         PR target/84988
11696         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11697         (chkp_find_bound_slots_1): Limit number of iterations.
11699 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
11701         PR target/84838
11702         * Minor grammar fixes for x86 options.
11704 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11706         PR debug/84875
11707         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11708         holding REG_CFA_RESTORE notes, instead turn them into a USE.
11710 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
11712         PR target/83789
11713         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11714         (altivec_lvx_<mode>_1op): Likewise.
11715         (altivec_stvx_<mode>_2op): Likewise.
11716         (altivec_stvx_<mode>_1op): Likewise.
11717         (altivec_lvx_<VM2:mode>): New define_expand.
11718         (altivec_stvx_<VM2:mode>): Likewise.
11719         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11720         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11721         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11722         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11723         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11724         (rs6000_gen_lvx): Likewise.
11725         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11726         (altivec_expand_stv_builtin): Likewise.
11727         (altivec_expand_builtin): Likewise.
11728         * config/rs6000/vector.md: Likewise.
11730 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11732         PR target/82518
11733         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11734         BYTES_BIG_ENDIAN.
11736 2018-03-20  Richard Biener  <rguenther@suse.de>
11738         PR target/84986
11739         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11740         sign-conversions as zero, fall back to standard scalar_stmt
11741         cost for the rest.
11743 2018-03-20  Martin Liska  <mliska@suse.cz>
11745         PR ipa/84825
11746         * predict.c (rebuild_frequencies): Handle case when we have
11747         PROFILE_ABSENT, but flag_guess_branch_prob is false.
11749 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11751         PR target/84990
11752         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11753         flag_section_anchors.
11754         * varasm.c (use_blocks_for_decl_p): Remove hack for
11755         dw2_force_const_mem.
11757         PR target/84845
11758         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11759         to ...
11760         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
11761         be created, use lowpart_subreg of operands[0] rather than operands[0]
11762         itself.
11763         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11764         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11765         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11766         and n constraint instead of aarch64_shift_imm_di and Usd.
11767         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11768         (*aarch64_<optab>_reg_minus<mode>3): ... this.
11770 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
11772         PR target/82989
11773         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11774         to favor GPR over NEON registers.
11775         (<shift>di3_neon): Likewise.
11777 2018-03-20  Tom de Vries  <tom@codesourcery.com>
11779         PR target/84952
11780         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11781         (nvptx_process_pars): Emit bar.sync asap and alap.
11783 2018-03-20  Tom de Vries  <tom@codesourcery.com>
11785         PR target/84954
11786         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11787         seen_label if seen_label is already set.
11789 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11791         PR target/84945
11792         * config/i386/i386.c (fold_builtin_cpu): For features above 31
11793         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11794         Use 1U instead of 1.  Formatting fixes.
11796         PR c/84953
11797         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11798         instead of TREE_TYPE (s1) for the return value.
11800 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
11802         PR tree-optimization/84946
11803         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11804         bitsize + bitsize in poly_uint64 rather than poly_int64.
11806         PR sanitizer/78651
11807         * dwarf2asm.c: Include fold-const.c.
11808         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11809         of decl rather than decl itself.
11811         PR rtl-optimization/84643
11812         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11814 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
11816         PR sanitizer/78651
11817         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11818         calling assemble_variable.
11820 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
11822         PR target/81647
11823         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11824         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11826 2018-03-19  Jim Wilson  <jimw@sifive.com>
11828         PR bootstrap/84856
11829         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11830         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11831         (riscv_first_stack_step): Likewise.
11832         (riscv_option_override): Use STACK_BOUNDARY instead of
11833         MIN_STACK_BOUNDARY.
11834         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11835         MIN_STACK_BOUNDARY.
11836         (BIGGEST_ALIGNMENT): Set to 128.
11837         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11838         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11839         STACK_BOUNDARY.
11841 2018-03-19  Richard Biener  <rguenther@suse.de>
11843         PR tree-optimization/84933
11844         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11845         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11847 2018-03-19  Richard Biener  <rguenther@suse.de>
11849         PR tree-optimization/84859
11850         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11851         (cond_if_else_store_replacement): Perform sinking operation on
11852         single-store BBs regardless of MAX_STORES_TO_SINK setting.
11853         Generalize what a BB with a single eligible store is.
11855 2018-03-19  Richard Biener  <rguenther@suse.de>
11857         PR tree-optimization/84929
11858         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11859         chrec_is_positive against non-chrec arg.
11861 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
11863         PR target/84711
11864         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11866 2018-03-18  Martin Liska  <mliska@suse.cz>
11868         PR rtl-optimization/84635
11869         * regrename.c (build_def_use): Use matches_mode only when
11870         matches >= 0.
11872 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
11874         PR tree-optimization/84913
11875         * tree-vect-loop.c (vectorizable_reduction): Don't try to
11876         vectorize chains of COND_EXPRs.
11878 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11880         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11882 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11884         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11886 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11888         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11890 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11891             Kito Cheng  <kito.cheng@gmail.com>
11893         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11894         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11895         (nds32_adjust_reg_alloc_order): New function.
11896         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11898 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
11900         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11901         nds32_print_operand, nds32_print_operand_address): Use
11902         HOST_WIDE_INT_PRINT_DEC instead.
11904 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11906         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11908 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
11910         PR target/84902
11911         * config/i386/i386.c (initial_ix86_tune_features,
11912         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11913         unsigned long long.
11914         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11915         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11916         rather than 1u << ix86_tune.  Formatting fix.
11917         (ix86_option_override_internal): Change ix86_arch_mask from
11918         unsigned int to unsigned HOST_WIDE_INT, initialize to
11919         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11920         (ix86_function_specific_restore): Likewise.
11922 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11924         PR target/84899
11925         * postreload.c (reload_combine_recognize_pattern): Perform
11926         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11927         truncate_int_for_mode the result for the destination's mode.
11929         PR c/84909
11930         * hsa-gen.c (mem_type_for_type): Fix comment typo.
11931         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11932         Likewise.
11933         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11934         Likewise.
11936 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
11938         PR target/84876
11939         * lra-assigns.c (lra_split_hard_reg_for): Don't use
11940         regno_allocno_class_array and sorted_pseudos.
11941         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11942         insns where regno is used.
11944 2018-03-16  Martin Liska  <mliska@suse.cz>
11946         PR ipa/84833
11947         * multiple_target.c (create_dispatcher_calls): Redirect
11948         reference in the symbol table.
11950 2018-03-16  Martin Liska  <mliska@suse.cz>
11952         PR ipa/84722
11953         * multiple_target.c (create_dispatcher_calls): Redirect also
11954         an alias.
11956 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11958         PR c++/79937
11959         PR c++/82410
11960         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11961         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11962         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11964 2018-03-16  Julia Koval  <julia.koval@intel.com>
11966         * doc/invoke.texi (Skylake Server): Add CLWB.
11967         Cannonlake): Remove CLWB.
11969 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11971         PR tree-optimization/84841
11972         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11973         1 << 3.
11974         (FLOAT_ONE_CONST_TYPE): Define.
11975         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11976         (sort_by_operand_rank): Put entries with higher constant_type last
11977         rather than first to match comments.
11979 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
11981         * config/nios2/nios2.md (movsi_internal): Fix thinko in
11982         split predicate.
11984 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
11986         PR c++/79085
11987         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11988         check and use address of target always.
11990 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
11992         PR target/84574
11993         * config/i386/i386.c (indirect_thunk_needed): Update comments.
11994         (indirect_thunk_bnd_needed): Likewise.
11995         (indirect_thunks_used): Likewise.
11996         (indirect_thunks_bnd_used): Likewise.
11997         (indirect_return_needed): New.
11998         (indirect_return_bnd_needed): Likewise.
11999         (output_indirect_thunk_function): Add a bool argument for
12000         function return.
12001         (output_indirect_thunk_function): Don't generate alias for
12002         function return thunk.
12003         (ix86_code_end): Call output_indirect_thunk_function to generate
12004         function return thunks.
12005         (ix86_output_function_return): Set indirect_return_bnd_needed
12006         and indirect_return_needed instead of indirect_thunk_bnd_needed
12007         and indirect_thunk_needed.
12009 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
12011         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12012         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12013         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12015 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
12016             Paul Hua <paul.hua.gm@gmail.com>
12018         PR c/84852
12019         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12021 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
12023         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12024         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12025         resp. SFmode cases.
12027 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
12029         PR target/84711
12030         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12031         instead of GET_MODE_SIZE when comparing Units.
12033 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12035         PR target/68256
12036         * varasm.c (hash_section): Return an unchangeble hash value
12037         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12038         Return !aarch64_can_use_per_function_literal_pools_p ().
12040 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
12042         PR target/84860
12043         * optabs.c (emit_conditional_move): Pass address of cmode's copy
12044         rather than address of cmode as last argument to prepare_cmp_insn.
12046 2018-03-15  Julia Koval  <julia.koval@intel.com>
12048         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12049         F_AVX512VNNI, F_AVX512BITALG): New.
12051 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
12053         PR target/83451
12054         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
12055         insn for floating-point loads and stores.
12057 2018-03-14  Carl Love  <cel@us.ibm.com>
12059         * config/rs6000/rs6000-c.c: Add macro definitions for
12060         ALTIVEC_BUILTIN_VEC_PERMXOR.
12061         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12062         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12063         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12064         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12065         UNSPEC_VPERMXOR.
12066         * config/doc/extend.texi: Add prototypes for vec_permxor.
12068 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
12070         PR c/84852
12071         * diagnostic-show-locus.c (class layout_point): Convert m_line
12072         from int to linenum_type.
12073         (line_span::comparator): Use linenum "compare" function when
12074         comparing line numbers.
12075         (test_line_span): New function.
12076         (layout_range::contains_point): Convert param "row" from int to
12077         linenum_type.
12078         (layout_range::intersects_line_p): Likewise.
12079         (layout::will_show_line_p): Likewise.
12080         (layout::print_source_line): Likewise.
12081         (layout::should_print_annotation_line_p): Likewise.
12082         (layout::print_annotation_line): Likewise.
12083         (layout::print_leading_fixits): Likewise.
12084         (layout::annotation_line_showed_range_p): Likewise.
12085         (struct line_corrections): Likewise for field m_row.
12086         (line_corrections::line_corrections): Likewise for param "row".
12087         (layout::print_trailing_fixits): Likewise.
12088         (layout::get_state_at_point): Likewise.
12089         (layout::get_x_bound_for_row): Likewise.
12090         (layout::print_line): Likewise.
12091         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12092         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12093         * input.c (selftest::test_linenum_comparisons): New function.
12094         (selftest::input_c_tests): Call it.
12095         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12096         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12097         * selftest.h (ASSERT_GT): New macro.
12098         (ASSERT_GT_AT): New macro.
12099         (ASSERT_LT): New macro.
12100         (ASSERT_LT_AT): New macro.
12102 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
12104         PR rtl-optimization/84780
12105         * combine.c (distribute_links): Don't make a link based on pc_rtx.
12107 2018-03-14  Martin Liska  <mliska@suse.cz>
12109         * tree.c (record_node_allocation_statistics): Use
12110         get_stats_node_kind.
12111         (get_stats_node_kind): New function extracted from
12112         record_node_allocation_statistics.
12113         (free_node): Use get_stats_node_kind.
12115 2018-03-14  Richard Biener  <rguenther@suse.de>
12117         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12118         that the value-set of ANTIC_IN doesn't grow.
12120         Revert
12121         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12122         member.
12123         (BB_VISITED_WITH_VISITED_SUCCS): New define.
12124         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12126 2018-03-14  Julia Koval  <julia.koval@intel.com>
12128         * config.gcc (icelake-client, icelake-server): New.
12129         (icelake): Remove.
12130         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12131         (initial_ix86_arch_features): Ditto.
12132         (PTA_SKYLAKE): Add SGX.
12133         (PTA_ICELAKE): Remove.
12134         (PTA_ICELAKE_CLIENT): New.
12135         (PTA_ICELAKE_SERVER): New.
12136         (ix86_option_override_internal): Split up icelake on icelake client and
12137         icelake server.
12138         (get_builtin_code_for_version): Ditto.
12139         (fold_builtin_cpu): Ditto.
12140         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12141         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12142         * config/i386/i386.h (processor_type): Ditto.
12143         * doc/invoke.texi: Ditto.
12145 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
12147         PR sanitizer/83392
12148         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12149         INTEGER_CST offset, add it together with bitpos / 8 and
12150         sign extend based on POINTER_SIZE.
12152         PR target/84844
12153         Revert
12154         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
12156         PR target/78090
12157         * config/i386/constraints.md (Yc): New register constraint.
12158         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12159         Use Yc constraint for alternative 2 of operand 0.  Remove
12160         preferred_for_speed attribute.
12162 2018-03-14  Richard Biener  <rguenther@suse.de>
12164         PR tree-optimization/84830
12165         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12166         with the old one to avoid oscillations.
12168 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
12170         PR target/83712
12171         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12172         pseudos.
12173         (assign_by_spills): Return a flag of reload assignment failure.
12174         Do not process the reload assignment failures.  Do not spill other
12175         reload pseudos if they has the same reg class.  Update n if
12176         necessary.
12177         (lra_assign): Add a return arg.  Set up from the result of
12178         assign_by_spills call.
12179         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12180         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12181         usage_insns if it is not NULL.
12182         (spill_hard_reg_in_range): New function.
12183         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12184         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12185         function prototypes.
12186         (lra_assign): Change prototype.
12187         * lra.c (lra): Add code to deal with fails by splitting hard reg
12188         live ranges.
12190 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
12192         * config/riscv/riscv.opt (mrelax): New option.
12193         * config/riscv/riscv.c (riscv_file_start): Emit ".option
12194         "norelax" when riscv_mrelax is disabled.
12195         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12197 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12199         PR target/84743
12200         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12201         reassociation for int modes.
12203 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12205         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12206         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12207         for big-endian.
12208         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12209         * config/aarch64/aarch64-sve.md
12210         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12211         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12212         (*extend<mode><Vwide>2): Rename to...
12213         (aarch64_sve_extend<mode><Vwide>2): ...this.
12214         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12215         renaming the old pattern to...
12216         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
12217         unsigned packs.
12218         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12219         define_expand, renaming the old pattern to...
12220         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12221         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12222         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12223         account when deciding which SVE instruction the optab should use.
12224         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12226 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12228         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12229         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12230         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12231         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12232         (tlsdesc_small_<mode>): Turn a define_expand and use
12233         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
12234         (tlsdesc_small_advsimd_<mode>): ...this.
12235         (tlsdesc_small_sve_<mode>): New pattern.
12237 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12239         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
12240         (UNSPEC_UMUL_HIGHPART): New constants.
12241         (MUL_HIGHPART): New int iteraor.
12242         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
12243         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
12244         define_expand.
12245         (*<su>mul<mode>3_highpart): New define_insn.
12247 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12249         PR lto/84805
12250         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12251         incomplete types.
12253 2018-03-13  Martin Liska  <mliska@suse.cz>
12255         PR ipa/84658.
12256         * (sem_item_optimizer::sem_item_optimizer): Initialize new
12257         vector.
12258         (sem_item_optimizer::~sem_item_optimizer): Release it.
12259         (sem_item_optimizer::merge_classes): Register variable aliases.
12260         (sem_item_optimizer::fixup_pt_set): New function.
12261         (sem_item_optimizer::fixup_points_to_sets): Likewise.
12262         * ipa-icf.h: Declare new variables and functions.
12264 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
12266         PR middle-end/84834
12267         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
12268         integer_pow2p@2 and test integer_pow2p in condition.
12269         (A < 0 ? C : 0): Similarly for @1.
12271         PR middle-end/84831
12272         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
12273         characters starting at p contain '\0' character, don't look beyond
12274         that.
12276         PR target/84827
12277         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
12278         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
12280         PR target/84828
12281         * reg-stack.c (change_stack): Change update_end var from int to
12282         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
12283         also call set_block_for_insn on the newly added insns and rescan.
12285         PR target/84786
12286         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
12287         on the last operand.
12289         PR c++/84704
12290         * tree.c (stabilize_reference_1): Return save_expr (e) for
12291         STATEMENT_LIST even if it doesn't have side-effects.
12293 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
12295         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
12297 2018-03-12  Renlin Li  <renlin.li@arm.com>
12299         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
12300         aarch64_output_scalar_simd_mov_immediate.
12302 2018-03-12  Martin Sebor  <msebor@redhat.com>
12304         PR tree-optimization/83456
12305         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
12306         for perfectly overlapping calls to memcpy.
12307         (gimple_fold_builtin_memory_chk): Same.
12308         (gimple_fold_builtin_strcpy): Handle no-warning.
12309         (gimple_fold_builtin_stxcpy_chk): Same.
12310         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
12312 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
12314         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12315         parameter.  Use it for SFmode.
12316         (rs6000_function_arg_advance_1): Adjust.
12317         (rs6000_function_arg): Adjust.
12318         (rs6000_gimplify_va_arg): Pass false for that new parameter.
12320 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
12322         PR rtl-optimization/84169
12323         PR rtl-optimization/84780
12324         * combine.c (can_combine_p): Check for a 2-insn combination whether
12325         the destination register is used between the two insns, too.
12327 2018-03-12  Richard Biener  <rguenther@suse.de>
12329         PR tree-optimization/84803
12330         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12331         for refs DR analysis didn't process.
12333 2018-03-12  Richard Biener  <rguenther@suse.de>
12335         PR tree-optimization/84777
12336         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12337         force-vectorize loops ignore whether we are optimizing for size.
12339 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12341         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12342         (TARGET_MD_ASM_ADJUST): Define.
12344 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
12345             Kito Cheng  <kito.cheng@gmail.com>
12346             Chung-Ju Wu  <jasonwucj@gmail.com>
12348         * config/nds32/nds32.c (nds32_compute_stack_frame,
12349         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12350         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12351         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12352         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12353         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12354         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12355         * config/nds32/nds32.md (prologue, epilogue): Use macro
12356         NDS32_V3PUSH_AVAILABLE_P to do checking.
12358 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
12360         PR debug/58150
12361         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12362         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12363         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
12364         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
12365         addition of most attributes on !orig_type_die or the attribute not
12366         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12368 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12369             Chung-Ju Wu  <jasonwucj@gmail.com>
12371         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12372         __NDS32_VH__ macro.
12373         * config/nds32/nds32.opt (mvh): New option.
12375 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12376             Chung-Ju Wu  <jasonwucj@gmail.com>
12378         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12379         function.
12380         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12381         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12382         definition.
12384 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12385             Chung-Ju Wu  <jasonwucj@gmail.com>
12387         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12388         function.
12389         * config/nds32/nds32-multiple.md (strlensi): New pattern.
12390         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12392 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
12393             Kito Cheng  <kito.cheng@gmail.com>
12394             Chung-Ju Wu  <jasonwucj@gmail.com>
12396         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12397         UNSPEC_FFMISM and UNSPEC_FLMISM.
12398         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12399         for ffb, ffmism and flmism.
12400         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12401         (unspec_ffmism): Ditto.
12402         (unspec_flmism): Ditto.
12403         (nds32_expand_builtin_impl): Check if string extension is available.
12404         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12405         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12407 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
12409         Reverting patch:
12410         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12412         PR target/83712
12413         * lra-assigns.c (assign_by_spills): Return a flag of reload
12414         assignment failure.  Do not process the reload assignment
12415         failures.  Do not spill other reload pseudos if they has the same
12416         reg class.
12417         (lra_assign): Add a return arg.  Set up from the result of
12418         assign_by_spills call.
12419         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12420         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12421         usage_insns if it is not NULL.
12422         (spill_hard_reg_in_range): New function.
12423         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12424         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12425         function prototypes.
12426         (lra_assign): Change prototype.
12427         * lra.c (lra): Add code to deal with fails by splitting hard reg
12428         live ranges.
12430 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
12432         PR target/84807
12433         * config/i386/i386.opt: Replace Enforcment with Enforcement.
12435 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
12437         PR debug/84620
12438         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12439         (dw_val_node): Add val_symbolic_view.
12440         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12441         (symview_upper_bound): New.
12442         (new_line_info_table): Initialize symviews_since_reset.
12443         (dwarf2out_source_line): Count symviews_since_reset and set
12444         symview_upper_bound.
12445         (dw_val_equal_p): Handle symview.
12446         (add_AT_symview): New.
12447         (print_dw_val): Handle symview.
12448         (attr_checksum, attr_checksum_ordered): Likewise.
12449         (same_dw_val_p, size_of_die): Likewise.
12450         (value_format, output_die): Likewise.
12451         (add_high_low_attributes): Use add_AT_symview for entry_view.
12452         (dwarf2out_finish): Reset symview_upper_bound, clear
12453         zero_view_p.
12455 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
12457         PR target/83969
12458         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12459         Add strict argument and use it.
12460         (rs6000_split_multireg_move): Update for new strict argument.
12461         (mem_operand_gpr): Disallow all non-offsettable addresses.
12462         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12464 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
12466         PR target/84772
12467         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12468         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12469         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12471         PR c++/84767
12472         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12473         decl, use remap_type if we want to use the type.
12475 2018-03-09  Martin Sebor  <msebor@redhat.com>
12477         PR tree-optimization/84526
12478         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12479         Remove dead code.
12480         (builtin_access::generic_overlap): Be prepared to handle non-array
12481         base objects.
12483 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
12485         PR rtl-optimization/84682
12486         * lra-constraints.c (process_address_1): Check is_address flag
12487         for address constraints.
12488         (process_alt_operands): Likewise.
12489         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12490         preprocess_constraints.
12491         * recog.h (preprocess_constraints): Add oploc parameter.
12492         Adjust callers.
12493         * recog.c (preprocess_constraints): Test address_operand for
12494         CT_ADDRESS constraints.
12496 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12498         PR target/83712
12499         * lra-assigns.c (assign_by_spills): Return a flag of reload
12500         assignment failure.  Do not process the reload assignment
12501         failures.  Do not spill other reload pseudos if they has the same
12502         reg class.
12503         (lra_assign): Add a return arg.  Set up from the result of
12504         assign_by_spills call.
12505         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12506         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12507         usage_insns if it is not NULL.
12508         (spill_hard_reg_in_range): New function.
12509         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12510         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12511         function prototypes.
12512         (lra_assign): Change prototype.
12513         * lra.c (lra): Add code to deal with fails by splitting hard reg
12514         live ranges.
12516 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12518         PR target/83193
12519         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12520         Accept complain bool parameter.  Only emit errors if it is true.
12521         (arm_parse_cpu_option_name): Likewise.
12522         (arm_target_thumb_only): Adjust callers of the above.
12523         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12524         prototype to take a default true bool parameter.
12525         (arm_parse_arch_option_name): Likewise.
12527 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
12528             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
12530         PR jit/64089
12531         PR jit/84288
12532         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12533         * configure: Regenerate.
12534         * configure.ac ("linker --version-script option"): New.
12535         ("linker soname option"): New.
12537 2018-03-09  Richard Biener  <rguenther@suse.de>
12539         PR tree-optimization/84775
12540         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12541         immediate uses of predicate stmts and mark them modified.
12543         Revert
12544         PR tree-optimization/84178
12545         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12546         to caller.
12547         (version_loop_for_if_conversion): Delay update_ssa call.
12548         (tree_if_conversion): Delay update_ssa until after predicate
12549         insertion.
12551 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
12553         PR target/84763
12554         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12555         when the function accesses prior frames.
12557 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
12559         PR debug/84456
12560         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12561         gen_llsym, otherwise call maybe_gen_llsym.
12563         PR inline-asm/84742
12564         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12565         has ',' character inside of it.
12567 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12569         PR target/84748
12570         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12571         as clobbering CC_REGNUM.
12573 2018-03-08  Richard Biener  <rguenther@suse.de>
12575         PR middle-end/84552
12576         * tree-scalar-evolution.c: Include tree-into-ssa.h.
12577         (follow_copies_to_constant): Do not follow SSA names registered
12578         for update.
12580 2018-03-08  Richard Biener  <rguenther@suse.de>
12582         PR tree-optimization/84178
12583         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12584         to caller.
12585         (version_loop_for_if_conversion): Delay update_ssa call.
12586         (tree_if_conversion): Delay update_ssa until after predicate
12587         insertion.
12589 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
12591         PR tree-optimization/84178
12592         * tree-if-conv.c (release_bb_predicate): Remove the
12593         the assertion that the stmts have NULL use_ops.
12594         Discard the statements, asserting that they haven't
12595         yet been added to a BB.
12597 2018-03-08  Richard Biener  <rguenther@suse.de>
12599         PR tree-optimization/84746
12600         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12601         (phi_translate): Pass in destination ANTIC_OUT set.
12602         (phi_translate_1): Likewise.  For a simplified result lookup
12603         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12604         (phi_translate_set): Adjust.
12605         (do_pre_regular_insertion): Likewise.
12606         (do_pre_partial_partial_insertion): Likewise.
12608 2018-03-08  Martin Liska  <mliska@suse.cz>
12610         PR gcov-profile/84735
12611         * doc/gcov.texi: Document usage of profile files.
12612         * gcov-io.h: Document changes in the format.
12614 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
12616         PR debug/84404
12617         PR debug/84408
12618         * dwarf2out.c (struct dw_line_info_table): Update comments for
12619         view == -1.
12620         (FORCE_RESET_NEXT_VIEW): New.
12621         (FORCE_RESETTING_VIEW_P): New.
12622         (RESETTING_VIEW_P): Check for -1 too.
12623         (ZERO_VIEW_P): Likewise.
12624         (new_line_info_table): Force-reset next view.
12625         (dwarf2out_begin_function): Likewise.
12626         (dwarf2out_source_line): Simplify zero_view_p initialization.
12627         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12628         view directly.  Omit view when omitting .loc at line 0.
12630 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
12632         PR tree-optimization/84740
12633         * tree-switch-conversion.c (process_switch): Call build_constructors
12634         only if info.phi_count is non-zero.
12636         PR tree-optimization/84739
12637         * tree-tailcall.c (find_tail_calls): Check call arguments against
12638         DECL_ARGUMENTS (current_function_decl) rather than
12639         DECL_ARGUMENTS (func) when checking for tail recursion.
12641 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
12643         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12644         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12645         Volker Reichelt's entry and add entries for people that perform
12646         GCC fuzzy testing and report numerous bugs.
12648 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
12650         PR target/82411
12651         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12652         readonly data in sdata, if that is disabled.
12653         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12654         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12655         -mreadonly-in-sdata option.
12657 2018-03-07  Martin Sebor  <msebor@redhat.com>
12659         PR tree-optimization/84468
12660         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12661         basic block when looking for nul assignment.
12663 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
12665         PR target/84277
12666         * except.h (output_function_exception_table): Adjust prototype.
12667         * except.c (output_function_exception_table): Remove FNNAME parameter
12668         and add SECTION parameter.  Ouput one part of the table at a time.
12669         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12670         the first part of the exception table and emit unwind directives.
12671         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12672         (i386_pe_seh_cold_init): Likewise.
12673         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12674         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12675         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12676         (ix86_output_call_insn): Emit a nop in one more case for SEH.
12677         * config/i386/winnt.c: Include except.h.
12678         (struct seh_frame_state): Add reg_offset, after_prologue and
12679         in_cold_section fields.
12680         (i386_pe_seh_end_prologue): Set seh->after_prologue.
12681         (i386_pe_seh_cold_init): New function.
12682         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12683         to seh->in_cold_section.
12684         (seh_emit_push): Record the offset of the push.
12685         (seh_emit_save): Record the offet of the save.
12686         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12687         Test seh->after_prologue to disregard the epilogue.
12688         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12689         (i386_pe_end_cold_function): New function.
12691 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
12693         PR fortran/84565
12694         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12695         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12697         PR c++/84704
12698         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12699         on tmp_var.
12700         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12701         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12703         PR middle-end/84723
12704         * multiple_target.c: Include tree-inline.h and intl.h.
12705         (expand_target_clones): Diagnose and fail if node->definition and
12706         !tree_versionable_function_p (node->decl).
12708 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
12710         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12711         sprint_ul.
12712         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12713         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12714         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12716 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
12718         PR target/84710
12719         * combine.c (try_combine): Use reg_or_subregno instead of handling
12720         just paradoxical SUBREGs and REGs.
12722 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
12724         * config/arc/arc.c (arc_finalize_pic): Remove function.
12725         (arc_must_save_register): We use single base PIC register, remove
12726         checks to save/restore the PIC register.
12727         (arc_expand_prologue): Likewise.
12728         * config/arc/arc-protos.h (arc_set_default_type_attributes):
12729         Remove.
12730         (arc_verify_short): Likewise.
12731         (arc_attr_type): Likewise.
12732         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12733         (walk_stores): Likewise.
12734         (arc_address_cost): Make it static.
12735         (arc_verify_short): Likewise.
12736         (branch_dest): Likewise.
12737         (arc_attr_type): Likewise.
12738         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12739         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12740         (arc_final_prescan_insn): Remove inserting the nops due to
12741         hardware hazards.  It is done in reorg step.
12742         (insn_length_variant_t): Remove.
12743         (insn_length_parameters_t): Likewise.
12744         (arc_insn_length_parameters): Likewise.
12745         (arc_get_insn_variants): Likewise.
12746         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12748 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
12750         PR inline-asm/84683
12751         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12752         assertion failure.
12754         PR tree-optimization/84687
12755         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12756         on new_node->decl.
12757         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12759 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12761         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12762         Rename to ppc_speculation_barrier.
12763         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12764         __builtin_ppc_speculation_barrier.
12766 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
12768         PR target/84700
12769         * combine.c (combine_simplify_rtx): Don't try to simplify if
12770         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12771         are equal to x.
12773 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
12775         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12776         to 32 bytes when compiling for POWER9.
12778 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
12780         PR target/84564
12781         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12782         regparm >= 3 with no arg reg available also for calls with
12783         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
12785         PR target/84524
12786         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12787         orig,vex.
12788         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
12790 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
12792         PR target/84264
12793         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12795 2018-03-05  Richard Biener  <rguenther@suse.de>
12797         PR tree-optimization/84486
12798         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12799         When inserting a __builtin_assume_aligned call set the LHS
12800         SSA name alignment info accordingly.
12802 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
12804         PR tree-optimization/84114
12805         * config/aarch64/aarch64.c (aarch64_reassociation_width)
12806         Avoid reassociation of FLOAT_MODE addition.
12808 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
12810         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12811         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12812         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12813         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12814         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12815         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12816         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12817         and -mwbnoinvd.
12818         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12819         __builtin_ia32_wbinvd): New builtins.
12820         (SPECIAL_ARGS2): New.
12821         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12822         (SPECIAL_ARGS2): New.
12823         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12824         (ix86_valid_target_attribute_inner_p): Ditto.
12825         (ix86_init_mmx_sse_builtins): Add special_args2.
12826         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12827         TARGET_WBNOINVD_P): New.
12828         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12829         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12830         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12831         * config/i386/immintrin.h (_wbinvd): New intrinsic.
12832         * config/i386/pconfigintrin.h: New file.
12833         * config/i386/wbnoinvdintrin.h: Ditto.
12834         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12835         wbnoinvdintrin.h.
12836         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12838 2018-03-05  Richard Biener  <rguenther@suse.de>
12840         PR tree-optimization/84670
12841         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12842         member.
12843         (BB_VISITED_WITH_VISITED_SUCCS): New define.
12844         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12845         (compute_antic_aux): Only assert the number of values in ANTIC_IN
12846         doesn't grow if all successors (recursively) were visited at least
12847         once.
12849 2018-03-05  Richard Biener  <rguenther@suse.de>
12851         PR tree-optimization/84650
12852         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12853         if executed in the loop pipeline.
12855 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
12857         * doc/configfiles.texi (Configuration Files): Move info about
12858         conditionalizing $target-protos.h to...
12859         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
12860         differs from $target-protos.h.
12862 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
12863             Chung-Ju Wu  <jasonwucj@gmail.com>
12865         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12866         * config/nds32/nds32-multiple.md (setmemsi): Define.
12867         * config/nds32/nds32-memory-manipulation.c
12868         (nds32_gen_dup_4_byte_to_word_value): New.
12869         (emit_setmem_word_loop): New.
12870         (emit_setmem_byte_loop): New.
12871         (nds32_expand_setmem_loop): New.
12872         (nds32_expand_setmem_loop_v3m): New.
12873         (nds32_expand_setmem_unroll): New.
12874         (nds32_expand_setmem): New.
12876 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12877             Chung-Ju Wu  <jasonwucj@gmail.com>
12879         * config/nds32/nds32-memory-manipulation.c
12880         (nds32_emit_load_store): New.
12881         (nds32_emit_post_inc_load_store): New.
12882         (nds32_emit_mem_move): New.
12883         (nds32_emit_mem_move_block): New.
12884         (nds32_expand_movmemsi_loop_unknown_size): New.
12885         (nds32_expand_movmemsi_loop_known_size): New.
12886         (nds32_expand_movmemsi_loop): New.
12887         (nds32_expand_movmemsi_unroll): New.
12888         (nds32_expand_movmemqi): Rename ...
12889         (nds32_expand_movmemsi): ... to this.
12890         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12891         (movmemsi): ... to this.
12892         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12893         (nds32_expand_movmemsi): ... to this.
12895 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12896             Monk Chiang  <sh.chiang04@gmail.com>
12897             Chung-Ju Wu  <jasonwucj@gmail.com>
12899         * config/nds32/nds32-protos.h
12900         (nds32_expand_load_multiple): New arguments.
12901         (nds32_expand_store_multiple): Ditto.
12902         (nds32_valid_multiple_load_store): Rename ...
12903         (nds32_valid_multiple_load_store_p): ... to this.
12904         * config/nds32/nds32-memory-manipulation.c
12905         (nds32_expand_load_multiple): Refine implementation.
12906         (nds32_expand_store_multiple): Ditto.
12907         * config/nds32/nds32-multiple.md
12908         (load_multiple): Update nds32_expand_load_multiple interface.
12909         (store_multiple): Update nds32_expand_store_multiple interface.
12910         * config/nds32/nds32-predicates.c
12911         (nds32_valid_multiple_load_store): Rename ...
12912         (nds32_valid_multiple_load_store_p): ... to this and refine
12913         implementation.
12914         * config/nds32/predicates.md
12915         (nds32_load_multiple_and_update_address_operation): New predicate.
12916         (nds32_store_multiple_and_update_address_operation): New predicate.
12918 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12919             Chung-Ju Wu  <jasonwucj@gmail.com>
12921         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12922         (combo): New attribute.
12923         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12925 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12927         * config/nds32/nds32.opt: Change -mcmodel= default value.
12929 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
12930             Monk Chiang  <sh.chiang04@gmail.com>
12931             Chung-Ju Wu  <jasonwucj@gmail.com>
12933         * config/nds32/constants.md (unspec_element): New enum.
12934         * config/nds32/constraints.md (Umw): New constraint.
12935         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12936         * config/nds32/nds32-intrinsic.md: Likewise.
12937         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12938         (nds32_valid_smw_lwm_base_p): New.
12939         (nds32_output_smw_single_word): New.
12940         (nds32_output_lmw_single_word): New.
12941         (nds32_expand_unaligned_load): New.
12942         (nds32_expand_unaligned_store): New.
12943         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12944         (nds32_output_smw_single_word): Declare.
12945         (nds32_output_lmw_single_word): Declare.
12946         (nds32_expand_unaligned_load): Declare.
12947         (nds32_expand_unaligned_store): Declare.
12948         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12949         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12950         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12951         NDS32_BUILTIN_UASTORE_DW.
12952         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12953         predicate.
12955 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
12956             Kito Cheng  <kito.cheng@gmail.com>
12957             Chung-Ju Wu  <jasonwucj@gmail.com>
12959         * config/nds32/nds32-intrinsic.c
12960         (nds32_expand_builtin_null_ftype_reg): Delete.
12961         (nds32_expand_builtin_reg_ftype_imm): Ditto.
12962         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12963         (nds32_read_argument): New.
12964         (nds32_legitimize_target): Ditto.
12965         (nds32_legitimize_argument): Ditto.
12966         (nds32_check_constant_argument): Ditto.
12967         (nds32_expand_unop_builtin): Ditto.
12968         (nds32_expand_unopimm_builtin): Ditto.
12969         (nds32_expand_binop_builtin): Ditto.
12970         (nds32_builtin_decl_impl): Ditto.
12971         (builtin_description): Ditto.
12972         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12973         (nds32_init_builtins_impl): Ditto.
12974         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12975         (nds32_builtin_decl): New.
12976         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12977         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12979 2018-03-02  Jeff Law  <law@redhat.com>
12981         * reorg.c (stop_search_p): Handle DEBUG_INSN.
12982         (redundant_insn, fill_simple_delay_slots): Likewise.
12983         (fill_slots_from_thread): Likewise.
12984         * resource.c (mark_referenced_resources): Likewise.
12985         (mark_set_resources, find_dead_or_set_registers): Likewise.
12987 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12989         * substring-locations.h (format_warning_va): Formatting fix for
12990         ATTRIBUTE_GCC_DIAG.
12991         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12992         argument.
12993         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12994         * substring-locations.c: Include intl.h.
12995         (format_warning_va): Turned into small wrapper around
12996         format_warning_n_va, renamed to ...
12997         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12998         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12999         use ngettext.
13000         (format_warning_at_substring_n): New function.
13001         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13002         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
13003         format_warning_at_substring with just a shorter name instead of
13004         const function pointer.
13005         (fmtwarn_n): New function.
13006         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13007         appropriate, get rid of all the fmtstr temporaries, move conditionals
13008         with G_() wrapped string literals directly into fmtwarn arguments,
13009         cast dir.len to (int), formatting fixes.
13011 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
13013         * doc/invoke.texi: Remove "Cilk Plus" references.
13015 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13016             Richard Biener  <rguenther@suse.de>
13018         PR ipa/84628
13019         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13020         for error or warning attributes if CALL_FROM_THUNK_P is set.
13021         Formatting fixes.
13023 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13025         PR target/56540
13026         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13027         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13029         PR target/56540
13030         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13031         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13033         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13034         instead of -1U in last predictors element's probability member.
13036 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
13038         PR ipa/83983
13039         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13040         arguments if they are comparable.
13042 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
13044         PR tree-optimization/84634
13045         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13046         masks and masked_loop_p with a single loop_masks, making sure it's
13047         null for bb vectorization.
13049 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
13051         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13052         (vect_analyze_data_ref_access): Use loop->safe_len rather than
13053         loop->force_vectorize to check whether there is no alias.
13055 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13057         PR target/84614
13058         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13059         prototypes.
13060         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13061         comments.
13062         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13063         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13064         instead of a loop around prev_real_insn.
13065         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13066         prev_real_insn.
13068         PR inline-asm/84625
13069         * config/i386/i386.c (ix86_print_operand): Use conditional
13070         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13071         zero vector.
13073 2018-03-02  Richard Biener  <rguenther@suse.de>
13075         PR tree-optimization/84427
13076         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13077         (bitmap_set_subtract_values): Rewrite to handle multiple
13078         exprs per value.
13079         (clean): Likewise.
13080         (prune_clobbered_mems): Likewise.
13081         (phi_translate): Take edge instead of pred/phiblock.
13082         (phi_translate_1): Likewise.
13083         (phi_translate_set): Likewise.  Insert all translated
13084         exprs for a value into the set, keeping possibly multiple
13085         expressions per value.
13086         (compute_antic_aux): Adjust for phi_translate changes.
13087         When intersecting union the expressions and prune those
13088         not in the final value set, keeping possibly multiple
13089         expressions per value.  Do not use value-insertion
13090         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13091         all expressions.  Add verification that the value-sets
13092         only shrink during iteration.
13093         (compute_partial_antic_aux): Adjust for the phi_translate changes.
13094         (do_pre_regular_insertion): Likewise.
13095         (do_pre_partial_partial_insertion): Likewise.
13097 2018-03-02  Richard Biener  <rguenther@suse.de>
13099         PR target/82005
13100         * config/darwin.c (saved_debug_info_level): New static global.
13101         (darwin_asm_lto_start): Disable debug info generation for LTO out.
13102         (darwin_asm_lto_end): Restore debug info generation settings.
13104 2018-03-01  Martin Liska  <mliska@suse.cz>
13106         PR sanitizer/82484
13107         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13108         volatile arguments.
13110 2018-03-01  Richard Biener  <rguenther@suse.de>
13112         PR debug/84645
13113         * dwarf2out.c (gen_variable_die): Properly handle late VLA
13114         type annotation with LTO when debug was disabled at compile-time.
13116 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
13118         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13119         XINT with INTVAL.
13120         (mips_final_postscan_insn): Likewise.
13122 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
13124         PR rtl-optimization/84528
13125         * alias.c (init_alias_target): Add commentary.
13126         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13127         a unique base value if the frame pointer is not eliminated
13128         to the stack pointer.
13130 2018-03-01  Tom de Vries  <tom@codesourcery.com>
13132         PR rtl-optimization/83327
13133         * lra-int.h (hard_regs_spilled_into): Declare.
13134         * lra.c (hard_regs_spilled_into): Define.
13135         (init_reg_info): Init hard_regs_spilled_into.
13136         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13137         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13138         (process_bb_lives): Handle hard_regs_spilled_into.
13139         (lra_create_live_ranges_1): Before doing liveness propagation, clear
13140         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13142 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
13144         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13145         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13146         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13147         * config/rs6000/aix72.h: New file.
13149 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
13151         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13152         instead of warning_at with conditional singular and plural messages
13153         where possible.
13155         PR target/52991
13156         * stor-layout.c (update_alignment_for_field): For
13157         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13158         && !DECL_PACKED (field), do the alignment update, just use
13159         only desired_align instead of MAX (type_align, desired_align)
13160         as the alignment.
13161         (place_field): Don't do known_align < desired_align handling
13162         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13163         is non-NULL, instead do it after rli->prev_field handling and
13164         only if not within a bitfield word.  For DECL_PACKED (field)
13165         use type_align of BITS_PER_UNIT.
13167 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
13169         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13170         superfluous parentheses and trailing spaces.
13172 2018-02-28  Richard Biener  <rguenther@suse.de>
13174         PR tree-optimization/84584
13175         * graphite-scop-detection.c (scop_detection::add_scop): Discard
13176         SCoPs with fake exit edge.
13178 2018-02-28  Martin Liska  <mliska@suse.cz>
13180         PR testsuite/84597
13181         * timevar.c (timer::print): Fix format to properly print 100%
13182         values.
13184 2018-02-28  Richard Biener  <rguenther@suse.de>
13186         PR middle-end/84607
13187         * genmatch.c (capture_info::walk_match): Do not mark
13188         captured expressions without operands as expr_p given
13189         they act more like predicates and should be subject to
13190         "lost tail" side-effect preserving.
13192 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
13194         PR rtl-optimization/81611
13195         * auto-inc-dec.c (attempt_change): Move dead note from
13196         mem_insn if it's the next use of regno
13197         (find_address): Take address use of reg holding
13198         non-incremented value.  Add parm to limit search to the named
13199         reg only.
13200         (merge_in_block): Attempt to use a mem insn that is the next
13201         use of the original regno.
13203 2018-02-27  Martin Sebor  <msebor@redhat.com>
13205         PR c++/83871
13206         * doc/invoke.texi (-Wmissing-attributes): New option.
13207         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13209 2018-02-27  Martin Sebor  <msebor@redhat.com>
13211         PR translation/84207
13212         * diagnostic-core.h (warning_n, error_n, inform_n): Change
13213         n argument to unsigned HOST_WIDE_INT.
13214         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13215         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
13216         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13217         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13219 2018-02-27  Richard Biener  <rguenther@suse.de>
13221         PR tree-optimization/84512
13222         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13223         Do not use the estimate returned from record_stmt_cost for
13224         the scalar iteration cost but sum properly using add_stmt_cost.
13226 2018-02-27  Richard Biener  <rguenther@suse.de>
13228         PR tree-optimization/84466
13229         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13230         Adjust last change to less strictly validate use operands.
13232 2018-02-27  Martin Liska  <mliska@suse.cz>
13234         PR gcov-profile/84548
13235         * gcov.c (process_file): Allow partial overlap and consider it
13236         also as group functions.
13237         (output_lines): Properly calculate range of lines for a group.
13239 2018-02-27  Martin Liska  <mliska@suse.cz>
13241         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
13242         'ggc' suffixes.  Change first column width.
13243         (timer::print): Fix formatting of the column.
13245 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
13247         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
13248         preserve inline entry blocks for the sake of debug inline
13249         entry point markers alone.
13250         (remove_unused_locals): Suggest in comments a better place to
13251         force the preservation of inline entry blocks that are
13252         otherwise unused, but do not preserve them.
13254 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13256         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
13258 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13260         PR target/84039
13261         * config/i386/constraints.md (Bs): Replace
13262         ix86_indirect_branch_register with
13263         TARGET_INDIRECT_BRANCH_REGISTER.
13264         (Bw): Likewise.
13265         * config/i386/i386.md (indirect_jump): Likewise.
13266         (tablejump): Likewise.
13267         (*sibcall_memory): Likewise.
13268         (*sibcall_value_memory): Likewise.
13269         Peepholes of indirect call and jump via memory: Likewise.
13270         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
13271         (*sibcall_value_GOT_32): Likewise.
13272         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13273         (GOT_memory_operand): Likewise.
13274         (call_insn_operand): Likewise.
13275         (sibcall_insn_operand): Likewise.
13276         (GOT32_symbol_operand): Likewise.
13277         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
13279 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
13281         PR rtl-optimization/83496
13282         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
13283         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
13284         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
13285         redundant insn, if any.
13286         (relax_delay_slots): Likewise.
13287         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
13289 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
13291         PR tree-optimization/83965
13292         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
13293         that grouped statements are part of a reduction chain.  Return
13294         true if the statement is not marked as a reduction itself but
13295         is part of a group.
13296         (vect_recog_dot_prod_pattern): Don't check whether the statement
13297         is part of a group here.
13298         (vect_recog_sad_pattern): Likewise.
13299         (vect_recog_widen_sum_pattern): Likewise.
13301 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
13303         PR debug/84545
13304         * final.c (rest_of_clean_state): Also look for calls inside sequences.
13306 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13308         PR target/84530
13309         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
13310         the bool argument.
13311         (ix86_output_indirect_function_return): New prototype.
13312         (ix86_split_simple_return_pop_internal): Likewise.
13313         * config/i386/i386.c (indirect_return_via_cx): New.
13314         (indirect_return_via_cx_bnd): Likewise.
13315         (indirect_thunk_name): Handle return va CX_REG.
13316         (output_indirect_thunk_function): Create alias for
13317         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13318         (ix86_output_indirect_jmp): Remove the bool argument.
13319         (ix86_output_indirect_function_return): New function.
13320         (ix86_split_simple_return_pop_internal): Likewise.
13321         * config/i386/i386.md (*indirect_jump): Don't pass false
13322         to ix86_output_indirect_jmp.
13323         (*tablejump_1): Likewise.
13324         (simple_return_pop_internal): Change it to define_insn_and_split.
13325         Call ix86_split_simple_return_pop_internal to split it for
13326         -mfunction-return=.
13327         (simple_return_indirect_internal): Call
13328         ix86_output_indirect_function_return instead of
13329         ix86_output_indirect_jmp.
13331 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
13333         PR bootstrap/84405
13334         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13335         memset and value initialization afterwards.
13337 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
13339         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13341 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13343         PR target/84521
13344         * common/config/aarch64/aarch64-common.c
13345         (aarch_option_optimization_table[]): Switch
13346         off fomit-frame-pointer
13348 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13349             Chung-Ju Wu  <jasonwucj@gmail.com>
13351         * config/nds32/nds32-multiple.md (load_multiple): Disallow
13352         volatile memory.
13353         (store_multiple): Ditto.
13355 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13357         * config.gcc: Add --with-cpu support for nds32 target.
13358         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13359         * config/nds32/nds32.opt: Add -mcpu= option.
13361 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
13363         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13364         isel=yes): Warn for these deprecated options.
13366 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
13368         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13369         ISA_2_5_MASKS_EMBEDDED.
13371 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
13373         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13374         p->max as pointers rather than using iterative_hash_expr.
13376 2018-02-23  Carl Love  <cel@us.ibm.com>
13378         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13379         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13380         BU_P8V_OVERLOAD_2.
13381         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13382         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13383         P8V_BUILTIN_VEC_VUNSIGNED2.
13385 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
13387         PR target/81572
13388         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13389         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13390         LRA_UNKNOWN_ALT.
13391         * lra-constraints.c (curr_insn_transform): Set up
13392         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
13393         LRA_UNKNOWN_ALT.
13394         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13395         * lra-eliminations.c (spill_pseudos): Ditto.
13396         (process_insn_for_elimination): Ditto.
13397         * lra-lives.c (reg_early_clobber_p): Use the new macros.
13398         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13399         LRA_NON_CLOBBERED_ALT.
13401 2018-02-22  Martin Sebor  <msebor@redhat.com>
13403         PR tree-optimization/84480
13404         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13405         to maybe_diag_stxncpy_trunc.  Call it.
13406         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13407         from gimple_fold_builtin_strcpy.  Print inlining stack.
13408         (handle_builtin_stxncpy): Print inlining stack.
13409         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13411 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
13413         PR target/84176
13414         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13415         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13416         and -fcheck-pointer-bounds are used together.
13417         (indirect_thunk_prefix): New enum.
13418         (indirect_thunk_need_prefix): New function.
13419         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
13420         "_nt" instead of "_bnd" for NOTRACK prefix.
13421         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13422         (output_indirect_thunk_function): Likewise.
13423         (): Likewise.
13424         (ix86_code_end): Update output_indirect_thunk_function calls.
13425         (ix86_output_indirect_branch_via_reg): Replace
13426         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13427         (ix86_output_indirect_branch_via_push): Likewise.
13428         (ix86_output_function_return): Likewise.
13429         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13430         incompatible with -fcf-protection=branch and
13431         -fcheck-pointer-bounds.
13433 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13435         PR target/83335
13436         * config/aarch64/aarch64.c (aarch64_print_address_internal):
13437         Change gcc_assert call to output_operand_lossage.
13439 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13441         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13443 2018-02-22  DJ Delorie  <dj@redhat.com>
13444             Sebastian Perta  <sebastian.perta@renesas.com>
13445             Oleg Endo  <olegendo@gcc.gnu.org>
13447         * config/rx/rx.c (rx_rtx_costs): New function.
13448         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13450 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13452         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13454 2018-02-22  Martin Liska  <mliska@suse.cz>
13456         PR driver/83193
13457         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13458         Add "native" as a possible value.
13460 2018-02-22  Martin Liska  <mliska@suse.cz>
13462         PR driver/83193
13463         * config/i386/i386.c (ix86_option_override_internal):
13464         Add "native" as a possible value for -march and -mtune.
13466 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
13468         PR target/84502
13469         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13470         to all type variants.
13472         PR tree-optimization/84503
13473         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13474         width as info->bitpos + info->bitsize - start.
13475         (merged_store_group::merge_overlapping): Simplify width computation.
13476         (check_no_overlap): New function.
13477         (imm_store_chain_info::try_coalesce_bswap): Compute expected
13478         start + width and last_order of the group, fail if check_no_overlap
13479         fails.
13480         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13481         to group if check_no_overlap fails.
13483 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
13485         * config/rs6000/altivec.md: Delete contraint arguments to
13486         define_expand, define_split, and define_peephole2, and in
13487         define_insn_and_split if always unused.
13488         * config/rs6000/darwin.md: Ditto.
13489         * config/rs6000/dfp.md: Ditto.
13490         * config/rs6000/rs6000.md: Ditto.
13491         * config/rs6000/sync.md: Ditto.
13492         * config/rs6000/vector.md: Ditto.
13493         * config/rs6000/vsx.md: Ditto.
13495 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
13497         * config/rs6000/altivec.md: Write output control strings as braced
13498         blocks instead of double-quoted strings.
13499         * config/rs6000/darwin.md: Ditto.
13500         * config/rs6000/rs6000.md: Ditto.
13501         * config/rs6000/vector.md: Ditto.
13502         * config/rs6000/vsx.md: Ditto.
13504 2018-02-21  Jason Merrill  <jason@redhat.com>
13506         PR c++/84314 - ICE with templates and fastcall attribute.
13507         * attribs.c (build_type_attribute_qual_variant): Remove assert.
13509 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
13511         * ipa-cp.c (determine_versionability): Fix comment typos.
13513 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
13515         PR c/84229
13516         * ipa-cp.c (determine_versionability): Do not version functions caling
13517         va_arg_pack.
13519 2018-02-21  Martin Liska  <mliska@suse.cz>
13521         PR driver/83193
13522         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13523         Add "native" as a possible value.
13524         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
13525         the macro when native cpu detection is available.
13527 2018-02-21  Martin Liska  <mliska@suse.cz>
13529         PR driver/83193
13530         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13531         Add "native" as a possible value.
13532         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13533         when native cpu detection is available.
13535 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
13536             Martin Sebor  <msebor@redhat.com>
13538         PR tree-optimization/84478
13539         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13540         false.
13541         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13542         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13543         support which is conservatively correct, for 2 only stay conservative
13544         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
13545         argument to the 2 argument get_range_strlen, adjust 6 arg
13546         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13547         false.
13548         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13549         (gimple_fold_builtin_strlen): Pass true as last argument to
13550         get_range_strlen.
13552 2018-02-20  Martin Sebor  <msebor@redhat.com>
13554         PR middle-end/84095
13555         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13556         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
13557         (builtin_memref::builtin_memref): Factor out parts into
13558         set_base_and_offset and call it.
13560 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
13562         PR middle-end/84406
13563         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13564         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13565         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
13566         search at the associated MODE_INT.
13568 2018-02-20  Jeff Law  <law@redhat.com>
13570         PR middle-end/82123
13571         PR tree-optimization/81592
13572         PR middle-end/79257
13573         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13574         for range data rather than using global data.
13575         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13576         range data rather than using global data.
13577         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13578         pass it to children as needed.
13579         (struct directive::fmtresult): Similarly.
13580         (struct directive::set_width): Similarly.
13581         (struct directive::set_precision): Similarly.
13582         (format_integer, format_directive, parse_directive): Similarly.
13583         (format_none): Accept unnamed vr_values parameter.
13584         (format_percent, format_floating, format_character): Similarly.
13585         (format_string, format_plain): Similarly.
13586         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13587         the EVRP range analyzer for range data rather than using global data.
13588         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13589         gimple-ssa-evrp-analyze.h
13590         (class sprintf_dom_walker): Add after_dom_children member function.
13591         Add evrp_range_analyzer member.
13592         (sprintf_dom_walker::before_dom_children): Call into the EVRP
13593         range analyzer as needed.
13594         (sprintf_dom_walker::after_dom_children): New member function.
13595         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13596         if not optimizing.
13597         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13598         (evrp_range_analyzer::pop_to_marker): Likewise.
13600 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
13602         PR tree-optimization/84419
13603         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13604         with the required type if its current type is compatible but
13605         different.
13607 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
13609         PR middle-end/82004
13610         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13611         after vectorization.
13613 2018-02-20  Martin Liska  <mliska@suse.cz>
13615         PR driver/83193
13616         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13617         possible values if we don't have a hint.
13619 2018-02-20  Martin Liska  <mliska@suse.cz>
13621         PR c/84310
13622         PR target/79747
13623         * final.c (shorten_branches): Build align_tab array with one
13624         more element.
13625         * opts.c (finish_options): Add alignment option limit check.
13626         (MAX_CODE_ALIGN): Likewise.
13627         (MAX_CODE_ALIGN_VALUE): Likewise.
13628         * doc/invoke.texi: Document maximum allowed option value for
13629         all -falign-* options.
13631 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
13633         PR target/84146
13634         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13635         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13636         * var-tracking.c (emit_note_insn_var_location): Remove all references
13637         to NOTE_INSN_CALL_ARG_LOCATION.
13638         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13639         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13640         Use copy_rtx_if_shared.
13641         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13642         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13643         (dwarf2out_var_location): Remove handling of
13644         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13645         on call_insn.
13646         * final.c (final_scan_insn): Remove all references to
13647         NOTE_INSN_CALL_ARG_LOCATION.
13648         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
13649         before dumping final insns.
13650         * except.c (emit_note_eh_region_end): Remove all references to
13651         NOTE_INSN_CALL_ARG_LOCATION.
13652         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13653         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13654         * config/arc/arc.c (hwloop_optimize): Likewise.
13655         * config/arm/arm.c (create_fix_barrier): Likewise.
13656         * config/s390/s390.c (s390_chunkify_start): Likewise.
13657         * config/sh/sh.c (find_barrier): Likewise.
13658         * config/i386/i386.c (rest_of_insert_endbranch,
13659         ix86_seh_fixup_eh_fallthru): Likewise.
13660         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13661         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13662         * config/frv/frv.c (frv_function_prologue): Likewise.
13663         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
13664         reg note.
13665         (note_outside_basic_block_p): Remove all references to
13666         NOTE_INSN_CALL_ARG_LOCATION.
13667         * gengtype.c (adjust_field_rtx_def): Likewise.
13668         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13669         Likewise.
13670         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13671         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13673         PR c++/84444
13674         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13675         is ADDR_EXPR.
13677         PR tree-optimization/84452
13678         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13679         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13680         is NULL.
13682 2018-02-19  Martin Liska  <mliska@suse.cz>
13684         PR sanitizer/82183
13685         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13687 2018-02-19  Martin Liska  <mliska@suse.cz>
13688             Richard Sandiford  <richard.sandiford@linaro.org>
13690         PR tree-optimization/82491
13691         * gimple-fold.c (get_base_constructor): Make earlier bail out
13692         to prevent ubsan.
13694 2018-02-19  Carl Love  <cel@us.ibm.com>
13696         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13697         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13698         BU_P8V_OVERLOAD_1.
13699         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13700         P8V_BUILTIN_VEC_NEG.
13702 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
13704         * config/rl78/rl78.md (movdf): New define expand.
13706 2018-02-19  Martin Liska  <mliska@suse.cz>
13708         PR other/80589
13709         * doc/invoke.texi: Fix typo.
13710         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13712 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
13714         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13715         handle rs6000_single_float and rs6000_double_float specially for
13716         e500 family CPUs.
13718 2018-02-16  Jeff Law  <law@redhat.com>
13720         * config/rx/rx.c (add_pop_cfi_notes): New function.;
13721         (pop_regs): Use it.
13723 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
13725         PR ipa/84425
13726         * ipa-inline.c (inline_small_functions): Fix a typo.
13728 2018-02-16  Nathan Sidwell  <nathan@acm.org>
13730         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13732 2018-02-16  Carl Love  <cel@us.ibm.com>
13734         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13735         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13736         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13737         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13738         expansion to P8V_BUILTIN_VEC_FLOAT2.
13740 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
13742         PR rtl-optimization/70023
13743         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13744         src_regno into account.
13746 2018-02-16  Carl Love  <cel@us.ibm.com>
13748         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13749         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13750         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13751         * config/rs6000/rs6000.c: Remove case statements for
13752         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13753         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13754         and P9V_BUILTIN_VEC_VINSERT4B.
13755         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13756         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13757         * config/rs6000/vsx.md:
13758         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13759         vec_insert4b.
13761 2018-02-16  Carl Love  <cel@us.ibm.com>
13763         * config/rs6000/altivec.h: Add builtin names vec_extract4b
13764         vec_insert4b.
13765         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13766         definitions.
13767         * config/rs6000/rs6000-c.c: Add the definitions for
13768         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13769         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13770         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13771         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
13772         definition for insert4b and define insn *insert3b_internal.
13773         * doc/extend.texi: Add documentation for vec_extract4b.
13775 2018-02-16  Nathan Sidwell  <nathan@acm.org>
13777         * doc/extend.texi (Backwards Compatibility): Mention friend
13778         injection.  Note for-scope is deprecated.
13779         * doc/invoke.texi (-ffriend-injection): Deprecate.
13781 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
13783         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13784         that moved to I2, also allow destinations that are a paradoxical
13785         subreg (instead of a normal reg).
13787 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
13789         PR target/83831
13790         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13791         to QImode.
13793 2018-02-16  Richard Biener  <rguenther@suse.de>
13795         PR tree-optimization/84037
13796         PR tree-optimization/84016
13797         PR target/82862
13798         * config/i386/i386.c (ix86_builtin_vectorization_cost):
13799         Adjust vec_construct for the fact we need additional higher latency
13800         128bit inserts for AVX256 and AVX512 vector builds.
13801         (ix86_add_stmt_cost): Scale vector construction cost for
13802         elementwise loads.
13804 2018-02-16  Richard Biener  <rguenther@suse.de>
13806         PR tree-optimization/84417
13807         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13808         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13809         (non_rewritable_lvalue_p): Likewise, use poly-ints.
13811 2018-02-16  Martin Liska  <mliska@suse.cz>
13813         PR sanitizer/84307
13814         * internal-fn.def (ASAN_CHECK): Set proper flags.
13815         (ASAN_MARK): Likewise.
13817 2018-02-16  Julia Koval  <julia.koval@intel.com>
13819         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13820         from PTA_CANNONLAKE.
13822 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
13824         PR target/84272
13825         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13826         Use ++iter rather than iter++ for std::list iterators.
13827         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
13828         defer deleting them until all nodes in the forest are processed.  Do
13829         free even leaf nodes.  Change to_process into auto_vec.
13831         PR bootstrap/84405
13832         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13833         * vec.h (vec_default_construct): Use memset instead of placement new
13834         if BROKEN_VALUE_INITIALIZATION is defined.
13835         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13836         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13837         is defined.
13839         PR rtl-optimization/83723
13840         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13841         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
13842         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
13843         recursive calls.
13844         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13845         callers.
13846         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13848 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
13850         PR rtl-optimization/81443
13851         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13852         from inner REGs to paradoxical SUBREGs.
13854 2018-02-16  Richard Biener  <rguenther@suse.de>
13856         PR tree-optimization/84399
13857         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13858         For operands we can analyze at their definition make sure we can
13859         analyze them at each use as well.
13861 2018-02-16  Richard Biener  <rguenther@suse.de>
13863         PR tree-optimization/84190
13864         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13865         volatile accesses if the decl isn't volatile.
13867 2018-02-15  Jason Merrill  <jason@redhat.com>
13869         PR c++/84314 - ICE with templates and fastcall attribute.
13870         * attribs.c (build_type_attribute_qual_variant): Don't clobber
13871         TYPE_CANONICAL on an existing type.
13873 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
13875         PR tree-optimization/84383
13876         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13877         dstoff nor call operand_equal_p if dstbase is NULL.
13879         PR tree-optimization/84334
13880         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13881         also a CONSTANT_CLASS_P, punt.
13883 2018-02-14  Jim Wilson  <jimw@sifive.com>
13885         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13886         first SMALL_OPERAND check.  New local min_second_step.  Move assert
13887         to where locals are set.  Add TARGET_RVC support.
13888         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13890 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
13892         * doc/invoke.texi: Correct -Wformat-overflow code sample.
13894 2018-02-14  Martin Sebor  <msebor@redhat.com>
13896         PR tree-optimization/83698
13897         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13898         arrays constrain the offset range to their bounds.
13899         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13900         (builtin_access::overlap): Avoid setting the size of overlap if it's
13901         already been set.
13902         (maybe_diag_overlap): Also consider arrays when deciding what values
13903         of offsets to include in diagnostics.
13905 2018-02-14  Martin Sebor  <msebor@redhat.com>
13907         PR c/84108
13908         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13909         that correspond to the kind of a declaration.
13911 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
13913         PR target/83984
13914         * config/pa/pa.md: Load address of PIC label using the linkage table
13915         if the label is nonlocal.
13917 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13919         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13920         warning message if user requests -maltivec=be.
13921         * doc/invoke.texi: Document deprecation of -maltivec=be.
13923 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
13925         PR target/84220
13926         * config/rs6000/rs6000-c.c: Update definitions for
13927         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13928         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13930 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13932         PR target/84239
13933         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13934         add _get_ssp intrinsics. Remove argument from
13935         __builtin_ia32_rdssp[d|q].
13936         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13937         * config/i386/i386-builtin.def: Remove argument from
13938         __builtin_ia32_rdssp[d|q].
13939         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13940         ix86_expand_special_args_builtin for _rdssp[d|q].
13941         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13942         Clear register before usage.
13943         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13944         Add documentation for new _get_ssp and _inc_ssp intrinsics.
13946 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
13948         PR tree-optimization/84357
13949         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13950         operand 1 of an ARRAY_REF too.
13952 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
13954         PR target/83831
13955         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13956         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13957         declarations.
13958         (set_of_reg): New struct.
13959         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13960         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13961         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13962         functions.
13963         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13964         Split into bitclr, bitset, bitinvert patterns if appropriate.
13965         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13966         use rx_fuse_in_memory_bitop.
13967         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13968         to named insn, correct maximum insn length.
13970 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
13972         PR target/79242
13973         * machmode.def: Define a complex mode for PARTIAL_INT.
13974         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13975         MODE_PARTIAL_INT.
13976         * doc/rtl.texi: Document CSPImode.
13977         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13978         handling.
13979         (msp430_hard_regno_nregs_with_padding): Likewise.
13981 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
13983         PR target/84279
13984         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13986 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
13988         PR rtl-optimization/84169
13989         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
13990         we generated a parallel as new i3 and we split that to new i2 and i3
13991         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
13992         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
13993         those to i2, not i1.  Partially rewrite this scan code.
13995 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
13997         PR c/82210
13998         * stor-layout.c (place_field): For variable length fields, adjust
13999         offset_align afterwards not just based on the field's alignment,
14000         but also on the size.
14002         PR middle-end/84309
14003         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14004         of exps and logs in the use_exp2 case.
14006 2018-02-13  Jeff Law  <law@redhat.com>
14008         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14009         entry for "vector".
14011         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14012         ARGS as unused.
14014 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
14016         PR debug/84342
14017         PR debug/84319
14018         * common.opt (gas-loc-support, gas-locview-support): New.
14019         (ginline-points, ginternal-reset-location-views): New.
14020         * doc/invoke.texi: Document them.  Use @itemx where intended.
14021         (gvariable-location-views): Adjust.
14022         * target.def (reset_location_view): New.
14023         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14024         (TARGET_RESET_LOCATION_VIEW): New.
14025         * doc/tm.texi: Rebuilt.
14026         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14027         (dwarf2out_default_as_locview_support): New.
14028         (output_asm_line_debug_info): Use option variables.
14029         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14030         (output_loc_list): Likewise.
14031         (add_high_low_attributes): Check option variables.
14032         Don't output entry view attribute in strict mode.
14033         (gen_inlined_subroutine_die): Check option variables.
14034         (dwarf2out_inline_entry): Likewise.
14035         (init_sections_and_labels): Likewise.
14036         (dwarf2out_early_finish): Likewise.
14037         (maybe_reset_location_view): New, from...
14038         (dwarf2out_var_location): ... here.  Call it.
14039         * debug.h (dwarf2out_default_as_loc_support): Declare.
14040         (dwarf2out_default_as_locview_support): Declare.
14041         * hooks.c (hook_int_rtx_insn_0): New.
14042         * hooks.h (hook_int_rtx_insn_0): Declare.
14043         * toplev.c (process_options): Take -gas-loc-support and
14044         -gas-locview-support from dwarf2out.  Enable
14045         -gvariable-location-views by default only with locview
14046         assembler support.  Enable -ginternal-reset-location-views by
14047         default only if the target defines the corresponding hook.
14048         Enable -ginline-points by default if location views are
14049         enabled; force it disabled if statement frontiers are
14050         disabled.
14051         * tree-inline.c (expand_call_inline): Check option variables.
14052         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14054 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
14056         PR tree-optimization/84321
14057         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14058         handling.  Also check whether the anti-range contains any values
14059         that satisfy the mask; switch to a VR_RANGE if not.
14061 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
14063         PR sanitizer/84340
14064         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14066 2018-02-13  Martin Jambor  <mjambor@suse.cz>
14068         PR c++/83990
14069         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14070         of call statements, also set location of a load to a temporary.
14072 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
14074         * config/rl78/rl78.c (add_vector_labels): New function.
14075         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14076         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14077         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14078         which checks that no arguments are passed.
14079         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14080         * doc/extend.texi: Documentation for the new attribute.
14082 2018-02-13  Andreas Schwab  <schwab@suse.de>
14084         * config/riscv/linux.h (CPP_SPEC): Define.
14086 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
14088         PR target/84335
14089         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14090         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14091         OPTION_MASK_ISA_AES as first argument to def_builtin_const
14092         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14093         instead of OPTION_MASK_ISA_PCLMUL as first argument to
14094         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14095         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14096         temporarily for AES and PCLMUL builtins.
14098         PR tree-optimization/84339
14099         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14100         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14101         Formatting fixes.
14103         PR middle-end/84309
14104         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14105         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14106         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14107         inline function.
14108         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14109         inline function.
14110         * omp-simd-clone.h: New file.
14111         * omp-simd-clone.c: Include omp-simd-clone.h.
14112         (expand_simd_clones): No longer static.
14113         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14114         cgraph.h and omp-simd-clone.h.
14115         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14116         (vect_recog_widen_shift_pattern): Formatting fix.
14117         (vect_pattern_recog_1): Don't check optab for calls.
14119         PR target/84336
14120         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14121         operands[2] into a REG before using gen_lowpart on it.
14123 2018-02-12  Jeff Law  <law@redhat.com>
14125         PR target/83760
14126         * config/sh/sh.c (find_barrier): Consider a sibling call
14127         a barrier as well.
14129         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14130         successfully back substituting a reg.
14132 2018-02-12  Richard Biener  <rguenther@suse.de>
14134         PR tree-optimization/84037
14135         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14136         parameter, move visited init to caller.
14137         (vect_slp_analyze_operations): Separate cost from validity
14138         check, initialize visited once for all instances.
14139         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14140         for all instances.
14141         * tree-vect-stmts.c (vect_model_simple_cost): Make early
14142         out an assert.
14143         (vect_model_promotion_demotion_cost): Likewise.
14144         (vectorizable_bswap): Guard cost modeling with !slp_node
14145         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14146         SLP stmts.
14147         (vectorizable_call): Likewise.
14148         (vectorizable_conversion): Likewise.
14149         (vectorizable_assignment): Likewise.
14150         (vectorizable_shift): Likewise.
14151         (vectorizable_operation): Likewise.
14152         (vectorizable_store): Likewise.
14153         (vectorizable_load): Likewise.
14154         (vectorizable_condition): Likewise.
14155         (vectorizable_comparison): Likewise.
14157 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
14159         PR sanitizer/84307
14160         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14161         (ASAN_MARK): Fix fnspec to account for return value, change pointer
14162         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14164 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
14166         PR middle-end/83665
14167         * params.def (inline-min-speedup): Increase from 8 to 15.
14168         (max-inline-insns-auto): Decrease from 40 to 30.
14169         * ipa-split.c (consider_split): Add some buffer for function to
14170         be considered inlining candidate.
14171         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14172         default values.
14174 2018-02-12  Richard Biener  <rguenther@suse.de>
14176         PR tree-optimization/84037
14177         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14178         matched stmts if we cannot swap the non-matched ones.
14180 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
14182         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14183         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14184         _mm_maskz_scalef_round_ss): New intrinsics.
14185         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14186         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14187         __builtin_ia32_scalefss_round): Remove.
14188         (__builtin_ia32_scalefsd_mask_round,
14189         __builtin_ia32_scalefss_mask_round): New intrinsics.
14190         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14191         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14192         ((match_operand:VF_128 2 "<round_nimm_predicate>"
14193         "<round_constraint>")): Changed to ...
14194         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14195         "<round_scalar_constraint>")): ... this.
14196         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14197         %0, %1, %2<round_op3>}"): Changed to ...
14198         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14199         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14200         %2<round_scalar_mask_op3>}"): ... this.
14201         * config/i386/subst.md (round_scalar_nimm_predicate): New.
14203 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
14205         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14206         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14207         (_mm_maskz_sqrt_round_ss): New intrinsics.
14208         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14209         (__builtin_ia32_sqrtsd_mask_round)
14210         (__builtin_ia32_sqrtss_mask_round): New builtins.
14211         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14212         (__builtin_ia32_sqrtss_round): Remove.
14213         (__builtin_ia32_sqrtsd_mask_round)
14214         (__builtin_ia32_sqrtss_mask_round): New builtins.
14215         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14216         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14217         ((match_operand:VF_128 1 "vector_operand"
14218         "xBm,<round_constraint>")): Changed to ...
14219         ((match_operand:VF_128 1 "vector_operand"
14220         "xBm,<round_scalar_constraint>")): ... this.
14221         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14222         %0, %2, %<iptr>1<round_op3>}): Changed to ...
14223         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14224         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14225         %<iptr>1<round_scalar_mask_op3>}): ... this.
14226         ((set_attr "prefix" "<round_prefix>")): Changed to ...
14227         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14229 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
14231         PR target/84266
14232         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14233         Cast vec_cmpeq result to correct type.
14234         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
14235         Cast vec_cmpgt result to correct type.
14237 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
14239         * final.c (final_scan_insn_1): Renamed from...
14240         (final_scan_insn): ... this.  New wrapper, to recover
14241         seen from the outermost call in recursive ones.
14242         * config/sparc/sparc.c (output_return): Drop seen from call.
14243         (output_sibcall): Likewise.
14244         * config/visium/visium.c (output_branch): Likewise.
14246 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
14248         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
14249         function label.
14251 2018-02-10  Alan Modra  <amodra@gmail.com>
14253         PR target/84300
14254         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
14255         Specify LR as an input.
14257 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
14259         PR sanitizer/83987
14260         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
14261         remove_member_access_dummy_vars): New functions.
14262         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
14263         lower_omp_1, execute_lower_omp): Use them.
14265         PR rtl-optimization/84308
14266         * shrink-wrap.c (spread_components): Release todo vector.
14268 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
14270         PR rtl-optimization/57193
14271         * ira-color.c (struct allocno_color_data): Add member
14272         conflict_allocno_hard_prefs.
14273         (update_conflict_allocno_hard_prefs): New.
14274         (bucket_allocno_compare_func): Add a preference based on
14275         conflict_allocno_hard_prefs.
14276         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
14277         (color_allocnos): Remove a dead code.  Initiate
14278         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
14280 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14282         PR target/84226
14283         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
14284         constraint from =wa to wa.  Avoid a subreg on the output operand,
14285         instead use a pseudo and subreg it in a move.
14286         (p9_xxbrd_<mode>): Changed to ...
14287         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
14288         (p9_xxbrd_v2df): New expander.
14289         (p9_xxbrw_<mode>): Changed to ...
14290         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
14291         (p9_xxbrw_v4sf): New expander.
14293 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
14295         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
14297 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
14299         PR target/83926
14300         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
14301         multiply in 32-bit mode.
14302         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
14303         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
14304         mode.
14306 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
14308         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
14309         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
14310         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
14311         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
14313 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
14315         PR lto/84213
14316         * dwarf2out.c (is_trivial_indirect_ref): New function.
14317         (dwarf2out_late_global_decl): Do not generate a location
14318         attribute for variables that have a non-trivial DECL_VALUE_EXPR
14319         and that are not defined in the current unit.
14321 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14323         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14324         instead of a libcall for UNORDERED.
14326 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
14328         PR target/82641
14329         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14330         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14332 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14334         PR target/PR84295
14335         * config/s390/s390.c (s390_set_current_function): Invoke
14336         s390_indirect_branch_settings also if fndecl didn't change.
14338 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14340         * config/rs6000/rs6000.md (blockage): Set length to zero.
14342 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14344         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14346 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14348         PR sanitizer/84285
14349         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14350         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14351         -static-lib*san.
14353         PR debug/84252
14354         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14355         PARALLEL incoming that failed vt_get_decl_and_offset check.
14357         PR middle-end/84237
14358         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14359         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14360         TREE_READONLY bit.
14361         (get_variable_section): For decls in named .bss* sections pass true as
14362         second argument to bss_initializer_p.
14364 2018-02-09  Marek Polacek  <polacek@redhat.com>
14365             Jakub Jelinek  <jakub@redhat.com>
14367         PR c++/83659
14368         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14369         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
14370         Sync some changes from cxx_fold_indirect_ref.
14372 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14374         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14375         markers.
14376         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14377         (BLOCK_INLINE_ENTRY_LABEL): New.
14378         (dwarf2out_var_location): Disregard inline entry markers.
14379         (inline_entry_data): New struct.
14380         (inline_entry_data_hasher): New hashtable type.
14381         (inline_entry_data_hasher::hash): New.
14382         (inline_entry_data_hasher::equal): New.
14383         (inline_entry_data_table): New variable.
14384         (add_high_low_attributes): Add DW_AT_entry_pc and
14385         DW_AT_GNU_entry_view attributes if a pending entry is found
14386         in inline_entry_data_table.  Add old entry_pc attribute only
14387         if debug nonbinding markers are disabled.
14388         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14389         markers are enabled.
14390         (block_within_block_p, dwarf2out_inline_entry): New.
14391         (dwarf2out_finish): Check that no entries remained in
14392         inline_entry_data_table.
14393         * final.c (reemit_insn_block_notes): Handle inline entry notes.
14394         (final_scan_insn, notice_source_line): Likewise.
14395         (rest_of_clean_state): Skip inline entry markers.
14396         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14397         markers.
14398         * gimple.c (gimple_build_debug_inline_entry): New.
14399         * gimple.h (enum gimple_debug_subcode): Add
14400         GIMPLE_DEBUG_INLINE_ENTRY.
14401         (gimple_build_debug_inline_entry): Declare.
14402         (gimple_debug_inline_entry_p): New.
14403         (gimple_debug_nonbind_marker_p): Adjust.
14404         * insn-notes.def (INLINE_ENTRY): New.
14405         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14406         inline entry marker notes.
14407         (print_insn): Likewise.
14408         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14409         (INSN_DEBUG_MARKER_KIND): Likewise.
14410         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14411         * tree-inline.c (expand_call_inline): Build and insert
14412         debug_inline_entry stmt.
14413         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14414         inline entry blocks early, if nonbind markers are enabled.
14415         (dump_scope_block): Dump fragment info.
14416         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14417         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14418         (gimple_build_debug_inline_entry): New.
14419         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14420         Enable/disable inline entry points too.
14421         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14422         (DEBUG_INSN): Describe inline entry markers.
14424         * common.opt (gvariable-location-views): New.
14425         (gvariable-location-views=incompat5): New.
14426         * config.in: Rebuilt.
14427         * configure: Rebuilt.
14428         * configure.ac: Test assembler for view support.
14429         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14430         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14431         * dwarf2out.c (var_loc_view): New typedef.
14432         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14433         (dwarf2out_locviews_in_attribute): New.
14434         (dwarf2out_locviews_in_loclist): New.
14435         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14436         (enum dw_line_info_opcode): Add LI_adv_address.
14437         (struct dw_line_info_table): Add view.
14438         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14439         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14440         (zero_view_p): New variable.
14441         (ZERO_VIEW_P): New macro.
14442         (output_asm_line_debug_info): New.
14443         (struct var_loc_node): Add view.
14444         (add_AT_view_list, AT_loc_list): New.
14445         (add_var_loc_to_decl): Add view param.  Test it against last.
14446         (new_loc_list): Add view params.  Record them.
14447         (AT_loc_list_ptr): Handle loc and view lists.
14448         (view_list_to_loc_list_val_node): New.
14449         (print_dw_val): Handle dw_val_class_view_list.
14450         (size_of_die): Likewise.
14451         (value_format): Likewise.
14452         (loc_list_has_views): New.
14453         (gen_llsym): Set vl_symbol too.
14454         (maybe_gen_llsym, skip_loc_list_entry): New.
14455         (dwarf2out_maybe_output_loclist_view_pair): New.
14456         (output_loc_list): Output view list or entries too.
14457         (output_view_list_offset): New.
14458         (output_die): Handle dw_val_class_view_list.
14459         (output_dwarf_version): New.
14460         (output_compilation_unit_header): Use it.
14461         (output_skeleton_debug_sections): Likewise.
14462         (output_rnglists, output_line_info): Likewise.
14463         (output_pubnames, output_aranges): Update version comments.
14464         (output_one_line_info_table): Output view numbers in asm comments.
14465         (dw_loc_list): Determine current endview, pass it to new_loc_list.
14466         Call maybe_gen_llsym.
14467         (loc_list_from_tree_1): Adjust.
14468         (add_AT_location_description): Create view list attribute if
14469         needed, check it's absent otherwise.
14470         (convert_cfa_to_fb_loc_list): Adjust.
14471         (maybe_emit_file): Call output_asm_line_debug_info for test.
14472         (dwarf2out_var_location): Reset views as needed.  Precompute
14473         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
14474         attribute.  Set view.
14475         (new_line_info_table): Reset next view.
14476         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14477         (dwarf2out_source_line): Likewise.  Output view resets and labels to
14478         the assembler, or select appropriate line info opcodes.
14479         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14480         (optimize_string_length): Catch it.  Adjust.
14481         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
14482         dw_val_class_view_list, and remove it if no longer needed.
14483         (hash_loc_list): Hash view numbers.
14484         (loc_list_hasher::equal): Compare them.
14485         (optimize_location_lists): Check whether a view list symbol is
14486         needed, and whether the locview attribute is present, and
14487         whether they match.  Remove the locview attribute if no longer
14488         needed.
14489         (index_location_lists): Call skip_loc_list_entry for test.
14490         (dwarf2out_finish): Call output_asm_line_debug_info for test.
14491         Use output_dwarf_version.
14492         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14493         (struct dw_val_node): Add val_view_list.
14494         * final.c (SEEN_NEXT_VIEW): New.
14495         (set_next_view_needed): New.
14496         (clear_next_view_needed): New.
14497         (maybe_output_next_view): New.
14498         (final_start_function): Rename to...
14499         (final_start_function_1): ... this.  Take pointer to FIRST,
14500         add SEEN parameter.  Emit param bindings in the initial view.
14501         (final_start_function): Reintroduce SEEN-less interface.
14502         (final): Rename to...
14503         (final_1): ... this.  Take SEEN parameter.  Output final pending
14504         next view at the end.
14505         (final): Reintroduce seen-less interface.
14506         (final_scan_insn): Output pending next view before switching
14507         sections or ending a block.  Mark the next view as needed when
14508         outputting variable locations.  Notify debug backend of section
14509         changes, and of location view changes.
14510         (rest_of_handle_final): Adjust.
14511         * toplev.c (process_options): Autodetect value for debug variable
14512         location views option.  Warn on incompat5 without -gdwarf-5.
14513         * doc/invoke.texi (gvariable-location-views): New.
14514         (gvariable-location-views=incompat5): New.
14515         (gno-variable-location-views): New.
14517 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
14519         PR tree-optimization/84136
14520         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14521         that the result of find_edge is non-NULL.
14523 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
14525         PR target/83008
14526         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14527         storing integer register in SImode.  Fix cost of 256 and 512
14528         byte aligned SSE register store.
14530 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
14532         * config/i386/i386.c (ix86_multiplication_cost): Fix
14533         multiplication cost for TARGET_AVX512DQ.
14535 2018-02-08  Marek Polacek  <polacek@redhat.com>
14537         PR tree-optimization/84238
14538         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14539         get_range_strlen.
14541 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14543         PR tree-optimization/84265
14544         * tree-vect-stmts.c (vectorizable_store): Don't treat
14545         VMAT_CONTIGUOUS accesses as grouped.
14546         (vectorizable_load): Likewise.
14548 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14550         PR tree-optimization/81635
14551         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14552         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14553         (test_round_for_mask): New functions.
14554         (wide_int_cc_tests): Call test_round_for_mask.
14555         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14556         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14557         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14558         range returned by get_range_info.
14560 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
14562         PR ipa/81360
14563         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14564         * symtab.c: Include builtins.h
14565         (symtab_node::output_to_lto_symbol_table_p): Move here
14566         from lto-streamer-out.c:output_symbol_p.
14567         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14568         (output_symbol_p): Move all logic to symtab.c
14569         (produce_symtab): Update.
14571 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14573         * config/s390/s390-opts.h (enum indirect_branch): Define.
14574         * config/s390/s390-protos.h (s390_return_addr_from_memory)
14575         (s390_indirect_branch_via_thunk)
14576         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14577         (enum s390_indirect_branch_type): Define.
14578         * config/s390/s390.c (struct s390_frame_layout, struct
14579         machine_function): Remove.
14580         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14581         (indirect_branch_table_label_no, indirect_branch_table_name):
14582         Define variables.
14583         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14584         (enum s390_indirect_branch_option): Define.
14585         (s390_return_addr_from_memory): New function.
14586         (s390_handle_string_attribute): New function.
14587         (s390_attribute_table): Add new attribute handler.
14588         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14589         (s390_indirect_branch_via_thunk): New function.
14590         (s390_indirect_branch_via_inline_thunk): New function.
14591         (s390_function_ok_for_sibcall): When jumping via thunk disallow
14592         sibling call optimization for non z10 compiles.
14593         (s390_emit_call): Force indirect branch target to be a single
14594         register.  Add r1 clobber for non-z10 compiles.
14595         (s390_emit_epilogue): Emit return jump via return_use expander.
14596         (s390_reorg): Handle JUMP_INSNs as execute targets.
14597         (s390_option_override_internal): Perform validity checks for the
14598         new command line options.
14599         (s390_indirect_branch_attrvalue): New function.
14600         (s390_indirect_branch_settings): New function.
14601         (s390_set_current_function): Invoke s390_indirect_branch_settings.
14602         (s390_output_indirect_thunk_function):  New function.
14603         (s390_code_end): Implement target hook.
14604         (s390_case_values_threshold): Implement target hook.
14605         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14606         macros.
14607         * config/s390/s390.h (struct s390_frame_layout)
14608         (struct machine_function): Move here from s390.c.
14609         (TARGET_INDIRECT_BRANCH_NOBP_RET)
14610         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14611         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14612         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14613         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14614         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14615         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14616         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14617         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14618         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14619         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14620         (mnemonic attribute): Add values which aren't recognized
14621         automatically.
14622         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14623         pattern for branch conversion.  Fix mnemonic attribute.
14624         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14625         indirect branch via thunk if requested.
14626         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14627         ("*indirect_jump"): Disable for branch conversion using out of
14628         line thunks.
14629         ("indirect_jump_via_thunk<mode>_z10")
14630         ("indirect_jump_via_thunk<mode>")
14631         ("indirect_jump_via_inlinethunk<mode>_z10")
14632         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14633         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14634         ("casesi_jump_via_inlinethunk<mode>_z10")
14635         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14636         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14637         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14638         ("*indirect2_jump"): Disable for branch conversion.
14639         ("casesi_jump"): Turn into expander and expand patterns for branch
14640         conversion.
14641         ("return_use"): New expander.
14642         ("*return"): Emit return via thunk and rename it to ...
14643         ("*return<mode>"): ... this one.
14644         * config/s390/s390.opt: Add new options and and enum for the
14645         option values.
14647 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14649         * lra-constraints.c (match_reload): Unconditionally use
14650         gen_lowpart_SUBREG, rather than selecting between that
14651         and equivalent gen_rtx_SUBREG code.
14653 2018-02-08  Richard Biener  <rguenther@suse.de>
14655         PR tree-optimization/84233
14656         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14657         changed flag instead of boguously re-using phi_inserted.
14659 2018-02-08  Martin Jambor  <mjambor@suse.cz>
14661         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14662         static local variables.
14664 2018-02-08  Richard Biener  <rguenther@suse.de>
14666         PR tree-optimization/84278
14667         * tree-vect-stmts.c (vectorizable_store): When looking for
14668         smaller vector types to perform grouped strided loads/stores
14669         make sure the mode is supported by the target.
14670         (vectorizable_load): Likewise.
14672 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
14674         * config/aarch64/aarch64.c (aarch64_components_for_bb):
14675         Increase LDP/STP opportunities by adding adjacent callee-saves.
14677 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
14679         PR rtl-optimization/84068
14680         PR rtl-optimization/83459
14681         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14683 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
14685         PR tree-optimization/84224
14686         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14687         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14688         non-zero arguments.
14690 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
14692         PR target/84113
14693         * config/rs6000/altivec.md (*restore_world): Remove LR use.
14694         * config/rs6000/predicates.md (restore_world_operation): Adjust op
14695         count, remove one USE.
14697 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
14699         * doc/install.texi (Configuration): Document the
14700         --with-long-double-format={ibm,ieee} PowerPC configuration
14701         options.
14703         PR target/84154
14704         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14705         Convert from define_expand to be define_insn_and_split.  Rework
14706         float/double/_Float128 conversions to QI/HI/SImode to work with
14707         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
14708         conversions to QI/HImode types did a store and then a load to
14709         truncate the value.  For conversions to VSX registers, don't split
14710         the insn, instead emit the code directly.  Use the code iterator
14711         any_fix to combine signed and unsigned conversions.
14712         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14713         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14714         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14715         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14716         (fix_<mode>di2_hw): Likewise.
14717         (fixuns_<mode>di2_hw): Likewise.
14718         (fix_<mode>si2_hw): Likewise.
14719         (fixuns_<mode>si2_hw): Likewise.
14720         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14721         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14722         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14723         fix<uns>_trunc<SFDF:mode>si2_p8.
14724         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14725         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14726         (fix<uns>_<mode>_mem): Likewise.
14727         (fctiw<u>z_<mode>_mem): Likewise.
14728         (fix<uns>_<mode>_mem): Likewise.
14729         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14730         the register allocator from doing a direct move to the GPRs to do
14731         a store, and instead use the ISA 3.0 store byte/half-word from
14732         vector register instruction.  For IEEE 128-bit floating point,
14733         also optimize stores of 32-bit ints.
14734         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14736 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
14738         * genextract.c (push_pathstr_operand): New function to support
14739         [a-zA-Z].
14740         (walk_rtx): Call push_pathstr_operand.
14741         (print_path): Support [a-zA-Z].
14743 2018-02-07  Richard Biener  <rguenther@suse.de>
14745         PR tree-optimization/84037
14746         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14747         (cse_and_gimplify_to_preheader): Declare.
14748         (vect_get_place_in_interleaving_chain): Likewise.
14749         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14750         ivexpr_map.
14751         (_loop_vec_info::~_loop_vec_info): Delete it.
14752         (cse_and_gimplify_to_preheader): New function.
14753         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14754         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14755         (vectorizable_load): Likewise.  For grouped stores always base
14756         the IV on the first element.
14757         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14758         condition before gimplifying.
14760 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
14762         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14763         *DIV_EXPR and *MOD_EXPR.
14765 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
14767         PR target/84248
14768         * config/i386/i386.c (ix86_option_override_internal): Mask out
14769         the CF_SET bit when checking -fcf-protection.
14771 2018-02-07  Tom de Vries  <tom@codesourcery.com>
14773         PR libgomp/84217
14774         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14775         enough.
14777 2018-02-07  Richard Biener  <rguenther@suse.de>
14779         PR tree-optimization/84204
14780         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14781         this place.
14783         PR tree-optimization/84205
14784         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14785         special-case isl_ast_op_zdiv_r.
14787         PR tree-optimization/84223
14788         * graphite-scop-detection.c (gather_bbs::before_dom_children):
14789         Only add conditions from within the region.
14790         (gather_bbs::after_dom_children): Adjust.
14792 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
14794         PR target/84209
14795         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14796         * config/avr/avr.md: Only post-reload split REG-REG moves if
14797         either register is GENERAL_REG_P.
14799 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
14801         PR tree-optimization/84235
14802         * tree-ssa-scopedtables.c
14803         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14804         if the subtraction is performed in floating point type where NaNs are
14805         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14806         build 1.  Formatting fix.
14808 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
14810         PR target/84146
14811         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14812         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14813         and skip it regardless of bb boundaries.  Use CALL_P macro,
14814         don't test INSN_P (insn) together with CALL_P or JUMP_P check
14815         unnecessarily, formatting fix.
14817 2018-02-06  Michael Collison  <michael.collison@arm.com>
14819         * config/arm/thumb2.md:
14820         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14821         (*thumb_mov_notscc): Ditto.
14823 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
14825         PR target/84154
14826         * config/rs6000/rs6000.md (su code attribute): Use "u" for
14827         unsigned_fix, not "s".
14829 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14831         * configure.ac (gcc_fn_eh_frame_ro): New function.
14832         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14833         correct .eh_frame permissions.
14834         * configure: Regenerate.
14836 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
14838         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14839         irrelevant options.
14841 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14843         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14844         Display warning message for -mno-speculate-indirect-jumps.
14846 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
14848         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14849         Undocumented.
14850         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14852 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
14854         PR tree-optimization/84225
14855         * tree-eh.c (find_trapping_overflow): Only call
14856         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14858 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14860         PR target/84145
14861         * config/i386/i386.c: Reimplement the check of possible options
14862         -mibt/-mshstk conbination. Change error messages.
14863         * doc/invoke.texi: Fix a typo: remove extra '='.
14865 2018-02-06  Marek Polacek  <polacek@redhat.com>
14867         PR tree-optimization/84228
14868         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14870 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
14872         PR target/82641
14873         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14874         emitted arch directives.
14875         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14876         __ARM_FEATURE_COPROC before changing architectures.
14878 2018-02-06  Richard Biener  <rguenther@suse.de>
14880         * config/i386/i386.c (print_reg): Fix typo.
14881         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14883 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
14885         * configure: Regenerate.
14887 2018-02-05  Martin Sebor  <msebor@redhat.com>
14889         PR tree-optimization/83369
14890         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14891         inlining context.
14893 2018-02-05  Martin Liska  <mliska@suse.cz>
14895         * doc/invoke.texi: Cherry-pick upstream r323995.
14897 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
14899         * ira.c (ira_init_register_move_cost): Adjust comment.
14901 2018-02-05  Martin Liska  <mliska@suse.cz>
14903         PR gcov-profile/84137
14904         * doc/gcov.texi: Fix typo in documentation.
14906 2018-02-05  Martin Liska  <mliska@suse.cz>
14908         PR gcov-profile/83879
14909         * doc/gcov.texi: Document necessity of --dynamic-list-data when
14910         using dlopen functionality.
14912 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
14914         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14915         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14916         _mm_maskz_range_ss, _mm_mask_range_round_ss,
14917         _mm_maskz_range_round_ss): New intrinsics.
14918         (__builtin_ia32_rangesd128_round)
14919         (__builtin_ia32_rangess128_round): Remove.
14920         (__builtin_ia32_rangesd128_mask_round,
14921         __builtin_ia32_rangess128_mask_round): New builtins.
14922         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14923         __builtin_ia32_rangess128_round): Remove.
14924         (__builtin_ia32_rangesd128_mask_round,
14925         __builtin_ia32_rangess128_mask_round): New builtins.
14926         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14927         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14928         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14929         "<round_saeonly_constraint>")): Changed to ...
14930         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14931         "<round_saeonly_scalar_constraint>")): ... this.
14932         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14933         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14934         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14935         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14936         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14938 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
14940         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14941         options.
14942         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14943         Remove all values except native, 8540 and 8548.
14945 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
14947         * config/i386/i386.c (ix86_output_function_return): Pass
14948         INVALID_REGNUM, instead of -1, as invalid register number to
14949         indirect_thunk_name and output_indirect_thunk.
14951 2018-02-02  Julia Koval  <julia.koval@intel.com>
14953         * config.gcc: Add -march=icelake.
14954         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14955         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14956         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14957         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14958         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14959         (processor_target_table): Add icelake.
14960         (ix86_option_override_internal): Handle new PTAs.
14961         (get_builtin_code_for_version): Handle icelake.
14962         (M_INTEL_COREI7_ICELAKE): New.
14963         (fold_builtin_cpu): Handle icelake.
14964         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14965         * doc/invoke.texi: Add -march=icelake.
14967 2018-02-02  Julia Koval  <julia.koval@intel.com>
14969         * config/i386/i386.c (ix86_option_override_internal): Change flags type
14970         to wide_int_bitmask.
14971         * wide-int-bitmask.h: New.
14973 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14975         PR target/84066
14976         * config/i386/i386.md: Replace Pmode with word_mode in
14977         builtin_setjmp_setup and builtin_longjmp to support x32.
14979 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
14981         PR target/56010
14982         PR target/83743
14983         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14984         #include "opts.h".
14985         (rs6000_supported_cpu_names): New static variable.
14986         (linux_cpu_translation_table): Likewise.
14987         (elf_platform) <cpu>: Define new static variable and use it.
14988         Translate kernel AT_PLATFORM name to canonical name if needed.
14989         Error if platform name is unknown.
14991 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
14993         PR target/84089
14994         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14996 2018-02-01  Jeff Law  <law@redhat.com>
14998         PR target/84128
14999         * config/i386/i386.c (release_scratch_register_on_entry): Add new
15000         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
15001         the scratch if RELEASE_VIA_POP is false.
15002         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15003         If we have to save a temporary register, decrement SIZE appropriately.
15004         Pass new arguments to release_scratch_register_on_entry.
15005         (ix86_adjust_stack_and_probe): Likewise.
15006         (ix86_emit_probe_stack_range): Pass new arguments to
15007         release_scratch_register_on_entry.
15009 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
15011         PR rtl-optimization/84157
15012         * combine.c (change_zero_ext): Use REG_P predicate in
15013         front of HARD_REGISTER_P predicate.
15015 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
15017         * config/avr/avr.c (avr_option_override): Move disabling of
15018         -fdelete-null-pointer-checks to...
15019         * common/config/avr/avr-common.c (avr_option_optimization_table):
15020         ...here.
15022 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15024         PR tree-optimization/81635
15025         * tree-data-ref.c (split_constant_offset_1): For types that
15026         wrap on overflow, try to use range info to prove that wrapping
15027         cannot occur.
15029 2018-02-01  Renlin Li  <renlin.li@arm.com>
15031         PR target/83370
15032         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15033         TAILCALL_ADDR_REGS.
15034         (aarch64_register_move_cost): Likewise.
15035         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15036         TAILCALL_ADDR_REGS.
15037         (REG_CLASS_NAMES): Likewise.
15038         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15039         TAILCALL_ADDR_REGS. Remove IP registers.
15040         * config/aarch64/aarch64.md (Ucs): Update register constraint.
15042 2018-02-01  Richard Biener  <rguenther@suse.de>
15044         * domwalk.h (dom_walker::dom_walker): Add additional constructor
15045         for specifying RPO order and allow NULL for that.
15046         * domwalk.c (dom_walker::dom_walker): Likewise.
15047         (dom_walker::walk): Handle NULL RPO order.
15048         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15049         in RPO order.
15050         (rewrite_update_dom_walker): Likewise.
15051         (mark_def_dom_walker): Likewise.
15053 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15055         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15056         (aarch64_maybe_expand_sve_subreg_move): Declare.
15057         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15058         * config/aarch64/predicates.md (aarch64_any_register_operand): New
15059         predicate.
15060         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15061         that are semantically a reverse operation.
15062         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15063         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15064         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15065         functions.
15066         (aarch64_can_change_mode_class): For big-endian, forbid changes
15067         between two SVE modes if they have different element sizes.
15069 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15071         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15072         the TImode handling for big-endian targets.
15074 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15076         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15077         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
15078         not just bytes.
15079         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15080         Remove BSWAP handing for big-endian targets and use the form of
15081         LD1RQ appropariate for the mode.
15083 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15085         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15086         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15087         duplicated element.
15089 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15091         PR tearget/83845
15092         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15093         check for operands that need to go through aarch64_sve_reload_be.
15095 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
15097         PR tree-optimization/81661
15098         PR tree-optimization/84117
15099         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15100         * tree-eh.c: Include gimplify.h.
15101         (find_trapping_overflow, replace_trapping_overflow,
15102         rewrite_to_non_trapping_overflow): New functions.
15103         * tree-vect-loop.c: Include tree-eh.h.
15104         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15105         * tree-data-ref.c: Include tree-eh.h.
15106         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15108 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
15110         PR rtl-optimization/84123
15111         * combine.c (change_zero_ext): Check if hard register satisfies
15112         can_change_dest_mode before calling gen_lowpart_SUBREG.
15114 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
15116         PR target/82444
15117         * ira.c (ira_init_register_move_cost): Remove assert.
15119 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15121         PR rtl-optimization/84071
15122         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15123         * doc/tm.texi: Regenerate.
15125 2018-01-31  Richard Biener  <rguenther@suse.de>
15127         PR tree-optimization/84132
15128         * tree-data-ref.c (analyze_miv_subscript): Properly
15129         check whether evolution_function_is_affine_multivariate_p
15130         before calling gcd_of_steps_may_divide_p.
15132 2018-01-31  Julia Koval  <julia.koval@intel.com>
15134         PR target/83618
15135         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15136         * config/i386/i386.md (rdpid_rex64) New.
15137         (rdpid): Make 32bit only.
15139 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
15141         PR lto/84105
15142         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15143         an IDENTIFIER_NODE for FUNCTION_TYPE's.
15145 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15147         Revert
15148         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15150         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15152 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15154         PR rtl-optimization/84071
15155         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15156         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15158 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
15160         * config/arc/arc.c (arc_handle_aux_attribute): New function.
15161         (arc_attribute_table): Add 'aux' attribute.
15162         (arc_in_small_data_p): Consider aux like variables.
15163         (arc_is_aux_reg_p): New function.
15164         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15165         (arc_get_aux_arg): New function.
15166         (prepare_move_operands): Handle aux-register access.
15167         (arc_handle_aux_attribute): New function.
15168         * doc/extend.texi (ARC Variable attributes): Add subsection.
15170 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
15172         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15173         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15174         (arc_attribute_table): Add 'uncached' attribute.
15175         (arc_print_operand): Print '.di' flag for uncached memory
15176         accesses.
15177         (arc_in_small_data_p): Do not consider for small data the uncached
15178         types.
15179         (arc_is_uncached_mem_p): New function.
15180         * config/arc/predicates.md (compact_store_memory_operand): Check
15181         for uncached memory accesses.
15182         (nonvol_nonimm_operand): Likewise.
15183         * doc/extend.texi (ARC Type Attribute): New subsection.
15185 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
15187         PR c/84100
15188         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15189         falign-loops=): Add Optimization flag.
15191 2018-01-30  Jeff Law  <law@redhat.com>
15193         PR target/84064
15194         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15195         INT_REGISTERS_SAVED.  Check it prior to calling
15196         get_scratch_register_on_entry.
15197         (ix86_adjust_stack_and_probe): Similarly.
15198         (ix86_emit_probe_stack_range): Similarly.
15199         (ix86_expand_prologue): Corresponding changes.
15201 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15203         PR target/40411
15204         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15205         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15207 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
15209         PR target/84112
15210         * lra-constraints.c (curr_insn_transform): Process AND in the
15211         address.
15213 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
15215         PR rtl-optimization/83986
15216         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15217         dependence against last_pending_memory_flush in addition to
15218         pending_jump_insns.
15220 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
15222         PR tree-optimization/81611
15223         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15224         copies.
15226 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15228         PR target/83758
15229         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15230         a reg rtx.
15232 2018-01-30  Richard Biener  <rguenther@suse.de>
15233             Jakub Jelinek  <jakub@redhat.com>
15235         PR tree-optimization/84111
15236         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
15237         inner loops added during recursion, as they don't have up-to-date
15238         SSA form.
15240 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
15242         PR ipa/81360
15243         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
15244         (can_inline_edge_by_limits_p): ... here.
15245         (can_early_inline_edge_p, check_callers,
15246         update_caller_keys, update_callee_keys, recursive_inlining,
15247         add_new_edges_to_heap, speculation_useful_p,
15248         inline_small_functions,
15249         inline_small_functions, flatten_function,
15250         inline_to_all_callers_1): Update.
15252 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
15254         * profile-count.c (profile_count::combine_with_ipa_count): Handle
15255         zeros correctly.
15257 2018-01-30  Richard Biener  <rguenther@suse.de>
15259         PR tree-optimization/83008
15260         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
15261         invariant and constant vector uses in stmts when they need
15262         more than one stmt.
15264 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15266         PR bootstrap/84017
15267         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
15268         * configure: Regenerate.
15270 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15272         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
15273         pattern.
15274         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
15275         Use gen_rtx_REG rather than gen_lowpart.
15277 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15279         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
15280         rather than 0 when creating partial subregs.
15282 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15284         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
15285         of usage.
15287 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
15289         PR target/81550
15290         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
15291         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
15292         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
15293         flags.  This restores the settings used before the 2017-07-24.
15294         Turning off pre increment/decrement/modify allows IVOPTS to
15295         optimize DF/SF loops where the index is an int.
15297 2018-01-29  Richard Biener  <rguenther@suse.de>
15298             Kelvin Nilsen  <kelvin@gcc.gnu.org>
15300         PR bootstrap/80867
15301         * tree-vect-stmts.c (vectorizable_call): Don't call
15302         targetm.vectorize_builtin_md_vectorized_function if callee is
15303         NULL.
15305 2018-01-22  Carl Love  <cel@us.ibm.com>
15307         * doc/extend.tex: Fix typo in second arg in
15308         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
15310 2018-01-29  Richard Biener  <rguenther@suse.de>
15312         PR tree-optimization/84086
15313         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
15314         (flush_ssaname_freelist): When SSA names were released reset
15315         the SCEV hash table.
15317 2018-01-29  Richard Biener  <rguenther@suse.de>
15319         PR tree-optimization/84057
15320         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15321         removed paths when removing edges.
15323 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
15325         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15326         -mfunction-return=@var{choice}.
15328 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15330         PR diagnostic/84034
15331         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15332         Handle CR like TAB.
15333         (layout::print_source_line): Likewise.
15334         (test_get_line_width_without_trailing_whitespace): Add test cases.
15336 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
15338         PR middle-end/84040
15339         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15340         debug insns.
15342 2018-01-26  Jim Wilson  <jimw@sifive.com>
15344         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15346         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15347         specified.
15349 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15351         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15352         and CMP + SUB-immediate -> SUBS.
15354 2018-01-26  Martin Sebor  <msebor@redhat.com>
15356         PR tree-optimization/83896
15357         * tree-ssa-strlen.c (get_string_len): Rename...
15358         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
15359         Avoid assuming length is constant.
15360         (handle_char_store): Use HOST_WIDE_INT for string length.
15362 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
15364         PR target/81763
15365         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15366         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15368 2018-01-26  Richard Biener  <rguenther@suse.de>
15370         PR rtl-optimization/84003
15371         * dse.c (record_store): Only record redundant stores when
15372         the earlier store aliases at least all accesses the later one does.
15374 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
15376         PR rtl-optimization/83985
15377         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15378         REG_CFA_RESTORE insns.
15379         (delete_unmarked_insns): Don't ignore separate shrink wrapping
15380         REG_CFA_RESTORE insns here.
15382         PR c/83989
15383         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15384         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15386 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15388         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15389         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15390         (arc_init): Likewise.
15391         (arc_override_options): Likewise.
15392         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15393         value.
15394         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15395         support.
15396         * config/arc/arc.h (TARGET_DBNZ): Define.
15397         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15398         properly set the tune attribute.
15399         (dbnz): Use TARGET_DBNZ guard.
15400         * config/arc/arc.opt (mtune): Add core3 option.
15402 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15404         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15405         recognize new pic like addresses.
15406         (arc_delegitimize_address): Clean up.
15408 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15410         * config/arc/arc-arches.def: Option mrf16 valid for all
15411         architectures.
15412         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15413         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15414         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15415         * config/arc/arc-tables.opt: Regenerate.
15416         * config/arc/arc.c (arc_conditional_register_usage): Handle
15417         reduced register file case.
15418         (arc_file_start): Set must have build attributes.
15419         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15420         mrf16 option value.
15421         * config/arc/arc.opt (mrf16): Add new option.
15422         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15423         * config/arc/genmultilib.awk: Handle new mrf16 option.
15424         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15425         * config/arc/t-multilib: Regenerate.
15426         * doc/invoke.texi (ARC Options): Document mrf16 option.
15428 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15430         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15431         * config/arc/arc.c (arc_handle_secure_attribute): New function.
15432         (arc_attribute_table): Add 'secure_call' attribute.
15433         (arc_print_operand): Print secure call operand.
15434         (arc_function_ok_for_sibcall): Don't optimize tail calls when
15435         secure.
15436         (arc_is_secure_call_p): New function.  * config/arc/arc.md
15437         (call_i): Add support for sjli instruction.
15438         (call_value_i): Likewise.
15439         * config/arc/constraints.md (Csc): New constraint.
15441 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15442             John Eric Martin  <John.Martin@emmicro-us.com>
15444         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15445         * config/arc/arc.c (_arc_jli_section): New struct.
15446         (arc_jli_section): New type.
15447         (rc_jli_sections): New static variable.
15448         (arc_handle_jli_attribute): New function.
15449         (arc_attribute_table): Add jli_always and jli_fixed attribute.
15450         (arc_file_end): New function.
15451         (TARGET_ASM_FILE_END): Define.
15452         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15453         (arc_add_jli_section): New function.
15454         (jli_call_scan): Likewise.
15455         (arc_reorg): Call jli_call_scan.
15456         (arc_output_addsi): Remove 'S' from printing asm operand.
15457         (arc_is_jli_call_p): New function.
15458         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15459         operand.
15460         (movhi_insn): Likewise.
15461         (movsi_insn): Likewise.
15462         (movsi_set_cc_insn): Likewise.
15463         (loadqi_update): Likewise.
15464         (load_zeroextendqisi_update): Likewise.
15465         (load_signextendqisi_update): Likewise.
15466         (loadhi_update): Likewise.
15467         (load_zeroextendhisi_update): Likewise.
15468         (load_signextendhisi_update): Likewise.
15469         (loadsi_update): Likewise.
15470         (loadsf_update): Likewise.
15471         (movsicc_insn): Likewise.
15472         (bset_insn): Likewise.
15473         (bxor_insn): Likewise.
15474         (bclr_insn): Likewise.
15475         (bmsk_insn): Likewise.
15476         (bicsi3_insn): Likewise.
15477         (cmpsi_cc_c_insn): Likewise.
15478         (movsi_ne): Likewise.
15479         (movsi_cond_exec): Likewise.
15480         (clrsbsi2): Likewise.
15481         (norm_f): Likewise.
15482         (normw): Likewise.
15483         (swap): Likewise.
15484         (divaw): Likewise.
15485         (flag): Likewise.
15486         (sr): Likewise.
15487         (kflag): Likewise.
15488         (ffs): Likewise.
15489         (ffs_f): Likewise.
15490         (fls): Likewise.
15491         (call_i): Remove 'S' asm letter, add jli instruction.
15492         (call_value_i): Likewise.
15493         * config/arc/arc.op (mjli-always): New option.
15494         * config/arc/constraints.md (Cji): New constraint.
15495         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15496         operand.
15497         (subsf3_fpx): Likewise.
15498         (mulsf3_fpx): Likewise.
15499         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15500         asm operand.
15501         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15502         function attrbutes.
15503         * doc/invoke.texi (ARC): Document mjli-always option.
15505 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
15507         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15508         avoid addition with 0 and use incw and decw where possible.
15510 2018-01-26  Richard Biener  <rguenther@suse.de>
15512         PR tree-optimization/81082
15513         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15514         association if it requires casting to unsigned.
15515         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15516         from fold_plusminus_mult_expr to catch important cases late when
15517         range info is available.
15519 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15521         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15522         * configure.ac (hidden_linkonce): New test.
15523         * configure: Regenerate.
15524         * config.in: Regenerate.
15526 2018-01-26  Julia Koval  <julia.koval@intel.com>
15528         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15529         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15530         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15531         _mm_mask_bitshuffle_epi64_mask): Fix type.
15532         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15533         USI_FTYPE_V4DI_V4DI_USI): Remove.
15534         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15535         __builtin_ia32_vpshufbitqmb256_mask,
15536         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15537         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15538         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15540 2018-01-26  Alan Modra  <amodra@gmail.com>
15542         PR target/84033
15543         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15544         UNSPEC_VBPERMQ.  Sort other unspecs.
15546 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
15548         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15550 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
15552         PR middle-end/83055
15553         * predict.c (drop_profile): Do not push/pop cfun; update also
15554         node->count.
15555         (handle_missing_profiles): Fix logic looking for zero profiles.
15557 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
15559         PR middle-end/83977
15560         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15561         on functions with #pragma omp declare simd or functions with simd
15562         attribute.
15563         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15564         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15565         Remove trailing \n from warning_at calls.
15567 2018-01-25  Tom de Vries  <tom@codesourcery.com>
15569         PR target/84028
15570         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15571         for neutered workers.
15573 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
15575         PR target/68467
15576         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15577         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15579 2018-01-24  Jeff Law  <law@redhat.com>
15581         PR target/83994
15582         * i386.c (get_probe_interval): Move to earlier point.
15583         (ix86_compute_frame_layout): If -fstack-clash-protection and
15584         the frame is larger than the probe interval, then use pushes
15585         to save registers rather than reg->mem moves.
15586         (ix86_expand_prologue): Remove conditional for int_registers_saved
15587         assertion.
15589 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
15591         PR target/84014
15592         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15593         min/max for never referenced object.
15595 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
15597         PR middle-end/83977
15598         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15599         here.
15600         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15601         attributes from DECL_ATTRIBUTES (decl) without affecting
15602         DECL_ATTRIBUTES (current_function_decl).
15603         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15604         functions with non-NULL DECL_ABSTRACT_ORIGIN.
15606 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
15608         PR tree-optimization/83979
15609         * fold-const.c (fold_comparison): Use constant_boolean_node
15610         instead of boolean_{true,false}_node.
15612 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
15614         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15615         with zero counts.
15617 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15619         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15620         Simplify the clause that sets the length attribute.
15621         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15622         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15623         clause that sets the length attribute.
15624         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15626 2018-01-24  Tom de Vries  <tom@codesourcery.com>
15628         PR target/83589
15629         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15630         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15631         Add strict parameter.
15632         (prevent_branch_around_nothing): Insert dummy insn between branch to
15633         label and label with no ptx insn inbetween.
15634         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15636 2018-01-24  Tom de Vries  <tom@codesourcery.com>
15638         PR target/81352
15639         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15640         for neutered threads in warp.
15641         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15643 2018-01-24  Richard Biener  <rguenther@suse.de>
15645         PR tree-optimization/83176
15646         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15647         operands.
15649 2018-01-24  Richard Biener  <rguenther@suse.de>
15651         PR tree-optimization/82819
15652         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15653         code generating pluses that are no-ops in the target precision.
15655 2018-01-24  Richard Biener  <rguenther@suse.de>
15657         PR middle-end/84000
15658         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15660 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15662         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15663         to merge probabilities.
15664         * predict.c (probably_never_executed): Also mark as cold functions
15665         with global 0 profile and guessed local profile.
15666         * profile-count.c (profile_probability::combine_with_count): New
15667         member function.
15668         * profile-count.h (profile_probability::operator*,
15669         profile_probability::operator*=, profile_probability::operator/,
15670         profile_probability::operator/=): Reduce precision to adjusted
15671         and set value to guessed on contradictory divisions.
15672         (profile_probability::combine_with_freq): Remove.
15673         (profile_probability::combine_wiht_count): Declare.
15674         (profile_count::force_nonzero):: Set to adjusted.
15675         (profile_count::probability_in):: Set quality to adjusted.
15676         * tree-ssa-tail-merge.c (replace_block_by): Use
15677         combine_with_count.
15679 2018-01-23  Andrew Waterman  <andrew@sifive.com>
15680             Jim Wilson  <jimw@sifive.com>
15682         * config/riscv/riscv.c (riscv_stack_boundary): New.
15683         (riscv_option_override): Set riscv_stack_boundary.  Handle
15684         riscv_preferred_stack_boundary_arg.
15685         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15686         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15687         (STACK_BOUNDARY): Set to riscv_stack_boundary.
15688         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15689         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15690         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15692 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
15694         PR target/83905
15695         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15696         of struct ix86_frame.
15697         (ix86_expand_epilogue): Likewise.  Add a local variable for
15698         the reg_save_offset field in struct ix86_frame.
15700 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
15702         PR tree-optimization/82604
15703         * tree-loop-distribution.c (enum partition_kind): New enum item
15704         PKIND_PARTIAL_MEMSET.
15705         (partition_builtin_p): Support above new enum item.
15706         (generate_code_for_partition): Ditto.
15707         (compute_access_range): Differentiate cases that equality can be
15708         proven at all loops, the innermost loops or no loops.
15709         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15710         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
15711         (finalize_partitions, distribute_loop): Don't fuse partition of
15712         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15713         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15714         parloop is enabled.
15716 2018-01-23  Martin Liska  <mliska@suse.cz>
15718         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15719         order to ignore the predictor.
15720         (PRED_POLYMORPHIC_CALL): Likewise.
15721         (PRED_RECURSIVE_CALL): Likewise.
15723 2018-01-23  Martin Liska  <mliska@suse.cz>
15725         * tree-profile.c (tree_profiling): Print function header to
15726         aware reader which function we are working on.
15727         * value-prof.c (gimple_find_values_to_profile): Do not print
15728         not interesting value histograms.
15730 2018-01-23  Martin Liska  <mliska@suse.cz>
15732         * profile-count.h (enum profile_quality): Add
15733         profile_uninitialized as the first value. Do not number values
15734         as they are zero based.
15735         (profile_count::verify): Update sanity check.
15736         (profile_probability::verify): Likewise.
15738 2018-01-23  Nathan Sidwell  <nathan@acm.org>
15740         * doc/invoke.texi (ffor-scope): Deprecate.
15742 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15744         PR tree-optimization/83510
15745         * domwalk.c (set_all_edges_as_executable): New function.
15746         (dom_walker::dom_walker): Convert bool param
15747         "skip_unreachable_blocks" to enum reachability.  Move setup of
15748         edge flags to set_all_edges_as_executable and only do it when
15749         reachability is REACHABLE_BLOCKS.
15750         * domwalk.h (enum dom_walker::reachability): New enum.
15751         (dom_walker::dom_walker): Convert bool param
15752         "skip_unreachable_blocks" to enum reachability.
15753         (set_all_edges_as_executable): New decl.
15754         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
15755         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15756         "reachability".
15757         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15758         but converting true to REACHABLE_BLOCKS.
15759         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15760         * tree-vrp.c
15761         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15762         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15763         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15764         REACHABLE_BLOCKS.
15765         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15766         if check_all_array_refs will be called.
15768 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15770         * tree.c (selftest::test_location_wrappers): Add more test
15771         coverage.
15773 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15775         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15776         (selftest::test_bit_in_range): Likewise.
15778 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
15780         PR testsuite/83888
15781         * doc/sourcebuild.texi (vect_float): Say that the selector
15782         only describes the situation when -funsafe-math-optimizations is on.
15783         (vect_float_strict): Document.
15785 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
15787         PR tree-optimization/83965
15788         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15789         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15790         instead of checking only for a reduction.
15791         (vect_recog_widen_sum_pattern): Likewise.
15793 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15795         * predict.c (probably_never_executed): Only use precise profile info.
15796         (compute_function_frequency): Skip after inlining hack since we now
15797         have quality checking.
15799 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15801         * profile-count.h (profile_probability::very_unlikely,
15802         profile_probability::unlikely, profile_probability::even): Set
15803         precision to guessed.
15805 2018-01-23  Richard Biener  <rguenther@suse.de>
15807         PR tree-optimization/83963
15808         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15809         Properly terminate dominator walk when crossing the exit edge not
15810         when visiting its source block.
15812 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
15814         PR c++/83918
15815         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15816         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15818 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
15820         PR tree-optimization/83957
15821         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
15822         semicolon after for body surrounded by braces.
15824         PR tree-optimization/83081
15825         * profile-count.h (profile_probability::split): New method.
15826         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15827         Use profile_probability::split.
15828         (do_compare_rtx_and_jump): Fix adjustment of probabilities
15829         when splitting a single conditional jump into 2.
15831 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
15833         PR tree-optimization/69452
15834         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15835         decl.
15837 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15839         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15840         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15841         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15843 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15845         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15846         declaration.
15847         * config/rl78/rl78.md (movdi): New define_expand.
15848         * config/rl78/rl78.c (rl78_split_movdi): New function.
15850 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
15852         PR target/83862
15853         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15854         no longer used.
15855         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15856         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15857         128-bit to produce an UNSPEC move to get the double word with the
15858         signbit and then a shift directly to do signbit.
15859         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15860         implementation with a new version that just does either a direct
15861         move or a regular move.  Move memory interface to separate insns.
15862         Move insns so they are next to the expander.
15863         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15864         with signbit move.  Split big and little endian case.
15865         (signbit<mode>2_dm_mem_le): Likewise.
15866         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15867         (signbit<mode>2_dm2): Likewise.
15869 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15871         * config/rl78/rl78.md (anddi3): New define_expand.
15873 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15875         * config/rl78/rl78.md (umindi3): New define_expand.
15877 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15879         * config/rl78/rl78.md (smindi3): New define_expand.
15881 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15883         * config/rl78/rl78.md (smaxdi3): New define_expand.
15885 2018-01-22  Carl Love  <cel@us.ibm.com>
15887         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15888         LVX_V1TI): Add macro expansion.
15889         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15890         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15891         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15892         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15893         Change check to determine if the instruction is a byte reversing
15894         entry.  Fix typo in comment.
15895         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15896         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15897         Add def_builtin calls for new builtins.
15898         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15899         Add define_insn expansion.
15901 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15903         * config/rl78/rl78.md (umaxdi3): New define_expand.
15905 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15907         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15908         for non-QImode registers.
15910 2018-01-22  Richard Biener  <rguenther@suse.de>
15912         PR tree-optimization/83963
15913         * graphite-scop-detection.c (scop_detection::get_sese): Delay
15914         including the loop exit block.
15915         (scop_detection::merge_sese): Likewise.
15916         (scop_detection::add_scop): Do it here instead.
15918 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15920         * doc/sourcebuild.texi (arm_softfloat): Document.
15922 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
15924         PR gcc/77734
15925         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15926         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15927         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15929 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15930             David Edelsohn  <dje.gcc@gmail.com>
15932         PR target/83946
15933         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15934         Change "crset eq" to "crset 2".
15935         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15936         (*call_indirect_aix<mode>_nospec): Likewise.
15937         (*call_value_indirect_aix<mode>_nospec): Likewise.
15938         (*call_indirect_elfv2<mode>_nospec): Likewise.
15939         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15940         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15941         change assembly output from . to $.
15942         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15943         (indirect_jump<mode>_nospec): Change assembly output from . to $.
15944         (*tablejump<mode>_internal1_nospec): Likewise.
15946 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
15948         PR target/80870
15949         * config/sh/sh_optimize_sett_clrt.cc:
15950         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15952 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
15954         PR tree-optimization/83940
15955         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15956         offset_dt to vect_constant_def rather than vect_unknown_def_type.
15957         (vect_check_load_store_mask): Add a mask_dt_out parameter and
15958         use it to pass back the definition type.
15959         (vect_check_store_rhs): Likewise rhs_dt_out.
15960         (vect_build_gather_load_calls): Add a mask_dt argument and use
15961         it instead of a call to vect_is_simple_use.
15962         (vectorizable_store): Update calls to vect_check_load_store_mask
15963         and vect_check_store_rhs.  Use the dt returned by the latter instead
15964         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
15965         instead of calls to vect_is_simple_use.  Pass the scalar rather
15966         than the vector operand to vect_is_simple_use when handling
15967         second and subsequent copies of an rhs value.
15968         (vectorizable_load): Update calls to vect_check_load_store_mask
15969         and vect_build_gather_load_calls.  Use the cached mask_dt and
15970         gs_info.offset_dt instead of calls to vect_is_simple_use.
15972 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
15974         PR middle-end/83945
15975         * tree-emutls.c: Include gimplify.h.
15976         (lower_emutls_2): New function.
15977         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15978         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15979         it before further processing.
15981         PR target/83930
15982         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15983         UINTVAL (trueop1) instead of INTVAL (op1).
15985 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
15987         PR debug/81570
15988         PR debug/83728
15989         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15990         INCOMING_FRAME_SP_OFFSET if not defined.
15991         (scan_trace): Add ENTRY argument.  If true and
15992         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15993         emit a note to adjust the CFA offset.
15994         (create_cfi_notes): Adjust scan_trace callers.
15995         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15996         INCOMING_FRAME_SP_OFFSET in the CIE.
15997         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15998         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15999         Likewise.
16000         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16001         * doc/tm.texi: Regenerated.
16003 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16005         PR rtl-optimization/83147
16006         * lra-constraints.c (remove_inheritance_pseudos): Use
16007         lra_substitute_pseudo_within_insn.
16009 2018-01-19  Tom de Vries  <tom@codesourcery.com>
16010             Cesar Philippidis  <cesar@codesourcery.com>
16012         PR target/83920
16013         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16015 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
16017         PR target/83790
16018         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16019         spaces for function labels.
16021 2018-01-19  Martin Liska  <mliska@suse.cz>
16023         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16024         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16025         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16026         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16027         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16028         (PRED_CONST_RETURN): Change from 69 to 65.
16029         (PRED_NULL_RETURN): Change from 91 to 71.
16030         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16031         (PRED_LOOP_GUARD): Change from 66 to 73.
16033 2018-01-19  Martin Liska  <mliska@suse.cz>
16035         * predict.c (predict_insn_def): Add new assert.
16036         (struct branch_predictor): Change type to signed integer.
16037         (test_prediction_value_range): Amend test to cover
16038         PROB_UNINITIALIZED.
16039         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16040         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16041         (PRED_LOOP_ITERATIONS_MAX): Likewise.
16042         (PRED_LOOP_IV_COMPARE): Likewise.
16043         * predict.h (PROB_UNINITIALIZED): Define new constant.
16045 2018-01-19  Martin Liska  <mliska@suse.cz>
16047         * predict.c (dump_prediction): Add new format for
16048         analyze_brprob.py script which is enabled with -details
16049         suboption.
16050         * profile-count.h (precise_p): New function.
16052 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
16054         PR tree-optimization/83922
16055         * tree-vect-loop.c (vect_verify_full_masking): Return false if
16056         there are no statements that need masking.
16057         (vect_active_double_reduction_p): New function.
16058         (vect_analyze_loop_operations): Use it when handling phis that
16059         are not in the loop header.
16061 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
16063         PR tree-optimization/83914
16064         * tree-vect-loop.c (vectorizable_induction): Don't convert
16065         init_expr or apply the peeling adjustment for inductions
16066         that are nested within the vectorized loop.
16068 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16070         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16071         instead of NEG.
16073 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
16075         PR sanitizer/81715
16076         PR testsuite/83882
16077         * function.h (gimplify_parameters): Add gimple_seq * argument.
16078         * function.c: Include gimple.h and options.h.
16079         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16080         for the added local temporaries if needed.
16081         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16082         if there are any parameter cleanups, wrap whole body into a
16083         try/finally with the cleanups.
16085 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
16087         PR target/82964
16088         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16089         Use GET_MODE_CLASS for scalar floating point.
16091 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
16093         PR ipa/82256
16094         patch by PaX Team
16095         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16096         Fix call of call_cgraph_insertion_hooks.
16098 2018-01-18  Martin Sebor  <msebor@redhat.com>
16100         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16102 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
16104         PR ipa/83619
16105         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16106         frequencies.
16108 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
16110         PR other/70268
16111         * common.opt: (-ffile-prefix-map): New option.
16112         * opts.c (common_handle_option): Defer it.
16113         * opts-global.c (handle_common_deferred_options): Handle it.
16114         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16115         * file-prefix-map.h: New file.
16116         (remap_debug_filename, add_debug_prefix_map): ...here.
16117         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16118         * final.c (debug_prefix_map, add_debug_prefix_map
16119         remap_debug_filename): Move to...
16120         * file-prefix-map.c: New file.
16121         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16122         generalize, get rid of alloca(), use strrchr() instead of strchr().
16123         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16124         Implement in terms of add_prefix_map().
16125         (remap_macro_filename, remap_debug_filename): Implement in term of
16126         remap_filename().
16127         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16128         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16129         * dbxout.c: Include file-prefix-map.h.
16130         * varasm.c: Likewise.
16131         * vmsdbgout.c: Likewise.
16132         * xcoffout.c: Likewise.
16133         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16134         * doc/cppopts.texi (-fmacro-prefix-map): Document.
16135         * doc/invoke.texi (-ffile-prefix-map): Document.
16136         (-fdebug-prefix-map): Update description.
16138 2018-01-18  Martin Liska  <mliska@suse.cz>
16140         * config/i386/i386.c (indirect_thunk_name): Document that also
16141         lfence is emitted.
16142         (output_indirect_thunk): Document why both instructions
16143         (pause and lfence) are generated.
16145 2018-01-18  Richard Biener  <rguenther@suse.de>
16147         PR tree-optimization/83887
16148         * graphite-scop-detection.c
16149         (scop_detection::get_nearest_dom_with_single_entry): Remove.
16150         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16151         (scop_detection::merge_sese): Re-implement with a flood-fill
16152         algorithm that properly finds a SESE region if it exists.
16154 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
16156         PR c/61240
16157         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16158         pointer_diff optimizations use view_convert instead of convert.
16160 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16162         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16163         Generate different code for -mno-speculate-indirect-jumps.
16164         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16165         (*call_indirect_aix<mode>): Disable for
16166         -mno-speculate-indirect-jumps.
16167         (*call_indirect_aix<mode>_nospec): New define_insn.
16168         (*call_value_indirect_aix<mode>): Disable for
16169         -mno-speculate-indirect-jumps.
16170         (*call_value_indirect_aix<mode>_nospec): New define_insn.
16171         (*sibcall_nonlocal_sysv<mode>): Generate different code for
16172         -mno-speculate-indirect-jumps.
16173         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16175 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
16177         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16178         long double type, set the flags for noting the default long double
16179         type, even if we don't pass or return a long double type.
16181 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
16183         PR ipa/83051
16184         * ipa-inline.c (flatten_function): Do not overwrite final inlining
16185         failure.
16187 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
16189         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16190         support for merge[hl].
16191         (fold_mergehl_helper): New helper function.
16192         (tree-vector-builder.h): New #include for tree_vector_builder usage.
16193         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16194         (altivec_vmrglw_direct): Add xxmrglw insn.
16196 2018-01-17  Andrew Waterman  <andrew@sifive.com>
16198         * config/riscv/riscv.c (riscv_conditional_register_usage): If
16199         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16201 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
16203         PR lto/83121
16204         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16205         call the lto_location_cache before reading the
16206         DECL_SOURCE_LOCATION of the types.
16208 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
16209             Richard Sandiford  <richard.sandiford@linaro.org>
16211         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16212         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16213         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16214         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16215         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16216         Add declaration.
16217         * config/aarch64/constraints.md (aarch64_movti_operand):
16218         Limit immediates.
16219         * config/aarch64/predicates.md (Uti): Add new constraint.
16221 2018-01-17 Carl Love  <cel@us.ibm.com>
16223         * config/rs6000/vsx.md (define_expand xl_len_r,
16224         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16225         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16226         lxvll.
16227         (define_expand, define_insn): Move the shift left from  the
16228         define_insn to the define_expand for lxvl and stxvl instructions.
16229         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16230         and XL_LEN_R definitions to PURE.
16232 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
16234         * config/i386/i386.c (indirect_thunk_name): Declare regno
16235         as unsigned int.  Compare regno with INVALID_REGNUM.
16236         (output_indirect_thunk): Ditto.
16237         (output_indirect_thunk_function): Ditto.
16238         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
16239         in the call to output_indirect_thunk_function.
16241 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
16243         PR middle-end/83884
16244         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
16245         rather than the size of inner_type to determine the stack slot size
16246         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
16248 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
16250         PR target/83546
16251         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
16252         to PTA_SILVERMONT.
16254 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
16256         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
16257         endian Linux systems to optionally enable multilibs for selecting
16258         the long double type if the user configured an explicit type.
16259         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
16260         have no long double multilibs if not defined.
16261         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
16262         warn if the user used -mabi={ieee,ibm}longdouble and we built
16263         multilibs for long double.
16264         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
16265         appropriate multilib option.
16266         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
16267         multilib options.
16268         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
16269         for building long double multilibs.
16270         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
16272 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
16274         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
16275         copies.
16277         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
16278         64 bits.
16279         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
16280         128 bits.
16282         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
16283         variables.
16285         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
16286         return value.
16288 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
16290         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
16291         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
16293 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16295         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
16296         different rtl trees depending on TARGET_64BIT.
16297         (rs6000_gen_lvx): Likewise.
16299 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
16301         * config/visium/visium.md (nop): Tweak comment.
16302         (hazard_nop): Likewise.
16304 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16306         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
16307         -mspeculate-indirect-jumps.
16308         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
16309         for -mno-speculate-indirect-jumps.
16310         (*call_indirect_elfv2<mode>_nospec): New define_insn.
16311         (*call_value_indirect_elfv2<mode>): Disable for
16312         -mno-speculate-indirect-jumps.
16313         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
16314         (indirect_jump): Emit different RTL for
16315         -mno-speculate-indirect-jumps.
16316         (*indirect_jump<mode>): Disable for
16317         -mno-speculate-indirect-jumps.
16318         (*indirect_jump<mode>_nospec): New define_insn.
16319         (tablejump): Emit different RTL for
16320         -mno-speculate-indirect-jumps.
16321         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16322         (tablejumpsi_nospec): New define_expand.
16323         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16324         (tablejumpdi_nospec): New define_expand.
16325         (*tablejump<mode>_internal1): Disable for
16326         -mno-speculate-indirect-jumps.
16327         (*tablejump<mode>_internal1_nospec): New define_insn.
16328         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16329         option.
16331 2018-01-16  Artyom Skrobov tyomitch@gmail.com
16333         * caller-save.c (insert_save): Drop unnecessary parameter.  All
16334         callers updated.
16336 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16337             Richard Biener  <rguenth@suse.de>
16339         PR libgomp/83590
16340         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16341         return early, inline manually is_gimple_sizepos.  Make sure if we
16342         call gimplify_expr we don't end up with a gimple constant.
16343         * tree.c (variably_modified_type_p): Don't return true for
16344         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
16345         * gimplify.h (is_gimple_sizepos): Remove.
16347 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16349         PR tree-optimization/83857
16350         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16351         vectorizable_live_operation for pure SLP statements.
16352         (vectorizable_live_operation): Handle PHIs.
16354 2018-01-16  Richard Biener  <rguenther@suse.de>
16356         PR tree-optimization/83867
16357         * tree-vect-stmts.c (vect_transform_stmt): Precompute
16358         nested_in_vect_loop_p since the scalar stmt may get invalidated.
16360 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16362         PR c/83844
16363         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16364         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16365         If off is not INTEGER_CST, issue a may not be aligned warning
16366         rather than isn't aligned.  Use isn%'t rather than isn't.
16367         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16368         into MULT_EXPR.
16369         <case MULT_EXPR>: Improve the case when bottom and one of the
16370         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16371         operand, in that case check if the other operand is multiple of
16372         bottom divided by the INTEGER_CST operand.
16374 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16376         PR target/83858
16377         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16378         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16379         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16380         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16381         * config/pa/pa.c (pa_function_arg_advance): Likewise.
16382         (pa_function_arg, pa_arg_partial_bytes): Likewise.
16383         (pa_function_arg_size): New function.
16385 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16387         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16388         in a separate statement.
16390 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16392         PR tree-optimization/83847
16393         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16394         group gathers and scatters.
16396 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16398         PR rtl-optimization/86620
16399         * params.def (max-sched-ready-insns): Bump minimum value to 1.
16401         PR rtl-optimization/83213
16402         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16403         to last if both are JUMP_INSNs.
16405         PR tree-optimization/83843
16406         * gimple-ssa-store-merging.c
16407         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16408         store_immediate_info for bswap/nop orig_stores.
16410 2018-01-15  Andrew Waterman  <andrew@sifive.com>
16412         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16413         !TARGET_MUL.
16414         <UDIV>: Increase cost if !TARGET_DIV.
16416 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
16418         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16419         (define_attr "cr_logical_3op"): New.
16420         (cceq_ior_compare): Adjust.
16421         (cceq_ior_compare_complement): Adjust.
16422         (*cceq_rev_compare): Adjust.
16423         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16424         (is_cracked_insn): Adjust.
16425         (insn_must_be_first_in_group): Adjust.
16426         * config/rs6000/40x.md: Adjust.
16427         * config/rs6000/440.md: Adjust.
16428         * config/rs6000/476.md: Adjust.
16429         * config/rs6000/601.md: Adjust.
16430         * config/rs6000/603.md: Adjust.
16431         * config/rs6000/6xx.md: Adjust.
16432         * config/rs6000/7450.md: Adjust.
16433         * config/rs6000/7xx.md: Adjust.
16434         * config/rs6000/8540.md: Adjust.
16435         * config/rs6000/cell.md: Adjust.
16436         * config/rs6000/e300c2c3.md: Adjust.
16437         * config/rs6000/e500mc.md: Adjust.
16438         * config/rs6000/e500mc64.md: Adjust.
16439         * config/rs6000/e5500.md: Adjust.
16440         * config/rs6000/e6500.md: Adjust.
16441         * config/rs6000/mpc.md: Adjust.
16442         * config/rs6000/power4.md: Adjust.
16443         * config/rs6000/power5.md: Adjust.
16444         * config/rs6000/power6.md: Adjust.
16445         * config/rs6000/power7.md: Adjust.
16446         * config/rs6000/power8.md: Adjust.
16447         * config/rs6000/power9.md: Adjust.
16448         * config/rs6000/rs64.md: Adjust.
16449         * config/rs6000/titan.md: Adjust.
16451 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16453         * config/i386/predicates.md (indirect_branch_operand): Rewrite
16454         ix86_indirect_branch_register logic.
16456 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16458         * config/i386/constraints.md (Bs): Update
16459         ix86_indirect_branch_register check.  Don't check
16460         ix86_indirect_branch_register with GOT_memory_operand.
16461         (Bw): Likewise.
16462         * config/i386/predicates.md (GOT_memory_operand): Don't check
16463         ix86_indirect_branch_register here.
16464         (GOT32_symbol_operand): Likewise.
16466 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16468         * config/i386/predicates.md (constant_call_address_operand):
16469         Rewrite ix86_indirect_branch_register logic.
16470         (sibcall_insn_operand): Likewise.
16472 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16474         * config/i386/constraints.md (Bs): Replace
16475         ix86_indirect_branch_thunk_register with
16476         ix86_indirect_branch_register.
16477         (Bw): Likewise.
16478         * config/i386/i386.md (indirect_jump): Likewise.
16479         (tablejump): Likewise.
16480         (*sibcall_memory): Likewise.
16481         (*sibcall_value_memory): Likewise.
16482         Peepholes of indirect call and jump via memory: Likewise.
16483         * config/i386/i386.opt: Likewise.
16484         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16485         (GOT_memory_operand): Likewise.
16486         (call_insn_operand): Likewise.
16487         (sibcall_insn_operand): Likewise.
16488         (GOT32_symbol_operand): Likewise.
16490 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
16492         PR middle-end/83837
16493         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16494         type rather than type addr's type points to.
16495         (expand_omp_atomic_mutex): Likewise.
16496         (expand_omp_atomic): Likewise.
16498 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16500         PR target/83839
16501         * config/i386/i386.c (output_indirect_thunk_function): Use
16502         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16503         for  __x86_return_thunk.
16505 2018-01-15  Richard Biener  <rguenther@suse.de>
16507         PR middle-end/83850
16508         * expmed.c (extract_bit_field_1): Fix typo.
16510 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16512         PR target/83687
16513         * config/arm/iterators.md (VF): New mode iterator.
16514         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16515         Remove integer-related logic from pattern.
16516         (neon_vabd<mode>_3): Likewise.
16518 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
16520         PR middle-end/82694
16521         * common.opt (fstrict-overflow): No longer an alias.
16522         (fwrapv-pointer): New option.
16523         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16524         also for pointer types based on flag_wrapv_pointer.
16525         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16526         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16527         opts->x_flag_wrapv got set.
16528         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16529         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16530         POINTER_TYPE_OVERFLOW_UNDEFINED.
16531         * match.pd: Likewise in address comparison pattern.
16532         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16534 2018-01-15  Richard Biener  <rguenther@suse.de>
16536         PR lto/83804
16537         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16538         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
16539         Reset type names to their identifier if their TYPE_DECL doesn't
16540         have linkage (and thus is used for ODR and devirt).
16541         (save_debug_info_for_decl): Remove.
16542         (save_debug_info_for_type): Likewise.
16543         (add_tree_to_fld_list): Adjust.
16544         * tree-pretty-print.c (dump_generic_node): Make dumping of
16545         type names more robust.
16547 2018-01-15  Richard Biener  <rguenther@suse.de>
16549         * BASE-VER: Bump to 8.0.1.
16551 2018-01-14  Martin Sebor  <msebor@redhat.com>
16553         PR other/83508
16554         * builtins.c (check_access): Avoid warning when the no-warning bit
16555         is set.
16557 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
16559         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16560         * ira-color (allocno_hard_regs_compare): Likewise.
16562 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
16564         PR target/83013
16565         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16566         Use .pushsection/.popsection.
16568 2018-01-14  Martin Sebor  <msebor@redhat.com>
16570         PR c++/81327
16571         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16573 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
16575         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16576         entry from extra_headers.
16577         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16578         extra_headers, make the list bitwise identical to the i?86-*-* one.
16580 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16582         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16583         -mcmodel=large with -mindirect-branch=thunk,
16584         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16585         -mfunction-return=thunk-extern.
16586         * doc/invoke.texi: Document -mcmodel=large is incompatible with
16587         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16588         -mfunction-return=thunk and -mfunction-return=thunk-extern.
16590 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16592         * config/i386/i386.c (print_reg): Print the name of the full
16593         integer register without '%'.
16594         (ix86_print_operand): Handle 'V'.
16595         * doc/extend.texi: Document 'V' modifier.
16597 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16599         * config/i386/constraints.md (Bs): Disallow memory operand for
16600         -mindirect-branch-register.
16601         (Bw): Likewise.
16602         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16603         (GOT_memory_operand): Likewise.
16604         (call_insn_operand): Likewise.
16605         (sibcall_insn_operand): Likewise.
16606         (GOT32_symbol_operand): Likewise.
16607         * config/i386/i386.md (indirect_jump): Call convert_memory_address
16608         for -mindirect-branch-register.
16609         (tablejump): Likewise.
16610         (*sibcall_memory): Likewise.
16611         (*sibcall_value_memory): Likewise.
16612         Disallow peepholes of indirect call and jump via memory for
16613         -mindirect-branch-register.
16614         (*call_pop): Replace m with Bw.
16615         (*call_value_pop): Likewise.
16616         (*sibcall_pop_memory): Replace m with Bs.
16617         * config/i386/i386.opt (mindirect-branch-register): New option.
16618         * doc/invoke.texi: Document -mindirect-branch-register option.
16620 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16622         * config/i386/i386-protos.h (ix86_output_function_return): New.
16623         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16624         set function_return_type.
16625         (indirect_thunk_name): Add ret_p to indicate thunk for function
16626         return.
16627         (output_indirect_thunk_function): Pass false to
16628         indirect_thunk_name.
16629         (ix86_output_indirect_branch_via_reg): Likewise.
16630         (ix86_output_indirect_branch_via_push): Likewise.
16631         (output_indirect_thunk_function): Create alias for function
16632         return thunk if regno < 0.
16633         (ix86_output_function_return): New function.
16634         (ix86_handle_fndecl_attribute): Handle function_return.
16635         (ix86_attribute_table): Add function_return.
16636         * config/i386/i386.h (machine_function): Add
16637         function_return_type.
16638         * config/i386/i386.md (simple_return_internal): Use
16639         ix86_output_function_return.
16640         (simple_return_internal_long): Likewise.
16641         * config/i386/i386.opt (mfunction-return=): New option.
16642         (indirect_branch): Mention -mfunction-return=.
16643         * doc/extend.texi: Document function_return function attribute.
16644         * doc/invoke.texi: Document -mfunction-return= option.
16646 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16648         * config/i386/i386-opts.h (indirect_branch): New.
16649         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16650         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16651         with local indirect jump when converting indirect call and jump.
16652         (ix86_set_indirect_branch_type): New.
16653         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16654         (indirectlabelno): New.
16655         (indirect_thunk_needed): Likewise.
16656         (indirect_thunk_bnd_needed): Likewise.
16657         (indirect_thunks_used): Likewise.
16658         (indirect_thunks_bnd_used): Likewise.
16659         (INDIRECT_LABEL): Likewise.
16660         (indirect_thunk_name): Likewise.
16661         (output_indirect_thunk): Likewise.
16662         (output_indirect_thunk_function): Likewise.
16663         (ix86_output_indirect_branch_via_reg): Likewise.
16664         (ix86_output_indirect_branch_via_push): Likewise.
16665         (ix86_output_indirect_branch): Likewise.
16666         (ix86_output_indirect_jmp): Likewise.
16667         (ix86_code_end): Call output_indirect_thunk_function if needed.
16668         (ix86_output_call_insn): Call ix86_output_indirect_branch if
16669         needed.
16670         (ix86_handle_fndecl_attribute): Handle indirect_branch.
16671         (ix86_attribute_table): Add indirect_branch.
16672         * config/i386/i386.h (machine_function): Add indirect_branch_type
16673         and has_local_indirect_jump.
16674         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16675         to true.
16676         (tablejump): Likewise.
16677         (*indirect_jump): Use ix86_output_indirect_jmp.
16678         (*tablejump_1): Likewise.
16679         (simple_return_indirect_internal): Likewise.
16680         * config/i386/i386.opt (mindirect-branch=): New option.
16681         (indirect_branch): New.
16682         (keep): Likewise.
16683         (thunk): Likewise.
16684         (thunk-inline): Likewise.
16685         (thunk-extern): Likewise.
16686         * doc/extend.texi: Document indirect_branch function attribute.
16687         * doc/invoke.texi: Document -mindirect-branch= option.
16689 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
16691         PR ipa/83051
16692         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16694 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
16696         * ipa-inline.c (want_inline_small_function_p): Return false if
16697         inlining has already failed with CIF_FINAL_ERROR.
16698         (update_caller_keys): Call want_inline_small_function_p before
16699         can_inline_edge_p.
16700         (update_callee_keys): Likewise.
16702 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16704         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16705         New function.
16706         (rs6000_quadword_masked_address_p): Likewise.
16707         (quad_aligned_load_p): Likewise.
16708         (quad_aligned_store_p): Likewise.
16709         (const_load_sequence_p): Add comment to describe the outer-most loop.
16710         (mimic_memory_attributes_and_flags): New function.
16711         (rs6000_gen_stvx): Likewise.
16712         (replace_swapped_aligned_store): Likewise.
16713         (rs6000_gen_lvx): Likewise.
16714         (replace_swapped_aligned_load): Likewise.
16715         (replace_swapped_load_constant): Capitalize argument name in
16716         comment describing this function.
16717         (rs6000_analyze_swaps): Add a third pass to search for vector loads
16718         and stores that access quad-word aligned addresses and replace
16719         with stvx or lvx instructions when appropriate.
16720         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16721         New function prototype.
16722         (rs6000_quadword_masked_address_p): Likewise.
16723         (rs6000_gen_lvx): Likewise.
16724         (rs6000_gen_stvx): Likewise.
16725         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16726         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16727         when memory address is aligned.
16728         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16729         this split to select lvx instruction when memory address is aligned.
16730         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16731         instruction when memory address is aligned.
16732         (*vsx_le_perm_load_v16qi): Likewise.
16733         (four unnamed splitters): Modify to select the stvx instruction
16734         when memory is aligned.
16736 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
16738         * predict.c (determine_unlikely_bbs): Handle correctly BBs
16739         which appears in the queue multiple times.
16741 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16742             Alan Hayward  <alan.hayward@arm.com>
16743             David Sherwood  <david.sherwood@arm.com>
16745         * tree-vectorizer.h (vec_lower_bound): New structure.
16746         (_loop_vec_info): Add check_nonzero and lower_bounds.
16747         (LOOP_VINFO_CHECK_NONZERO): New macro.
16748         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16749         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16750         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16751         fields.  Make seg_len the distance travelled, not including the
16752         access size.
16753         (dr_direction_indicator): Declare.
16754         (dr_zero_step_indicator): Likewise.
16755         (dr_known_forward_stride_p): Likewise.
16756         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16757         tree-ssanames.h.
16758         (runtime_alias_check_p): Allow runtime alias checks with
16759         variable strides.
16760         (operator ==): Compare access_size and align.
16761         (prune_runtime_alias_test_list): Rework for new distinction between
16762         the access_size and seg_len.
16763         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
16764         segment lengths.
16765         (get_segment_min_max): New function.
16766         (create_intersect_range_checks): Use it.
16767         (dr_step_indicator): New function.
16768         (dr_direction_indicator): Likewise.
16769         (dr_zero_step_indicator): Likewise.
16770         (dr_known_forward_stride_p): Likewise.
16771         * tree-loop-distribution.c (data_ref_segment_size): Return
16772         DR_STEP * (niters - 1).
16773         (compute_alias_check_pairs): Update call to the dr_with_seg_len
16774         constructor.
16775         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16776         (vect_preserves_scalar_order_p): New function, split out from...
16777         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
16778         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16779         (vect_vfa_access_size): New function.
16780         (vect_vfa_align): Likewise.
16781         (vect_compile_time_alias): Take access_size_a and access_b arguments.
16782         (dump_lower_bound): New function.
16783         (vect_check_lower_bound): Likewise.
16784         (vect_small_gap_p): Likewise.
16785         (vectorizable_with_step_bound_p): Likewise.
16786         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16787         depencies if the vectorization factor is 1.  Convert the checks
16788         for nonzero steps into checks on the bounds of DR_STEP.  Try using
16789         a bunds check for variable steps if the minimum required step is
16790         relatively small. Update calls to the dr_with_seg_len
16791         constructor and to vect_compile_time_alias.
16792         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16793         function.
16794         (vect_loop_versioning): Call it.
16795         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16796         when retrying.
16797         (vect_estimate_min_profitable_iters): Account for any bounds checks.
16799 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16800             Alan Hayward  <alan.hayward@arm.com>
16801             David Sherwood  <david.sherwood@arm.com>
16803         * doc/sourcebuild.texi (vect_scatter_store): Document.
16804         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16805         optabs.
16806         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16807         Document.
16808         * genopinit.c (main): Add supports_vec_scatter_store and
16809         supports_vec_scatter_store_cached to target_optabs.
16810         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16811         IFN_MASK_SCATTER_STORE.
16812         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16813         functions.
16814         * internal-fn.h (internal_store_fn_p): Declare.
16815         (internal_fn_stored_value_index): Likewise.
16816         * internal-fn.c (scatter_store_direct): New macro.
16817         (expand_scatter_store_optab_fn): New function.
16818         (direct_scatter_store_optab_supported_p): New macro.
16819         (internal_store_fn_p): New function.
16820         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16821         IFN_MASK_SCATTER_STORE.
16822         (internal_fn_mask_index): Likewise.
16823         (internal_fn_stored_value_index): New function.
16824         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16825         for scatter stores.
16826         * optabs-query.h (supports_vec_scatter_store_p): Declare.
16827         * optabs-query.c (supports_vec_scatter_store_p): New function.
16828         * tree-vectorizer.h (vect_get_store_rhs): Declare.
16829         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16830         true for scatter stores.
16831         (vect_gather_scatter_fn_p): Handle scatter stores too.
16832         (vect_check_gather_scatter): Consider using scatter stores if
16833         supports_vec_scatter_store_p.
16834         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16835         scatter stores too.
16836         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16837         internal_fn_stored_value_index.
16838         (check_load_store_masking): Handle scatter stores too.
16839         (vect_get_store_rhs): Make public.
16840         (vectorizable_call): Use internal_store_fn_p.
16841         (vectorizable_store): Handle scatter store internal functions.
16842         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16843         when deciding whether the end of the group has been reached.
16844         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16845         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16846         (mask_scatter_store<mode>): New insns.
16848 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16849             Alan Hayward  <alan.hayward@arm.com>
16850             David Sherwood  <david.sherwood@arm.com>
16852         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16853         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16854         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16855         function.
16856         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16857         Use vect_truncate_gather_scatter_offset if we can't treat the
16858         operation as a normal gather load or scatter store.
16859         (get_group_load_store_type): Take the gather_scatter_info
16860         as argument.  Try using a gather load or scatter store for
16861         single-element groups.
16862         (get_load_store_type): Update calls to get_group_load_store_type
16863         and vect_use_strided_gather_scatters_p.
16865 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16866             Alan Hayward  <alan.hayward@arm.com>
16867             David Sherwood  <david.sherwood@arm.com>
16869         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16870         optional tree argument.
16871         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16872         null target hooks.
16873         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16874         but continue to use the current value as a fallback.
16875         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16876         to compare the updates.
16877         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16878         (get_load_store_type): Use it when handling a strided access.
16879         (vect_get_strided_load_store_ops): New function.
16880         (vect_get_data_ptr_increment): Likewise.
16881         (vectorizable_load): Handle strided gather loads.  Always pass
16882         a step to vect_create_data_ref_ptr and bump_vector_ptr.
16884 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16885             Alan Hayward  <alan.hayward@arm.com>
16886             David Sherwood  <david.sherwood@arm.com>
16888         * doc/md.texi (gather_load@var{m}): Document.
16889         (mask_gather_load@var{m}): Likewise.
16890         * genopinit.c (main): Add supports_vec_gather_load and
16891         supports_vec_gather_load_cached to target_optabs.
16892         * optabs-tree.c (init_tree_optimization_optabs): Use
16893         ggc_cleared_alloc to allocate target_optabs.
16894         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16895         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16896         functions.
16897         * internal-fn.h (internal_load_fn_p): Declare.
16898         (internal_gather_scatter_fn_p): Likewise.
16899         (internal_fn_mask_index): Likewise.
16900         (internal_gather_scatter_fn_supported_p): Likewise.
16901         * internal-fn.c (gather_load_direct): New macro.
16902         (expand_gather_load_optab_fn): New function.
16903         (direct_gather_load_optab_supported_p): New macro.
16904         (direct_internal_fn_optab): New function.
16905         (internal_load_fn_p): Likewise.
16906         (internal_gather_scatter_fn_p): Likewise.
16907         (internal_fn_mask_index): Likewise.
16908         (internal_gather_scatter_fn_supported_p): Likewise.
16909         * optabs-query.c (supports_at_least_one_mode_p): New function.
16910         (supports_vec_gather_load_p): Likewise.
16911         * optabs-query.h (supports_vec_gather_load_p): Declare.
16912         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16913         and memory_type field.
16914         (NUM_PATTERNS): Bump to 15.
16915         * tree-vect-data-refs.c: Include internal-fn.h.
16916         (vect_gather_scatter_fn_p): New function.
16917         (vect_describe_gather_scatter_call): Likewise.
16918         (vect_check_gather_scatter): Try using internal functions for
16919         gather loads.  Recognize existing calls to a gather load function.
16920         (vect_analyze_data_refs): Consider using gather loads if
16921         supports_vec_gather_load_p.
16922         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16923         (vect_get_gather_scatter_offset_type): Likewise.
16924         (vect_convert_mask_for_vectype): Likewise.
16925         (vect_add_conversion_to_patterm): Likewise.
16926         (vect_try_gather_scatter_pattern): Likewise.
16927         (vect_recog_gather_scatter_pattern): New pattern recognizer.
16928         (vect_vect_recog_func_ptrs): Add it.
16929         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16930         internal_fn_mask_index and internal_gather_scatter_fn_p.
16931         (check_load_store_masking): Take the gather_scatter_info as an
16932         argument and handle gather loads.
16933         (vect_get_gather_scatter_ops): New function.
16934         (vectorizable_call): Check internal_load_fn_p.
16935         (vectorizable_load): Likewise.  Handle gather load internal
16936         functions.
16937         (vectorizable_store): Update call to check_load_store_masking.
16938         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16939         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16940         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16941         (aarch64_gather_scale_operand_d): New predicates.
16942         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16943         (mask_gather_load<mode>): New insns.
16945 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16946             Alan Hayward  <alan.hayward@arm.com>
16947             David Sherwood  <david.sherwood@arm.com>
16949         * optabs.def (fold_left_plus_optab): New optab.
16950         * doc/md.texi (fold_left_plus_@var{m}): Document.
16951         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16952         * internal-fn.c (fold_left_direct): Define.
16953         (expand_fold_left_optab_fn): Likewise.
16954         (direct_fold_left_optab_supported_p): Likewise.
16955         * fold-const-call.c (fold_const_fold_left): New function.
16956         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16957         * tree-parloops.c (valid_reduction_p): New function.
16958         (gather_scalar_reductions): Use it.
16959         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16960         (vect_finish_replace_stmt): Declare.
16961         * tree-vect-loop.c (fold_left_reduction_fn): New function.
16962         (needs_fold_left_reduction_p): New function, split out from...
16963         (vect_is_simple_reduction): ...here.  Accept reductions that
16964         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16965         (vect_force_simple_reduction): Also store the reduction type in
16966         the assignment's STMT_VINFO_REDUC_TYPE.
16967         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16968         (merge_with_identity): New function.
16969         (vect_expand_fold_left): Likewise.
16970         (vectorize_fold_left_reduction): Likewise.
16971         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
16972         scalar phi in place for it.  Check for target support and reject
16973         cases that would reassociate the operation.  Defer the transform
16974         phase to vectorize_fold_left_reduction.
16975         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16976         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16977         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16979 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16981         * tree-if-conv.c (predicate_mem_writes): Remove redundant
16982         call to ifc_temp_var.
16984 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16985             Alan Hayward  <alan.hayward@arm.com>
16986             David Sherwood  <david.sherwood@arm.com>
16988         * target.def (legitimize_address_displacement): Take the original
16989         offset as a poly_int.
16990         * targhooks.h (default_legitimize_address_displacement): Update
16991         accordingly.
16992         * targhooks.c (default_legitimize_address_displacement): Likewise.
16993         * doc/tm.texi: Regenerate.
16994         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16995         as an argument, moving assert of ad->disp == ad->disp_term to...
16996         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
16997         Try calling targetm.legitimize_address_displacement before expanding
16998         the address rather than afterwards, and adjust for the new interface.
16999         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17000         Match the new hook interface.  Handle SVE addresses.
17001         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17002         new hook interface.
17004 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17006         * Makefile.in (OBJS): Add early-remat.o.
17007         * target.def (select_early_remat_modes): New hook.
17008         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17009         * doc/tm.texi: Regenerate.
17010         * targhooks.h (default_select_early_remat_modes): Declare.
17011         * targhooks.c (default_select_early_remat_modes): New function.
17012         * timevar.def (TV_EARLY_REMAT): New timevar.
17013         * passes.def (pass_early_remat): New pass.
17014         * tree-pass.h (make_pass_early_remat): Declare.
17015         * early-remat.c: New file.
17016         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17017         function.
17018         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
17020 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17021             Alan Hayward  <alan.hayward@arm.com>
17022             David Sherwood  <david.sherwood@arm.com>
17024         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17025         vfm1 with a bound_epilog parameter.
17026         (vect_do_peeling): Update calls accordingly, and move the prologue
17027         call earlier in the function.  Treat the base bound_epilog as 0 for
17028         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
17029         this base when peeling for gaps.
17030         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17031         with fully-masked loops.
17032         (vect_estimate_min_profitable_iters): Handle the single peeled
17033         iteration in that case.
17035 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17036             Alan Hayward  <alan.hayward@arm.com>
17037             David Sherwood  <david.sherwood@arm.com>
17039         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17040         single-element interleaving even if the size is not a power of 2.
17041         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17042         accesses for single-element interleaving if the group size is
17043         not a power of 2.
17045 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17046             Alan Hayward  <alan.hayward@arm.com>
17047             David Sherwood  <david.sherwood@arm.com>
17049         * doc/md.texi (fold_extract_last_@var{m}): Document.
17050         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17051         * optabs.def (fold_extract_last_optab): New optab.
17052         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17053         * internal-fn.c (fold_extract_direct): New macro.
17054         (expand_fold_extract_optab_fn): Likewise.
17055         (direct_fold_extract_optab_supported_p): Likewise.
17056         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17057         * tree-vect-loop.c (vect_model_reduction_cost): Handle
17058         EXTRACT_LAST_REDUCTION.
17059         (get_initial_def_for_reduction): Do not create an initial vector
17060         for EXTRACT_LAST_REDUCTION reductions.
17061         (vectorizable_reduction): Leave the scalar phi in place for
17062         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
17063         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
17064         epilogue code for EXTRACT_LAST_REDUCTION and defer the
17065         transform phase to vectorizable_condition.
17066         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17067         split out from...
17068         (vect_finish_stmt_generation): ...here.
17069         (vect_finish_replace_stmt): New function.
17070         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17071         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17072         pattern.
17073         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17075 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17076             Alan Hayward  <alan.hayward@arm.com>
17077             David Sherwood  <david.sherwood@arm.com>
17079         * doc/md.texi (extract_last_@var{m}): Document.
17080         * optabs.def (extract_last_optab): New optab.
17081         * internal-fn.def (EXTRACT_LAST): New internal function.
17082         * internal-fn.c (cond_unary_direct): New macro.
17083         (expand_cond_unary_optab_fn): Likewise.
17084         (direct_cond_unary_optab_supported_p): Likewise.
17085         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17086         loops using EXTRACT_LAST.
17087         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17088         (extract_last_<mode>): ...this optab.
17089         (vec_extract<mode><Vel>): Update accordingly.
17091 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17092             Alan Hayward  <alan.hayward@arm.com>
17093             David Sherwood  <david.sherwood@arm.com>
17095         * target.def (empty_mask_is_expensive): New hook.
17096         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17097         * doc/tm.texi: Regenerate.
17098         * targhooks.h (default_empty_mask_is_expensive): Declare.
17099         * targhooks.c (default_empty_mask_is_expensive): New function.
17100         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17101         if the target says that empty masks are expensive.
17102         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17103         New function.
17104         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17106 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17107             Alan Hayward  <alan.hayward@arm.com>
17108             David Sherwood  <david.sherwood@arm.com>
17110         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17111         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17112         (vect_use_loop_mask_for_alignment_p): New function.
17113         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17114         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17115         niters_skip argument.  Make sure that the first niters_skip elements
17116         of the first iteration are inactive.
17117         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17118         Update call to vect_set_loop_masks_directly.
17119         (get_misalign_in_elems): New function, split out from...
17120         (vect_gen_prolog_loop_niters): ...here.
17121         (vect_update_init_of_dr): Take a code argument that specifies whether
17122         the adjustment should be added or subtracted.
17123         (vect_update_init_of_drs): Likewise.
17124         (vect_prepare_for_masked_peels): New function.
17125         (vect_do_peeling): Skip prologue peeling if we're using a mask
17126         instead.  Update call to vect_update_inits_of_drs.
17127         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17128         mask_skip_niters.
17129         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17130         alignment.  Do not include the number of peeled iterations in
17131         the minimum threshold in that case.
17132         (vectorizable_induction): Adjust the start value down by
17133         LOOP_VINFO_MASK_SKIP_NITERS iterations.
17134         (vect_transform_loop): Call vect_prepare_for_masked_peels.
17135         Take the number of skipped iterations into account when calculating
17136         the loop bounds.
17137         * tree-vect-stmts.c (vect_gen_while_not): New function.
17139 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17140             Alan Hayward  <alan.hayward@arm.com>
17141             David Sherwood  <david.sherwood@arm.com>
17143         * doc/sourcebuild.texi (vect_fully_masked): Document.
17144         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17145         default value to 0.
17146         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17147         split out from...
17148         (vect_analyze_loop_2): ...here. Don't check the vectorization
17149         factor against the number of loop iterations if the loop is
17150         fully-masked.
17152 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17153             Alan Hayward  <alan.hayward@arm.com>
17154             David Sherwood  <david.sherwood@arm.com>
17156         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17157         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17158         (dump_groups): Update accordingly.
17159         (iv_use::mem_type): New member variable.
17160         (address_p): New function.
17161         (record_use): Add a mem_type argument and initialize the new
17162         mem_type field.
17163         (record_group_use): Add a mem_type argument.  Use address_p.
17164         Remove obsolete null checks of base_object.  Update call to record_use.
17165         (find_interesting_uses_op): Update call to record_group_use.
17166         (find_interesting_uses_cond): Likewise.
17167         (find_interesting_uses_address): Likewise.
17168         (get_mem_type_for_internal_fn): New function.
17169         (find_address_like_use): Likewise.
17170         (find_interesting_uses_stmt): Try find_address_like_use before
17171         calling find_interesting_uses_op.
17172         (addr_offset_valid_p): Use the iv mem_type field as the type
17173         of the addressed memory.
17174         (add_autoinc_candidates): Likewise.
17175         (get_address_cost): Likewise.
17176         (split_small_address_groups_p): Use address_p.
17177         (split_address_groups): Likewise.
17178         (add_iv_candidate_for_use): Likewise.
17179         (autoinc_possible_for_pair): Likewise.
17180         (rewrite_groups): Likewise.
17181         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17182         (determine_group_iv_cost): Update after split of USE_ADDRESS.
17183         (get_alias_ptr_type_for_ptr_address): New function.
17184         (rewrite_use_address): Rewrite address uses in calls that were
17185         identified by find_address_like_use.
17187 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17188             Alan Hayward  <alan.hayward@arm.com>
17189             David Sherwood  <david.sherwood@arm.com>
17191         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17192         TARGET_MEM_REFs.
17193         * gimple-expr.h (is_gimple_addressable: Likewise.
17194         * gimple-expr.c (is_gimple_address): Likewise.
17195         * internal-fn.c (expand_call_mem_ref): New function.
17196         (expand_mask_load_optab_fn): Use it.
17197         (expand_mask_store_optab_fn): Likewise.
17199 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17200             Alan Hayward  <alan.hayward@arm.com>
17201             David Sherwood  <david.sherwood@arm.com>
17203         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17204         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17205         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17206         (cond_umax@var{mode}): Document.
17207         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17208         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17209         (cond_umin_optab, cond_umax_optab): New optabs.
17210         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17211         (COND_IOR, COND_XOR): New internal functions.
17212         * internal-fn.h (get_conditional_internal_fn): Declare.
17213         * internal-fn.c (cond_binary_direct): New macro.
17214         (expand_cond_binary_optab_fn): Likewise.
17215         (direct_cond_binary_optab_supported_p): Likewise.
17216         (get_conditional_internal_fn): New function.
17217         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17218         Cope with reduction statements that are vectorized as calls rather
17219         than assignments.
17220         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17221         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17222         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17223         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17224         (UNSPEC_COND_EOR): New unspecs.
17225         (optab): Add mappings for them.
17226         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17227         (sve_int_op, sve_fp_op): New int attributes.
17229 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17230             Alan Hayward  <alan.hayward@arm.com>
17231             David Sherwood  <david.sherwood@arm.com>
17233         * optabs.def (while_ult_optab): New optab.
17234         * doc/md.texi (while_ult@var{m}@var{n}): Document.
17235         * internal-fn.def (WHILE_ULT): New internal function.
17236         * internal-fn.h (direct_internal_fn_supported_p): New override
17237         that takes two types as argument.
17238         * internal-fn.c (while_direct): New macro.
17239         (expand_while_optab_fn): New function.
17240         (convert_optab_supported_p): Likewise.
17241         (direct_while_optab_supported_p): New macro.
17242         * wide-int.h (wi::udiv_ceil): New function.
17243         * tree-vectorizer.h (rgroup_masks): New structure.
17244         (vec_loop_masks): New typedef.
17245         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
17246         and fully_masked_p.
17247         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
17248         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
17249         (vect_max_vf): New function.
17250         (slpeel_make_loop_iterate_ntimes): Delete.
17251         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
17252         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
17253         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
17254         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
17255         internal-fn.h, stor-layout.h and optabs-query.h.
17256         (vect_set_loop_mask): New function.
17257         (add_preheader_seq): Likewise.
17258         (add_header_seq): Likewise.
17259         (interleave_supported_p): Likewise.
17260         (vect_maybe_permute_loop_masks): Likewise.
17261         (vect_set_loop_masks_directly): Likewise.
17262         (vect_set_loop_condition_masked): Likewise.
17263         (vect_set_loop_condition_unmasked): New function, split out from
17264         slpeel_make_loop_iterate_ntimes.
17265         (slpeel_make_loop_iterate_ntimes): Rename to..
17266         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
17267         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
17268         (vect_do_peeling): Update call accordingly.
17269         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
17270         loops.
17271         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17272         mask_compare_type, can_fully_mask_p and fully_masked_p.
17273         (release_vec_loop_masks): New function.
17274         (_loop_vec_info): Use it to free the loop masks.
17275         (can_produce_all_loop_masks_p): New function.
17276         (vect_get_max_nscalars_per_iter): Likewise.
17277         (vect_verify_full_masking): Likewise.
17278         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
17279         retries, and free the mask rgroups before retrying.  Check loop-wide
17280         reasons for disallowing fully-masked loops.  Make the final decision
17281         about whether use a fully-masked loop or not.
17282         (vect_estimate_min_profitable_iters): Do not assume that peeling
17283         for the number of iterations will be needed for fully-masked loops.
17284         (vectorizable_reduction): Disable fully-masked loops.
17285         (vectorizable_live_operation): Likewise.
17286         (vect_halve_mask_nunits): New function.
17287         (vect_double_mask_nunits): Likewise.
17288         (vect_record_loop_mask): Likewise.
17289         (vect_get_loop_mask): Likewise.
17290         (vect_transform_loop): Handle the case in which the final loop
17291         iteration might handle a partial vector.  Call vect_set_loop_condition
17292         instead of slpeel_make_loop_iterate_ntimes.
17293         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
17294         (check_load_store_masking): New function.
17295         (prepare_load_store_mask): Likewise.
17296         (vectorizable_store): Handle fully-masked loops.
17297         (vectorizable_load): Likewise.
17298         (supportable_widening_operation): Use vect_halve_mask_nunits for
17299         booleans.
17300         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
17301         (vect_gen_while): New function.
17302         * config/aarch64/aarch64.md (umax<mode>3): New expander.
17303         (aarch64_uqdec<mode>): New insn.
17305 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17306             Alan Hayward  <alan.hayward@arm.com>
17307             David Sherwood  <david.sherwood@arm.com>
17309         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
17310         (reduc_xor_scal_optab): New optabs.
17311         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
17312         (reduc_xor_scal_@var{m}): Document.
17313         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
17314         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17315         internal functions.
17316         * fold-const-call.c (fold_const_call): Handle them.
17317         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17318         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17319         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17320         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17321         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17322         (UNSPEC_XORV): New unspecs.
17323         (optab): Add entries for them.
17324         (BITWISEV): New int iterator.
17325         (bit_reduc_op): New int attributes.
17327 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17328             Alan Hayward  <alan.hayward@arm.com>
17329             David Sherwood  <david.sherwood@arm.com>
17331         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17332         * internal-fn.def (VEC_SHL_INSERT): New internal function.
17333         * optabs.def (vec_shl_insert_optab): New optab.
17334         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17335         (duplicate_and_interleave): Likewise.
17336         * tree-vect-loop.c: Include internal-fn.h.
17337         (neutral_op_for_slp_reduction): New function, split out from
17338         get_initial_defs_for_reduction.
17339         (get_initial_def_for_reduction): Handle option 2 for variable-length
17340         vectors by loading the neutral value into a vector and then shifting
17341         the initial value into element 0.
17342         (get_initial_defs_for_reduction): Replace the code argument with
17343         the neutral value calculated by neutral_op_for_slp_reduction.
17344         Use gimple_build_vector for constant-length vectors.
17345         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17346         but the first group_size elements have a neutral value.
17347         Use duplicate_and_interleave otherwise.
17348         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17349         Update call to get_initial_defs_for_reduction.  Handle SLP
17350         reductions for variable-length vectors by creating one vector
17351         result for each scalar result, with the elements associated
17352         with other scalar results stubbed out with the neutral value.
17353         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17354         Require IFN_VEC_SHL_INSERT for double reductions on
17355         variable-length vectors, or SLP reductions that have
17356         a neutral value.  Require can_duplicate_and_interleave_p
17357         support for variable-length unchained SLP reductions if there
17358         is no neutral value, such as for MIN/MAX reductions.  Also require
17359         the number of vector elements to be a multiple of the number of
17360         SLP statements when doing variable-length unchained SLP reductions.
17361         Update call to vect_create_epilog_for_reduction.
17362         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17363         and remove initial values.
17364         (duplicate_and_interleave): Make public.
17365         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17366         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17368 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17369             Alan Hayward  <alan.hayward@arm.com>
17370             David Sherwood  <david.sherwood@arm.com>
17372         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17373         (can_duplicate_and_interleave_p): New function.
17374         (vect_get_and_check_slp_defs): Take the vector of statements
17375         rather than just the current one.  Remove excess parentheses.
17376         Restriction rejectinon of vect_constant_def and vect_external_def
17377         for variable-length vectors to boolean types, or types for which
17378         can_duplicate_and_interleave_p is false.
17379         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17380         (duplicate_and_interleave): New function.
17381         (vect_get_constant_vectors): Use gimple_build_vector for
17382         constant-length vectors and suitable variable-length constant
17383         vectors.  Use duplicate_and_interleave for other variable-length
17384         vectors.  Don't defer the update when inserting new statements.
17386 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17387             Alan Hayward  <alan.hayward@arm.com>
17388             David Sherwood  <david.sherwood@arm.com>
17390         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17391         min_profitable_iters doesn't go negative.
17393 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17394             Alan Hayward  <alan.hayward@arm.com>
17395             David Sherwood  <david.sherwood@arm.com>
17397         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17398         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17399         * optabs.def (vec_mask_load_lanes_optab): New optab.
17400         (vec_mask_store_lanes_optab): Likewise.
17401         * internal-fn.def (MASK_LOAD_LANES): New internal function.
17402         (MASK_STORE_LANES): Likewise.
17403         * internal-fn.c (mask_load_lanes_direct): New macro.
17404         (mask_store_lanes_direct): Likewise.
17405         (expand_mask_load_optab_fn): Handle masked operations.
17406         (expand_mask_load_lanes_optab_fn): New macro.
17407         (expand_mask_store_optab_fn): Handle masked operations.
17408         (expand_mask_store_lanes_optab_fn): New macro.
17409         (direct_mask_load_lanes_optab_supported_p): Likewise.
17410         (direct_mask_store_lanes_optab_supported_p): Likewise.
17411         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17412         parameter.
17413         (vect_load_lanes_supported): Likewise.
17414         * tree-vect-data-refs.c (strip_conversion): New function.
17415         (can_group_stmts_p): Likewise.
17416         (vect_analyze_data_ref_accesses): Use it instead of checking
17417         for a pair of assignments.
17418         (vect_store_lanes_supported): Take a masked_p parameter.
17419         (vect_load_lanes_supported): Likewise.
17420         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17421         vect_store_lanes_supported and vect_load_lanes_supported.
17422         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17423         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17424         parameter.  Don't allow gaps for masked accesses.
17425         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
17426         and vect_load_lanes_supported.
17427         (get_load_store_type): Take a masked_p parameter and update
17428         call to get_group_load_store_type.
17429         (vectorizable_store): Update call to get_load_store_type.
17430         Handle IFN_MASK_STORE_LANES.
17431         (vectorizable_load): Update call to get_load_store_type.
17432         Handle IFN_MASK_LOAD_LANES.
17434 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17435             Alan Hayward  <alan.hayward@arm.com>
17436             David Sherwood  <david.sherwood@arm.com>
17438         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17439         modes for SVE.
17440         * config/aarch64/aarch64-protos.h
17441         (aarch64_sve_struct_memory_operand_p): Declare.
17442         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17443         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17444         (VPRED, vpred): Handle SVE structure modes.
17445         * config/aarch64/constraints.md (Utx): New constraint.
17446         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17447         (aarch64_sve_struct_nonimmediate_operand): New predicates.
17448         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17449         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17450         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17451         structure modes.  Split into pieces after RA.
17452         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17453         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17454         New patterns.
17455         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17456         SVE structure modes.
17457         (aarch64_classify_address): Likewise.
17458         (sizetochar): Move earlier in file.
17459         (aarch64_print_operand): Handle SVE register lists.
17460         (aarch64_array_mode): New function.
17461         (aarch64_sve_struct_memory_operand_p): Likewise.
17462         (TARGET_ARRAY_MODE): Redefine.
17464 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17465             Alan Hayward  <alan.hayward@arm.com>
17466             David Sherwood  <david.sherwood@arm.com>
17468         * target.def (array_mode): New target hook.
17469         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17470         * doc/tm.texi: Regenerate.
17471         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17472         * hooks.c (hook_optmode_mode_uhwi_none): New function.
17473         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17474         targetm.array_mode.
17475         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
17476         type sizes.
17478 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17479             Alan Hayward  <alan.hayward@arm.com>
17480             David Sherwood  <david.sherwood@arm.com>
17482         * fold-const.c (fold_binary_loc): Check the argument types
17483         rather than the result type when testing for a vector operation.
17485 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17487         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17488         * doc/tm.texi: Regenerate.
17490 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17491             Alan Hayward  <alan.hayward@arm.com>
17492             David Sherwood  <david.sherwood@arm.com>
17494         * doc/invoke.texi (-msve-vector-bits=): Document new option.
17495         (sve): Document new AArch64 extension.
17496         * doc/md.texi (w): Extend the description of the AArch64
17497         constraint to include SVE vectors.
17498         (Upl, Upa): Document new AArch64 predicate constraints.
17499         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17500         enum.
17501         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17502         (msve-vector-bits=): New option.
17503         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17504         SVE when these are disabled.
17505         (sve): New extension.
17506         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17507         modes.  Adjust their number of units based on aarch64_sve_vg.
17508         (MAX_BITSIZE_MODE_ANY_MODE): Define.
17509         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17510         aarch64_addr_query_type.
17511         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17512         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17513         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17514         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17515         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17516         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17517         (aarch64_simd_imm_zero_p): Delete.
17518         (aarch64_check_zero_based_sve_index_immediate): Declare.
17519         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17520         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17521         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17522         (aarch64_sve_float_mul_immediate_p): Likewise.
17523         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17524         rather than an rtx.
17525         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17526         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17527         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17528         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17529         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17530         (aarch64_regmode_natural_size): Likewise.
17531         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17532         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17533         left one place.
17534         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17535         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17536         for VG and the SVE predicate registers.
17537         (V_ALIASES): Add a "z"-prefixed alias.
17538         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17539         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17540         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17541         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17542         (REG_CLASS_NAMES): Add entries for them.
17543         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
17544         and the predicate registers.
17545         (aarch64_sve_vg): Declare.
17546         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17547         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17548         (REGMODE_NATURAL_SIZE): Define.
17549         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17550         SVE macros.
17551         * config/aarch64/aarch64.c: Include cfgrtl.h.
17552         (simd_immediate_info): Add a constructor for series vectors,
17553         and an associated step field.
17554         (aarch64_sve_vg): New variable.
17555         (aarch64_dbx_register_number): Handle VG and the predicate registers.
17556         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17557         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17558         (VEC_ANY_DATA, VEC_STRUCT): New constants.
17559         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17560         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17561         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17562         (aarch64_get_mask_mode): New functions.
17563         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17564         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17565         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
17566         predicate modes and predicate registers.  Explicitly restrict
17567         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
17568         to store a vector mode if it is recognized by
17569         aarch64_classify_vector_mode.
17570         (aarch64_regmode_natural_size): New function.
17571         (aarch64_hard_regno_caller_save_mode): Return the original mode
17572         for predicates.
17573         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17574         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17575         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17576         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17577         functions.
17578         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
17579         does not overlap dest if the function is frame-related.  Handle
17580         SVE constants.
17581         (aarch64_split_add_offset): New function.
17582         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17583         them aarch64_add_offset.
17584         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17585         and update call to aarch64_sub_sp.
17586         (aarch64_add_cfa_expression): New function.
17587         (aarch64_expand_prologue): Pass extra temporary registers to the
17588         functions above.  Handle the case in which we need to emit new
17589         DW_CFA_expressions for registers that were originally saved
17590         relative to the stack pointer, but now have to be expressed
17591         relative to the frame pointer.
17592         (aarch64_output_mi_thunk): Pass extra temporary registers to the
17593         functions above.
17594         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
17595         IP0 and IP1 values for SVE frames.
17596         (aarch64_expand_vec_series): New function.
17597         (aarch64_expand_sve_widened_duplicate): Likewise.
17598         (aarch64_expand_sve_const_vector): Likewise.
17599         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17600         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
17601         into the register, rather than emitting a SET directly.
17602         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17603         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17604         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17605         (offset_9bit_signed_scaled_p): New functions.
17606         (aarch64_replicate_bitmask_imm): New function.
17607         (aarch64_bitmask_imm): Use it.
17608         (aarch64_cannot_force_const_mem): Reject expressions involving
17609         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
17610         (aarch64_classify_index): Handle SVE indices, by requiring
17611         a plain register index with a scale that matches the element size.
17612         (aarch64_classify_address): Handle SVE addresses.  Assert that
17613         the mode of the address is VOIDmode or an integer mode.
17614         Update call to aarch64_classify_symbol.
17615         (aarch64_classify_symbolic_expression): Update call to
17616         aarch64_classify_symbol.
17617         (aarch64_const_vec_all_in_range_p): New function.
17618         (aarch64_print_vector_float_operand): Likewise.
17619         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
17620         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
17621         and the FP immediates 1.0 and 0.5.
17622         (aarch64_print_address_internal): Handle SVE addresses.
17623         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17624         (aarch64_regno_regclass): Handle predicate registers.
17625         (aarch64_secondary_reload): Handle big-endian reloads of SVE
17626         data modes.
17627         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17628         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17629         (aarch64_convert_sve_vector_bits): New function.
17630         (aarch64_override_options): Use it to handle -msve-vector-bits=.
17631         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17632         rather than an rtx.
17633         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17634         Handle SVE vector and predicate modes.  Accept VL-based constants
17635         that need only one temporary register, and VL offsets that require
17636         no temporary registers.
17637         (aarch64_conditional_register_usage): Mark the predicate registers
17638         as fixed if SVE isn't available.
17639         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17640         Return true for SVE vector and predicate modes.
17641         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17642         rather than an unsigned int.  Handle SVE modes.
17643         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
17644         SVE modes.
17645         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17646         if SVE is enabled.
17647         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17648         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17649         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17650         (aarch64_sve_float_mul_immediate_p): New functions.
17651         (aarch64_sve_valid_immediate): New function.
17652         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17653         Explicitly reject structure modes.  Check for INDEX constants.
17654         Handle PTRUE and PFALSE constants.
17655         (aarch64_check_zero_based_sve_index_immediate): New function.
17656         (aarch64_simd_imm_zero_p): Delete.
17657         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17658         vector modes.  Accept constants in the range of CNT[BHWD].
17659         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17660         ask for an Advanced SIMD mode.
17661         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17662         (aarch64_simd_vector_alignment): Handle SVE predicates.
17663         (aarch64_vectorize_preferred_vector_alignment): New function.
17664         (aarch64_simd_vector_alignment_reachable): Use it instead of
17665         the vector size.
17666         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17667         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17668         functions.
17669         (MAX_VECT_LEN): Delete.
17670         (expand_vec_perm_d): Add a vec_flags field.
17671         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17672         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17673         (aarch64_evpc_ext): Don't apply a big-endian lane correction
17674         for SVE modes.
17675         (aarch64_evpc_rev): Rename to...
17676         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
17677         (aarch64_evpc_rev_global): New function.
17678         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17679         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17680         MAX_VECT_LEN.
17681         (aarch64_evpc_sve_tbl): New function.
17682         (aarch64_expand_vec_perm_const_1): Update after rename of
17683         aarch64_evpc_rev.  Handle SVE permutes too, trying
17684         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17685         than aarch64_evpc_tbl.
17686         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17687         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17688         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17689         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17690         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17691         (aarch64_expand_sve_vcond): New functions.
17692         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17693         of aarch64_vector_mode_p.
17694         (aarch64_dwarf_poly_indeterminate_value): New function.
17695         (aarch64_compute_pressure_classes): Likewise.
17696         (aarch64_can_change_mode_class): Likewise.
17697         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17698         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17699         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17700         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17701         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17702         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17703         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17704         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17705         constraints.
17706         (Dn, Dl, Dr): Accept const as well as const_vector.
17707         (Dz): Likewise.  Compare against CONST0_RTX.
17708         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17709         of "vector" where appropriate.
17710         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17711         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17712         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17713         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17714         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17715         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17716         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17717         (v_int_equiv): Extend to SVE modes.
17718         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17719         mode attributes.
17720         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17721         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17722         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17723         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17724         (SVE_COND_FP_CMP): New int iterators.
17725         (perm_hilo): Handle the new unpack unspecs.
17726         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17727         attributes.
17728         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17729         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17730         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17731         (aarch64_equality_operator, aarch64_constant_vector_operand)
17732         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17733         (aarch64_sve_nonimmediate_operand): Likewise.
17734         (aarch64_sve_general_operand): Likewise.
17735         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17736         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17737         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17738         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17739         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17740         (aarch64_sve_float_arith_immediate): Likewise.
17741         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17742         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17743         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17744         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17745         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17746         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17747         (aarch64_sve_float_arith_operand): Likewise.
17748         (aarch64_sve_float_arith_with_sub_operand): Likewise.
17749         (aarch64_sve_float_mul_operand): Likewise.
17750         (aarch64_sve_vec_perm_operand): Likewise.
17751         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17752         (aarch64_mov_operand): Accept const_poly_int and const_vector.
17753         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17754         as well as const_vector.
17755         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17756         in file.  Use CONST0_RTX and CONSTM1_RTX.
17757         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
17758         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17759         Use aarch64_simd_imm_zero.
17760         * config/aarch64/aarch64-sve.md: New file.
17761         * config/aarch64/aarch64.md: Include it.
17762         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17763         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17764         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17765         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17766         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17767         (sve): New attribute.
17768         (enabled): Disable instructions with the sve attribute unless
17769         TARGET_SVE.
17770         (movqi, movhi): Pass CONST_POLY_INT operaneds through
17771         aarch64_expand_mov_immediate.
17772         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17773         CNT[BHSD] immediates.
17774         (movti): Split CONST_POLY_INT moves into two halves.
17775         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17776         Split additions that need a temporary here if the destination
17777         is the stack pointer.
17778         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17779         (*add<mode>3_poly_1): New instruction.
17780         (set_clobber_cc): New expander.
17782 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17784         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17785         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
17786         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17787         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17788         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
17789         Change innermode from fixed_mode_size to machine_mode.
17790         (simplify_subreg): Update call accordingly.  Handle a constant-sized
17791         subreg of a variable-length CONST_VECTOR.
17793 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17794             Alan Hayward  <alan.hayward@arm.com>
17795             David Sherwood  <david.sherwood@arm.com>
17797         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17798         (add_offset_to_base): New function, split out from...
17799         (create_mem_ref): ...here.  When handling a scale other than 1,
17800         check first whether the address is valid without the offset.
17801         Add it into the base if so, leaving the index and scale as-is.
17803 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
17805         PR c++/83778
17806         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17807         fold_for_warn before checking if arg2 is INTEGER_CST.
17809 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
17811         * config/rs6000/predicates.md (load_multiple_operation): Delete.
17812         (store_multiple_operation): Delete.
17813         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17814         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17815         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17816         guarded by TARGET_STRING.
17817         (rs6000_output_load_multiple): Delete.
17818         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17819         OPTION_MASK_STRING / TARGET_STRING handling.
17820         (print_operand) <'N', 'O'>: Add comment that these are unused now.
17821         (const rs6000_opt_masks) <"string">: Change mask to 0.
17822         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17823         (MASK_STRING): Delete.
17824         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17825         parts.  Simplify.
17826         (load_multiple): Delete.
17827         (*ldmsi8): Delete.
17828         (*ldmsi7): Delete.
17829         (*ldmsi6): Delete.
17830         (*ldmsi5): Delete.
17831         (*ldmsi4): Delete.
17832         (*ldmsi3): Delete.
17833         (store_multiple): Delete.
17834         (*stmsi8): Delete.
17835         (*stmsi7): Delete.
17836         (*stmsi6): Delete.
17837         (*stmsi5): Delete.
17838         (*stmsi4): Delete.
17839         (*stmsi3): Delete.
17840         (movmemsi_8reg): Delete.
17841         (corresponding unnamed define_insn): Delete.
17842         (movmemsi_6reg): Delete.
17843         (corresponding unnamed define_insn): Delete.
17844         (movmemsi_4reg): Delete.
17845         (corresponding unnamed define_insn): Delete.
17846         (movmemsi_2reg): Delete.
17847         (corresponding unnamed define_insn): Delete.
17848         (movmemsi_1reg): Delete.
17849         (corresponding unnamed define_insn): Delete.
17850         * config/rs6000/rs6000.opt (mno-string): New.
17851         (mstring): Replace by deprecation warning stub.
17852         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17854 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
17856         * regrename.c (regrename_do_replace): If replacing the same
17857         reg multiple times, try to reuse last created gen_raw_REG.
17859         PR debug/81155
17860         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17861         main to workaround a bug in GDB.
17863 2018-01-12  Tom de Vries  <tom@codesourcery.com>
17865         PR target/83737
17866         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17868 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
17870         PR rtl-optimization/80481
17871         * ira-color.c (get_cap_member): New function.
17872         (allocnos_conflict_by_live_ranges_p): Use it.
17873         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17874         (setup_slot_coalesced_allocno_live_ranges): Ditto.
17876 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
17878         PR target/83628
17879         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17880         (*saddl_se_1): Ditto.
17881         (*ssubsi_1): Ditto.
17882         (*ssubl_se_1): Ditto.
17884 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17886         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17887         rather than wi::to_widest for DR_INITs.
17888         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17889         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17890         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17891         INTEGER_CSTs.
17892         (vect_analyze_group_access_1): Note that here.
17894 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17896         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17897         polynomial type sizes.
17899 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17901         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17902         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17903         (gimple_add_tmp_var): Likewise.
17905 2018-01-12  Martin Liska  <mliska@suse.cz>
17907         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17908         (gimple_alloc_sizes): Likewise.
17909         (dump_gimple_statistics): Use PRIu64 in printf format.
17910         * gimple.h: Change uint64_t to int.
17912 2018-01-12  Martin Liska  <mliska@suse.cz>
17914         * tree-core.h: Use uint64_t instead of int.
17915         * tree.c (tree_node_counts): Likewise.
17916         (tree_node_sizes): Likewise.
17917         (dump_tree_statistics): Use PRIu64 in printf format.
17919 2018-01-12  Martin Liska  <mliska@suse.cz>
17921         * Makefile.in: As qsort_chk is implemented in vec.c, add
17922         vec.o to linkage of gencfn-macros.
17923         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17924         passing the info to record_node_allocation_statistics.
17925         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17926         and pass the info.
17927         * ggc-common.c (struct ggc_usage): Add operator== and use
17928         it in operator< and compare function.
17929         * mem-stats.h (struct mem_usage): Likewise.
17930         * vec.c (struct vec_usage): Remove operator< and compare
17931         function. Can be simply inherited.
17933 2018-01-12  Martin Jambor  <mjambor@suse.cz>
17935         PR target/81616
17936         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17937         * tree-ssa-math-opts.c: Include domwalk.h.
17938         (convert_mult_to_fma_1): New function.
17939         (fma_transformation_info): New type.
17940         (fma_deferring_state): Likewise.
17941         (cancel_fma_deferring): New function.
17942         (result_of_phi): Likewise.
17943         (last_fma_candidate_feeds_initial_phi): Likewise.
17944         (convert_mult_to_fma): Added deferring logic, split actual
17945         transformation to convert_mult_to_fma_1.
17946         (math_opts_dom_walker): New type.
17947         (math_opts_dom_walker::after_dom_children): New method, body moved
17948         here from pass_optimize_widening_mul::execute, added deferring logic
17949         bits.
17950         (pass_optimize_widening_mul::execute): Moved most of code to
17951         math_opts_dom_walker::after_dom_children.
17952         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17953         * config/i386/i386.c (ix86_option_override_internal): Added
17954         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17956 2018-01-12  Richard Biener  <rguenther@suse.de>
17958         PR debug/83157
17959         * dwarf2out.c (gen_variable_die): Do not reset old_die for
17960         inline instance vars.
17962 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
17964         PR target/81819
17965         * config/rx/rx.c (rx_is_restricted_memory_address):
17966         Handle SUBREG case.
17968 2018-01-12  Richard Biener  <rguenther@suse.de>
17970         PR tree-optimization/80846
17971         * target.def (split_reduction): New target hook.
17972         * targhooks.c (default_split_reduction): New function.
17973         * targhooks.h (default_split_reduction): Declare.
17974         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17975         target requests first reduce vectors by combining low and high
17976         parts.
17977         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17978         (get_vectype_for_scalar_type_and_size): Export.
17979         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17980         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17981         * doc/tm.texi: Regenerate.
17982         * config/i386/i386.c (ix86_split_reduction): Implement
17983         TARGET_VECTORIZE_SPLIT_REDUCTION.
17985 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17987         PR target/83368
17988         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17989         in PIC mode except for TARGET_VXWORKS_RTP.
17990         * config/sparc/sparc.c: Include cfgrtl.h.
17991         (TARGET_INIT_PIC_REG): Define.
17992         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17993         (sparc_pic_register_p): New predicate.
17994         (sparc_legitimate_address_p): Use it.
17995         (sparc_legitimize_pic_address): Likewise.
17996         (sparc_delegitimize_address): Likewise.
17997         (sparc_mode_dependent_address_p): Likewise.
17998         (gen_load_pcrel_sym): Remove 4th parameter.
17999         (load_got_register): Adjust call to above.  Remove obsolete stuff.
18000         (sparc_expand_prologue): Do not call load_got_register here.
18001         (sparc_flat_expand_prologue): Likewise.
18002         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18003         (sparc_use_pseudo_pic_reg): New function.
18004         (sparc_init_pic_reg): Likewise.
18005         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18006         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18008 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
18010         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18011         Add item for branch_cost.
18013 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
18015         PR rtl-optimization/83565
18016         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18017         not extend the result to a larger mode for rotate operations.
18018         (num_sign_bit_copies1): Likewise.
18020 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18022         PR target/40411
18023         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18024         -symbolic.
18025         Use values-Xc.o for -pedantic.
18026         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18028 2018-01-12  Martin Liska  <mliska@suse.cz>
18030         PR ipa/83054
18031         * ipa-devirt.c (final_warning_record::grow_type_warnings):
18032         New function.
18033         (possible_polymorphic_call_targets): Use it.
18034         (ipa_devirt): Likewise.
18036 2018-01-12  Martin Liska  <mliska@suse.cz>
18038         * profile-count.h (enum profile_quality): Use 0 as invalid
18039         enum value of profile_quality.
18041 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
18043         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18044         -mext-string options.
18046 2018-01-12  Richard Biener  <rguenther@suse.de>
18048         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18049         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18050         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18051         Likewise.
18052         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18054 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
18056         * configure.ac (--with-long-double-format): Add support for the
18057         configuration option to change the default long double format on
18058         PowerPC systems.
18059         * config.gcc (powerpc*-linux*-*): Likewise.
18060         * configure: Regenerate.
18061         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18062         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18063         used without modification.
18065 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18067         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18068         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18069         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18070         MISC_BUILTIN_SPEC_BARRIER.
18071         (rs6000_init_builtins): Likewise.
18072         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18073         enum value.
18074         (speculation_barrier): New define_insn.
18075         * doc/extend.texi: Document __builtin_speculation_barrier.
18077 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
18079         PR target/83203
18080         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18081         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18082         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18083         iterators.
18084         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
18085         integral modes instead of "ss" and "sd".
18086         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18087         vectors with 32-bit and 64-bit elements.
18088         (vecdupssescalarmodesuffix): New mode attribute.
18089         (vec_dup<mode>): Use it.
18091 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
18093         PR target/83330
18094         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18095         frame if argument is passed on stack.
18097 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
18099         PR target/82682
18100         * ree.c (combine_reaching_defs): Optimize also
18101         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18102         reg2=any_extend(exp); reg1=reg2;, formatting fix.
18104 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
18106         PR middle-end/83189
18107         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18109 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
18111         PR middle-end/83718
18112         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18113         after they are computed.
18115 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
18117         PR tree-optimization/83695
18118         * gimple-loop-linterchange.cc
18119         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18120         reset cached scev information after interchange.
18121         (pass_linterchange::execute): Remove call to scev_reset_htab.
18123 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18125         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18126         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18127         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18128         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18129         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18130         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18131         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18132         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18133         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18134         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18135         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18136         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18137         (V_lane_reg): Likewise.
18138         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18139         New define_expand.
18140         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18141         (vfmal_lane_low<mode>_intrinsic,
18142         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18143         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18144         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18145         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18146         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18147         vfmsl_lane_high<mode>_intrinsic): New define_insns.
18149 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18151         * config/arm/arm-cpus.in (fp16fml): New feature.
18152         (ALL_SIMD): Add fp16fml.
18153         (armv8.2-a): Add fp16fml as an option.
18154         (armv8.3-a): Likewise.
18155         (armv8.4-a): Add fp16fml as part of fp16.
18156         * config/arm/arm.h (TARGET_FP16FML): Define.
18157         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18158         when appropriate.
18159         * config/arm/arm-modes.def (V2HF): Define.
18160         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18161         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18162         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18163         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18164         vfmsl_low, vfmsl_high): New set of builtins.
18165         * config/arm/iterators.md (PLUSMINUS): New code iterator.
18166         (vfml_op): New code attribute.
18167         (VFMLHALVES): New int iterator.
18168         (VFML, VFMLSEL): New mode attributes.
18169         (V_reg): Define mapping for V2HF.
18170         (V_hi, V_lo): New mode attributes.
18171         (VF_constraint): Likewise.
18172         (vfml_half, vfml_half_selector): New int attributes.
18173         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18174         define_expand.
18175         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18176         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18177         New define_insn.
18178         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18179         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18180         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18181         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
18182         documentation.
18183         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18184         Document new effective target and option set.
18186 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18188         * config/arm/arm-cpus.in (armv8_4): New feature.
18189         (ARMv8_4a): New fgroup.
18190         (armv8.4-a): New arch.
18191         * config/arm/arm-tables.opt: Regenerate.
18192         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18193         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18194         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18195         Add matching rules for -march=armv8.4-a and extensions.
18196         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18198 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
18200         PR target/81821
18201         * config/rx/rx.md (BW): New mode attribute.
18202         (sync_lock_test_and_setsi): Add mode suffix to insn output.
18204 2018-01-11  Richard Biener  <rguenther@suse.de>
18206         PR tree-optimization/83435
18207         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18208         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18209         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
18211 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18212             Alan Hayward  <alan.hayward@arm.com>
18213             David Sherwood  <david.sherwood@arm.com>
18215         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
18216         field.
18217         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
18218         (aarch64_print_address_internal): Use it to check for a zero offset.
18220 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18221             Alan Hayward  <alan.hayward@arm.com>
18222             David Sherwood  <david.sherwood@arm.com>
18224         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18225         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18226         Return a poly_int64 rather than a HOST_WIDE_INT.
18227         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18228         rather than a HOST_WIDE_INT.
18229         * config/aarch64/aarch64.h (aarch64_frame): Protect with
18230         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
18231         hard_fp_offset, frame_size, initial_adjust, callee_offset and
18232         final_offset from HOST_WIDE_INT to poly_int64.
18233         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
18234         to_constant when getting the number of units in an Advanced SIMD
18235         mode.
18236         (aarch64_builtin_vectorized_function): Check for a constant number
18237         of units.
18238         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
18239         GET_MODE_SIZE.
18240         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
18241         attribute instead of GET_MODE_NUNITS.
18242         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
18243         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
18244         GET_MODE_SIZE for fixed-size registers.
18245         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
18246         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
18247         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
18248         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
18249         (aarch64_print_operand, aarch64_print_address_internal)
18250         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
18251         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
18252         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
18253         Handle polynomial GET_MODE_SIZE.
18254         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
18255         wider than SImode without modification.
18256         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
18257         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
18258         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
18259         passing and returning SVE modes.
18260         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
18261         rather than GEN_INT.
18262         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
18263         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
18264         (aarch64_allocate_and_probe_stack_space): Likewise.
18265         (aarch64_layout_frame): Cope with polynomial offsets.
18266         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
18267         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
18268         polynomial offsets.
18269         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
18270         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
18271         poly_int64 rather than a HOST_WIDE_INT.
18272         (aarch64_get_separate_components, aarch64_process_components)
18273         (aarch64_expand_prologue, aarch64_expand_epilogue)
18274         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
18275         (aarch64_anchor_offset): New function, split out from...
18276         (aarch64_legitimize_address): ...here.
18277         (aarch64_builtin_vectorization_cost): Handle polynomial
18278         TYPE_VECTOR_SUBPARTS.
18279         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
18280         GET_MODE_NUNITS.
18281         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
18282         number of elements from the PARALLEL rather than the mode.
18283         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
18284         rather than GET_MODE_BITSIZE.
18285         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
18286         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
18287         (aarch64_expand_vec_perm_const_1): Handle polynomial
18288         d->perm.length () and d->perm elements.
18289         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
18290         Apply to_constant to d->perm elements.
18291         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
18292         polynomial CONST_VECTOR_NUNITS.
18293         (aarch64_move_pointer): Take amount as a poly_int64 rather
18294         than an int.
18295         (aarch64_progress_pointer): Avoid temporary variable.
18296         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
18297         the mode attribute instead of GET_MODE.
18299 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18300             Alan Hayward  <alan.hayward@arm.com>
18301             David Sherwood  <david.sherwood@arm.com>
18303         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
18304         x exists before using it.
18305         (aarch64_add_constant_internal): Rename to...
18306         (aarch64_add_offset_1): ...this.  Replace regnum with separate
18307         src and dest rtxes.  Handle the case in which they're different,
18308         including when the offset is zero.  Replace scratchreg with an rtx.
18309         Use 2 additions if there is no spare register into which we can
18310         move a 16-bit constant.
18311         (aarch64_add_constant): Delete.
18312         (aarch64_add_offset): Replace reg with separate src and dest
18313         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
18314         Use aarch64_add_offset_1.
18315         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18316         an rtx rather than an int.  Take the delta as a poly_int64
18317         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
18318         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18319         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18320         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18321         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18322         and aarch64_add_sp.
18323         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18324         aarch64_add_constant.
18326 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18328         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18329         Use scalar_float_mode.
18331 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18333         * config/aarch64/aarch64-simd.md
18334         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18335         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18336         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18337         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18338         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18339         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18340         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18341         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18342         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18343         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18345 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18347         PR target/83514
18348         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18349         targ_options->x_arm_arch_string is non NULL.
18351 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
18353         * config/aarch64/aarch64.h
18354         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
18356 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
18358         PR target/82096
18359         * expmed.c (emit_store_flag_force): Swap if const op0
18360         and change VOIDmode to mode of op0.
18362 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18364         PR rtl-optimization/83761
18365         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18366         than bytes to mode_for_size.
18368 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18370         PR middle-end/83189
18371         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18372         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18373         profile.
18375 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18377         PR middle-end/83575
18378         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18379         when in layout mode.
18380         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18381         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18382         partition fixup.
18384 2018-01-10  Michael Collison  <michael.collison@arm.com>
18386         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18387         * config/aarch64/aarch64-option-extension.def: Add
18388         AARCH64_OPT_EXTENSION of 'fp16fml'.
18389         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18390         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18391         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18392         * config/aarch64/constraints.md (Ui7): New constraint.
18393         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18394         (VFMLA_SEL_W): Ditto.
18395         (f16quad): Ditto.
18396         (f16mac1): Ditto.
18397         (VFMLA16_LOW): New int iterator.
18398         (VFMLA16_HIGH): Ditto.
18399         (UNSPEC_FMLAL): New unspec.
18400         (UNSPEC_FMLSL): Ditto.
18401         (UNSPEC_FMLAL2): Ditto.
18402         (UNSPEC_FMLSL2): Ditto.
18403         (f16mac): New code attribute.
18404         * config/aarch64/aarch64-simd-builtins.def
18405         (aarch64_fmlal_lowv2sf): Ditto.
18406         (aarch64_fmlsl_lowv2sf): Ditto.
18407         (aarch64_fmlalq_lowv4sf): Ditto.
18408         (aarch64_fmlslq_lowv4sf): Ditto.
18409         (aarch64_fmlal_highv2sf): Ditto.
18410         (aarch64_fmlsl_highv2sf): Ditto.
18411         (aarch64_fmlalq_highv4sf): Ditto.
18412         (aarch64_fmlslq_highv4sf): Ditto.
18413         (aarch64_fmlal_lane_lowv2sf): Ditto.
18414         (aarch64_fmlsl_lane_lowv2sf): Ditto.
18415         (aarch64_fmlal_laneq_lowv2sf): Ditto.
18416         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18417         (aarch64_fmlalq_lane_lowv4sf): Ditto.
18418         (aarch64_fmlsl_lane_lowv4sf): Ditto.
18419         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18420         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18421         (aarch64_fmlal_lane_highv2sf): Ditto.
18422         (aarch64_fmlsl_lane_highv2sf): Ditto.
18423         (aarch64_fmlal_laneq_highv2sf): Ditto.
18424         (aarch64_fmlsl_laneq_highv2sf): Ditto.
18425         (aarch64_fmlalq_lane_highv4sf): Ditto.
18426         (aarch64_fmlsl_lane_highv4sf): Ditto.
18427         (aarch64_fmlalq_laneq_highv4sf): Ditto.
18428         (aarch64_fmlsl_laneq_highv4sf): Ditto.
18429         * config/aarch64/aarch64-simd.md:
18430         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18431         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18432         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18433         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18434         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18435         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18436         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18437         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18438         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18439         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18440         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18441         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18442         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18443         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18444         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18445         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18446         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18447         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18448         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18449         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18450         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18451         (vfmlsl_low_u32): Ditto.
18452         (vfmlalq_low_u32): Ditto.
18453         (vfmlslq_low_u32): Ditto.
18454         (vfmlal_high_u32): Ditto.
18455         (vfmlsl_high_u32): Ditto.
18456         (vfmlalq_high_u32): Ditto.
18457         (vfmlslq_high_u32): Ditto.
18458         (vfmlal_lane_low_u32): Ditto.
18459         (vfmlsl_lane_low_u32): Ditto.
18460         (vfmlal_laneq_low_u32): Ditto.
18461         (vfmlsl_laneq_low_u32): Ditto.
18462         (vfmlalq_lane_low_u32): Ditto.
18463         (vfmlslq_lane_low_u32): Ditto.
18464         (vfmlalq_laneq_low_u32): Ditto.
18465         (vfmlslq_laneq_low_u32): Ditto.
18466         (vfmlal_lane_high_u32): Ditto.
18467         (vfmlsl_lane_high_u32): Ditto.
18468         (vfmlal_laneq_high_u32): Ditto.
18469         (vfmlsl_laneq_high_u32): Ditto.
18470         (vfmlalq_lane_high_u32): Ditto.
18471         (vfmlslq_lane_high_u32): Ditto.
18472         (vfmlalq_laneq_high_u32): Ditto.
18473         (vfmlslq_laneq_high_u32): Ditto.
18474         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18475         (AARCH64_FL_FOR_ARCH8_4): New.
18476         (AARCH64_ISA_F16FML): New ISA flag.
18477         (TARGET_F16FML): New feature flag for fp16fml.
18478         (doc/invoke.texi): Document new fp16fml option.
18480 2018-01-10  Michael Collison  <michael.collison@arm.com>
18482         * config/aarch64/aarch64-builtins.c:
18483         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18484         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18485         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18486         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18487         (AARCH64_ISA_SHA3): New ISA flag.
18488         (TARGET_SHA3): New feature flag for sha3.
18489         * config/aarch64/iterators.md (sha512_op): New int attribute.
18490         (CRYPTO_SHA512): New int iterator.
18491         (UNSPEC_SHA512H): New unspec.
18492         (UNSPEC_SHA512H2): Ditto.
18493         (UNSPEC_SHA512SU0): Ditto.
18494         (UNSPEC_SHA512SU1): Ditto.
18495         * config/aarch64/aarch64-simd-builtins.def
18496         (aarch64_crypto_sha512hqv2di): New builtin.
18497         (aarch64_crypto_sha512h2qv2di): Ditto.
18498         (aarch64_crypto_sha512su0qv2di): Ditto.
18499         (aarch64_crypto_sha512su1qv2di): Ditto.
18500         (aarch64_eor3qv8hi): Ditto.
18501         (aarch64_rax1qv2di): Ditto.
18502         (aarch64_xarqv2di): Ditto.
18503         (aarch64_bcaxqv8hi): Ditto.
18504         * config/aarch64/aarch64-simd.md:
18505         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18506         (aarch64_crypto_sha512su0qv2di): Ditto.
18507         (aarch64_crypto_sha512su1qv2di): Ditto.
18508         (aarch64_eor3qv8hi): Ditto.
18509         (aarch64_rax1qv2di): Ditto.
18510         (aarch64_xarqv2di): Ditto.
18511         (aarch64_bcaxqv8hi): Ditto.
18512         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18513         (vsha512h2q_u64): Ditto.
18514         (vsha512su0q_u64): Ditto.
18515         (vsha512su1q_u64): Ditto.
18516         (veor3q_u16): Ditto.
18517         (vrax1q_u64): Ditto.
18518         (vxarq_u64): Ditto.
18519         (vbcaxq_u16): Ditto.
18520         * config/arm/types.md (crypto_sha512): New type attribute.
18521         (crypto_sha3): Ditto.
18522         (doc/invoke.texi): Document new sha3 option.
18524 2018-01-10  Michael Collison  <michael.collison@arm.com>
18526         * config/aarch64/aarch64-builtins.c:
18527         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18528         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18529         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18530         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18531         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18532         (AARCH64_ISA_SM4): New ISA flag.
18533         (TARGET_SM4): New feature flag for sm4.
18534         * config/aarch64/aarch64-simd-builtins.def
18535         (aarch64_sm3ss1qv4si): Ditto.
18536         (aarch64_sm3tt1aq4si): Ditto.
18537         (aarch64_sm3tt1bq4si): Ditto.
18538         (aarch64_sm3tt2aq4si): Ditto.
18539         (aarch64_sm3tt2bq4si): Ditto.
18540         (aarch64_sm3partw1qv4si): Ditto.
18541         (aarch64_sm3partw2qv4si): Ditto.
18542         (aarch64_sm4eqv4si): Ditto.
18543         (aarch64_sm4ekeyqv4si): Ditto.
18544         * config/aarch64/aarch64-simd.md:
18545         (aarch64_sm3ss1qv4si): Ditto.
18546         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18547         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18548         (aarch64_sm4eqv4si): Ditto.
18549         (aarch64_sm4ekeyqv4si): Ditto.
18550         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18551         (sm3part_op): Ditto.
18552         (CRYPTO_SM3TT): Ditto.
18553         (CRYPTO_SM3PART): Ditto.
18554         (UNSPEC_SM3SS1): New unspec.
18555         (UNSPEC_SM3TT1A): Ditto.
18556         (UNSPEC_SM3TT1B): Ditto.
18557         (UNSPEC_SM3TT2A): Ditto.
18558         (UNSPEC_SM3TT2B): Ditto.
18559         (UNSPEC_SM3PARTW1): Ditto.
18560         (UNSPEC_SM3PARTW2): Ditto.
18561         (UNSPEC_SM4E): Ditto.
18562         (UNSPEC_SM4EKEY): Ditto.
18563         * config/aarch64/constraints.md (Ui2): New constraint.
18564         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18565         * config/arm/types.md (crypto_sm3): New type attribute.
18566         (crypto_sm4): Ditto.
18567         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18568         (vsm3tt1aq_u32): Ditto.
18569         (vsm3tt1bq_u32): Ditto.
18570         (vsm3tt2aq_u32): Ditto.
18571         (vsm3tt2bq_u32): Ditto.
18572         (vsm3partw1q_u32): Ditto.
18573         (vsm3partw2q_u32): Ditto.
18574         (vsm4eq_u32): Ditto.
18575         (vsm4ekeyq_u32): Ditto.
18576         (doc/invoke.texi): Document new sm4 option.
18578 2018-01-10  Michael Collison  <michael.collison@arm.com>
18580         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18581         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18582         (AARCH64_FL_FOR_ARCH8_4): New.
18583         (AARCH64_FL_V8_4): New flag.
18584         (doc/invoke.texi): Document new armv8.4-a option.
18586 2018-01-10  Michael Collison  <michael.collison@arm.com>
18588         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18589         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18590         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18591         * config/aarch64/aarch64-option-extension.def: Add
18592         AARCH64_OPT_EXTENSION of 'sha2'.
18593         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18594         (crypto): Disable sha2 and aes if crypto disabled.
18595         (crypto): Enable aes and sha2 if enabled.
18596         (simd): Disable sha2 and aes if simd disabled.
18597         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18598         New flags.
18599         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18600         (TARGET_SHA2): New feature flag for sha2.
18601         (TARGET_AES): New feature flag for aes.
18602         * config/aarch64/aarch64-simd.md:
18603         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18604         conditional on TARGET_AES.
18605         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18606         (aarch64_crypto_sha1hsi): Make pattern conditional
18607         on TARGET_SHA2.
18608         (aarch64_crypto_sha1hv4si): Ditto.
18609         (aarch64_be_crypto_sha1hv4si): Ditto.
18610         (aarch64_crypto_sha1su1v4si): Ditto.
18611         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18612         (aarch64_crypto_sha1su0v4si): Ditto.
18613         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18614         (aarch64_crypto_sha256su0v4si): Ditto.
18615         (aarch64_crypto_sha256su1v4si): Ditto.
18616         (doc/invoke.texi): Document new aes and sha2 options.
18618 2018-01-10  Martin Sebor  <msebor@redhat.com>
18620         PR tree-optimization/83781
18621         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18622         as string arrays.
18624 2018-01-11  Martin Sebor  <msebor@gmail.com>
18625             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18627         PR tree-optimization/83501
18628         PR tree-optimization/81703
18630         * tree-ssa-strlen.c (get_string_cst): Rename...
18631         (get_string_len): ...to this.  Handle global constants.
18632         (handle_char_store): Adjust.
18634 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
18635             Jim Wilson  <jimw@sifive.com>
18637         * config/riscv/riscv-protos.h (riscv_output_return): New.
18638         * config/riscv/riscv.c (struct machine_function): New naked_p field.
18639         (riscv_attribute_table, riscv_output_return),
18640         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18641         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18642         (riscv_compute_frame_info): Only compute frame->mask if not a naked
18643         function.
18644         (riscv_expand_prologue): Add early return for naked function.
18645         (riscv_expand_epilogue): Likewise.
18646         (riscv_function_ok_for_sibcall): Return false for naked function.
18647         (riscv_set_current_function): New.
18648         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18649         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18650         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18651         * doc/extend.texi (RISC-V Function Attributes): New.
18653 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
18655         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18656         check for 128-bit long double before checking TCmode.
18657         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18658         128-bit long doubles before checking TFmode or TCmode.
18659         (FLOAT128_IBM_P): Likewise.
18661 2018-01-10  Martin Sebor  <msebor@redhat.com>
18663         PR tree-optimization/83671
18664         * builtins.c (c_strlen): Unconditionally return zero for the empty
18665         string.
18666         Use -Warray-bounds for warnings.
18667         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18668         for non-constant array indices with COMPONENT_REF, arrays of
18669         arrays, and pointers to arrays.
18670         (gimple_fold_builtin_strlen): Determine and set length range for
18671         non-constant character arrays.
18673 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
18675         PR middle-end/81897
18676         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18677         empty blocks.
18679 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
18681         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18683 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
18685         PR target/83399
18686         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18687         VECTOR_MEM_ALTIVEC_OR_VSX_P.
18688         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18689         indexed_or_indirect_operand predicate.
18690         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18691         (*vsx_le_perm_load_v8hi): Likewise.
18692         (*vsx_le_perm_load_v16qi): Likewise.
18693         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18694         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18695         (*vsx_le_perm_store_v8hi): Likewise.
18696         (*vsx_le_perm_store_v16qi): Likewise.
18697         (eight unnamed splitters): Likewise.
18699 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
18701         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18702         * config/rs6000/emmintrin.h: Likewise.
18703         * config/rs6000/mmintrin.h: Likewise.
18704         * config/rs6000/xmmintrin.h: Likewise.
18706 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
18708         PR c++/43486
18709         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18710         "public_flag".
18711         * tree.c (tree_nop_conversion): Return true for location wrapper
18712         nodes.
18713         (maybe_wrap_with_location): New function.
18714         (selftest::check_strip_nops): New function.
18715         (selftest::test_location_wrappers): New function.
18716         (selftest::tree_c_tests): Call it.
18717         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18718         (maybe_wrap_with_location): New decl.
18719         (EXPR_LOCATION_WRAPPER_P): New macro.
18720         (location_wrapper_p): New inline function.
18721         (tree_strip_any_location_wrapper): New inline function.
18723 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
18725         PR target/83735
18726         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18727         stack_realign_offset for the largest alignment of stack slot
18728         actually used.
18729         (ix86_find_max_used_stack_alignment): New function.
18730         (ix86_finalize_stack_frame_flags): Use it.  Set
18731         max_used_stack_alignment if we don't realign stack.
18732         * config/i386/i386.h (machine_function): Add
18733         max_used_stack_alignment.
18735 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
18737         * config/arm/arm.opt (-mbranch-cost): New option.
18738         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18739         account.
18741 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
18743         PR target/83629
18744         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18745         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18747 2018-01-10  Richard Biener  <rguenther@suse.de>
18749         PR debug/83765
18750         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18751         early out so it also covers the case where we have a non-NULL
18752         origin.
18754 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
18756         PR tree-optimization/83753
18757         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18758         for non-strided grouped accesses if the number of elements is 1.
18760 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18762         PR target/81616
18763         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18764         * i386.h (TARGET_USE_GATHER): Define.
18765         * x86-tune.def (X86_TUNE_USE_GATHER): New.
18767 2018-01-10  Martin Liska  <mliska@suse.cz>
18769         PR bootstrap/82831
18770         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18771         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18772         partitioning.
18773         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18774         CLEANUP_NO_PARTITIONING is not set.
18776 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
18778         * doc/rtl.texi: Remove documentation of (const ...) wrappers
18779         for vectors, as a partial revert of r254296.
18780         * rtl.h (const_vec_p): Delete.
18781         (const_vec_duplicate_p): Don't test for vector CONSTs.
18782         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18783         * expmed.c (make_tree): Likewise.
18785         Revert:
18786         * common.md (E, F): Use CONSTANT_P instead of checking for
18787         CONST_VECTOR.
18788         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18789         checking for CONST_VECTOR.
18791 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18793         PR middle-end/83575
18794         * predict.c (force_edge_cold): Handle in more sane way edges
18795         with no prediction.
18797 2018-01-09  Carl Love  <cel@us.ibm.com>
18799         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18800         V4SI, V4SF types.
18801         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18802         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18803         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18804         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
18805         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18806         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
18807         * config/rs6000/rs6000-protos.h: Add extern defition for
18808         rs6000_generate_float2_double_code.
18809         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18810         function.
18811         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18812         (float2_v2df): Add define_expand.
18814 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
18816         PR target/83628
18817         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18818         op_mode in the force_to_mode call.
18820 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18822         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18823         instead of checking each element individually.
18824         (aarch64_evpc_uzp): Likewise.
18825         (aarch64_evpc_zip): Likewise.
18826         (aarch64_evpc_ext): Likewise.
18827         (aarch64_evpc_rev): Likewise.
18828         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18829         instead of checking each element individually.  Return true without
18830         generating rtl if
18831         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18832         whether all selected elements come from the same input, instead of
18833         checking each element individually.  Remove calls to gen_rtx_REG,
18834         start_sequence and end_sequence and instead assert that no rtl is
18835         generated.
18837 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18839         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18840         order of HIGH and CONST checks.
18842 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18844         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18845         if the destination isn't an SSA_NAME.
18847 2018-01-09  Richard Biener  <rguenther@suse.de>
18849         PR tree-optimization/83668
18850         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18851         move prologue...
18852         (canonicalize_loop_form): ... here, renamed from ...
18853         (canonicalize_loop_closed_ssa_form): ... this and amended to
18854         swap successor edges for loop exit blocks to make us use
18855         the RPO order we need for initial schedule generation.
18857 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
18859         PR tree-optimization/64811
18860         * match.pd: When optimizing comparisons with Inf, avoid
18861         introducing or losing exceptions from comparisons with NaN.
18863 2018-01-09  Martin Liska  <mliska@suse.cz>
18865         PR sanitizer/82517
18866         * asan.c (shadow_mem_size): Add gcc_assert.
18868 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
18870         Don't save registers in main().
18872         PR target/83738
18873         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18874         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18875         * config/avr/avr.c (avr_set_current_function): Don't error if
18876         naked, OS_task or OS_main are specified at the same time.
18877         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18878         OS_main.
18879         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18880         attribute.
18881         * common/config/avr/avr-common.c (avr_option_optimization_table):
18882         Switch on -mmain-is-OS_task for optimizing compilations.
18884 2018-01-09  Richard Biener  <rguenther@suse.de>
18886         PR tree-optimization/83572
18887         * graphite.c: Include cfganal.h.
18888         (graphite_transform_loops): Connect infinite loops to exit
18889         and remove fake edges at the end.
18891 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18893         * ipa-inline.c (edge_badness): Revert accidental checkin.
18895 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18897         PR ipa/80763
18898         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18899         symbols; not inline clones.
18901 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
18903         PR target/83507
18904         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18905         hard registers.  Formatting fixes.
18907         PR preprocessor/83722
18908         * gcc.c (try_generate_repro): Pass
18909         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18910         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18911         do_report_bug.
18913 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
18914             Kito Cheng  <kito.cheng@gmail.com>
18916         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18917         (riscv_leaf_function_p): Delete.
18918         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18920 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18922         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18923         function.
18924         (do_ifelse): New function.
18925         (do_isel): New function.
18926         (do_sub3): New function.
18927         (do_add3): New function.
18928         (do_load_mask_compare): New function.
18929         (do_overlap_load_compare): New function.
18930         (expand_compare_loop): New function.
18931         (expand_block_compare): Call expand_compare_loop() when appropriate.
18932         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18933         option description.
18934         (-mblock-compare-inline-loop-limit): New option.
18936 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18938         PR target/83677
18939         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18940         Reverse order of second and third operands in first alternative.
18941         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18942         of first and second elements in UNSPEC_VPERMR vector.
18943         (altivec_expand_vec_perm_le): Likewise.
18945 2018-01-08  Jeff Law  <law@redhat.com>
18947         PR rtl-optimizatin/81308
18948         * tree-switch-conversion.c (cfg_altered): New file scoped static.
18949         (process_switch): If group_case_labels makes a change, then set
18950         cfg_altered.
18951         (pass_convert_switch::execute): If a switch is converted, then
18952         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
18954         PR rtl-optimization/81308
18955         * recog.c (split_all_insns): Conditionally cleanup the CFG after
18956         splitting insns.
18958 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
18960         PR target/83663 - Revert r255946
18961         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18962         generation for cases where splatting a value is not useful.
18963         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18964         across a vec_duplicate and a paradoxical subreg forming a vector
18965         mode to a vec_concat.
18967 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18969         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18970         -march=armv8.3-a variants.
18971         * config/arm/t-multilib: Likewise.
18972         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
18974 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18976         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18977         to generate rtl.
18978         (cceq_ior_compare_complement): Give it a name so I can use it, and
18979         change boolean_or_operator predicate to boolean_operator so it can
18980         be used to generate a crand.
18981         (eqne): New code iterator.
18982         (bd/bd_neg): New code_attrs.
18983         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18984         a single define_insn.
18985         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18986         decrement (bdnzt/bdnzf/bdzt/bdzf).
18987         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18988         with the new names of the branch decrement patterns, and added the
18989         names of the branch decrement conditional patterns.
18991 2018-01-08  Richard Biener  <rguenther@suse.de>
18993         PR tree-optimization/83563
18994         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18995         cache.
18997 2018-01-08  Richard Biener  <rguenther@suse.de>
18999         PR middle-end/83713
19000         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19002 2018-01-08  Richard Biener  <rguenther@suse.de>
19004         PR tree-optimization/83685
19005         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19006         references to abnormals.
19008 2018-01-08  Richard Biener  <rguenther@suse.de>
19010         PR lto/83719
19011         * dwarf2out.c (output_indirect_strings): Handle empty
19012         skeleton_debug_str_hash.
19013         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19015 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
19017         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19018         (emit_store_direct): Likewise.
19019         (arc_trampoline_adjust_address): Likewise.
19020         (arc_asm_trampoline_template): New function.
19021         (arc_initialize_trampoline): Use asm_trampoline_template.
19022         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19023         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19024         * config/arc/arc.md (flush_icache): Delete pattern.
19026 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
19028         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19029         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19030         munaligned-access.
19032 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19034         PR target/83681
19035         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19036         by not USED_FOR_TARGET.
19037         (make_pass_resolve_sw_modes): Likewise.
19039 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19041         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19042         USED_FOR_TARGET.
19044 2018-01-08  Richard Biener  <rguenther@suse.de>
19046         PR middle-end/83580
19047         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19049 2018-01-08  Richard Biener  <rguenther@suse.de>
19051         PR middle-end/83517
19052         * match.pd ((t * 2) / 2) -> t): Add missing :c.
19054 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
19056         PR middle-end/81897
19057         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19058         basic blocks with a small number of successors.
19059         (convert_control_dep_chain_into_preds): Improve handling of
19060         forwarder blocks.
19061         (dump_predicates): Split apart into...
19062         (dump_pred_chain): ...here...
19063         (dump_pred_info): ...and here.
19064         (can_one_predicate_be_invalidated_p): Add debugging printfs.
19065         (can_chain_union_be_invalidated_p): Improve check for invalidation
19066         of paths.
19067         (uninit_uses_cannot_happen): Avoid unnecessary if
19068         convert_control_dep_chain_into_preds yielded nothing.
19070 2018-01-06  Martin Sebor  <msebor@redhat.com>
19072         PR tree-optimization/83640
19073         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19074         subtracting negative offset from size.
19075         (builtin_access::overlap): Adjust offset bounds of the access to fall
19076         within the size of the object if possible.
19078 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
19080         PR rtl-optimization/83699
19081         * expmed.c (extract_bit_field_1): Restrict the vector usage of
19082         extract_bit_field_as_subreg to cases in which the extracted
19083         value is also a vector.
19085         * lra-constraints.c (process_alt_operands): Test for the equivalence
19086         substitutions when detecting a possible reload cycle.
19088 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
19090         PR debug/83480
19091         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19092         by default if flag_selective_schedling{,2}.  Formatting fixes.
19094         PR rtl-optimization/83682
19095         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19096         if it has non-VECTOR_MODE element mode.
19097         (vec_duplicate_p): Likewise.
19099         PR middle-end/83694
19100         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19101         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19103 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
19105         PR target/83604
19106         * config/i386/i386-builtin.def
19107         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19108         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19109         Require also OPTION_MASK_ISA_AVX512F in addition to
19110         OPTION_MASK_ISA_GFNI.
19111         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19112         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19113         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19114         to OPTION_MASK_ISA_GFNI.
19115         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19116         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19117         OPTION_MASK_ISA_AVX512BW.
19118         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19119         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19120         addition to OPTION_MASK_ISA_GFNI.
19121         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19122         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19123         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19124         to OPTION_MASK_ISA_GFNI.
19125         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19126         a requirement for all ISAs rather than any of them with a few
19127         exceptions.
19128         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19129         processing.
19130         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19131         bitmasks to be enabled with 3 exceptions, instead of requiring any
19132         enabled ISA with lots of exceptions.
19133         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19134         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19135         Change avx512bw in isa attribute to avx512f.
19136         * config/i386/sgxintrin.h: Add license boilerplate.
19137         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
19138         to __AVX512F__ and __AVX512VL to __AVX512VL__.
19139         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19140         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19141         defined.
19142         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19143         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19144         temporarily sse2 rather than sse if not enabled already.
19146         PR target/83604
19147         * config/i386/sse.md (VI248_VLBW): Rename to ...
19148         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
19149         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19150         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19151         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19152         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19153         mode iterator instead of VI248_VLBW.
19155 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
19157         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19158         (record_modified): Skip clobbers; add debug output.
19159         (param_change_prob): Use sreal frequencies.
19161 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
19163         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19164         punt for user-aligned variables.
19166 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
19168         * tree-chrec.c (chrec_contains_symbols): Return true for
19169         POLY_INT_CST.
19171 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
19173         PR target/82439
19174         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19175         of (x|y) == x for BICS pattern.
19177 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
19179         PR tree-optimization/83605
19180         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19181         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19182         can throw.
19184 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19186         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19187         * config/epiphany/rtems.h: New file.
19189 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19190             Uros Bizjak  <ubizjak@gmail.com>
19192         PR target/83554
19193         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19194         QIreg_operand instead of register_operand predicate.
19195         * config/i386/i386.c (ix86_rop_should_change_byte_p,
19196         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19197         comments instead of -fmitigate[-_]rop.
19199 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19201         PR bootstrap/81926
19202         * cgraphunit.c (symbol_table::compile): Switch to text_section
19203         before calling assembly_start debug hook.
19204         * run-rtl-passes.c (run_rtl_passes): Likewise.
19205         Include output.h.
19207 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19209         * tree-vrp.c (extract_range_from_binary_expr_1): Check
19210         range_int_cst_p rather than !symbolic_range_p before calling
19211         extract_range_from_multiplicative_op_1.
19213 2018-01-04  Jeff Law  <law@redhat.com>
19215         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19216         redundant test in assertion.
19218 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19220         * doc/rtl.texi: Document machine_mode wrapper classes.
19222 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19224         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19225         using tree_to_uhwi.
19227 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19229         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19230         the VEC_PERM_EXPR fold to fail.
19232 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19234         PR debug/83585
19235         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
19236         to switched_sections.
19238 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19240         PR target/83680
19241         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
19242         test for d.testing.
19244 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
19246         PR target/83387
19247         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
19248         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
19250 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19252         PR debug/83666
19253         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
19254         is BLKmode and bitpos not zero or mode change is needed.
19256 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19258         PR target/83675
19259         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
19260         TARGET_VIS2.
19262 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
19264         PR target/83628
19265         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
19266         instead of MULT rtx.  Update all corresponding splitters.
19267         (*saddl_se): Ditto.
19268         (*ssub<modesuffix>): Ditto.
19269         (*ssubl_se): Ditto.
19270         (*cmp_sadd_di): Update split patterns.
19271         (*cmp_sadd_si): Ditto.
19272         (*cmp_sadd_sidi): Ditto.
19273         (*cmp_ssub_di): Ditto.
19274         (*cmp_ssub_si): Ditto.
19275         (*cmp_ssub_sidi): Ditto.
19276         * config/alpha/predicates.md (const23_operand): New predicate.
19277         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
19278         Look for ASHIFT, not MULT inner operand.
19279         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
19281 2018-01-04  Martin Liska  <mliska@suse.cz>
19283         PR gcov-profile/83669
19284         * gcov.c (output_intermediate_file): Add version to intermediate
19285         gcov file.
19286         * doc/gcov.texi: Document new field 'version' in intermediate
19287         file format. Fix location of '-k' option of gcov command.
19289 2018-01-04  Martin Liska  <mliska@suse.cz>
19291         PR ipa/82352
19292         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
19294 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19296         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
19298 2018-01-03  Martin Sebor  <msebor@redhat.com>
19300         PR tree-optimization/83655
19301         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
19302         checking calls with invalid arguments.
19304 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19306         * tree-vect-stmts.c (vect_get_store_rhs): New function.
19307         (vectorizable_mask_load_store): Delete.
19308         (vectorizable_call): Return false for masked loads and stores.
19309         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
19310         instead of gimple_assign_rhs1.
19311         (vectorizable_load): Handle IFN_MASK_LOAD.
19312         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
19314 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19316         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19317         split out from..,
19318         (vectorizable_mask_load_store): ...here.
19319         (vectorizable_load): ...and here.
19321 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19323         * tree-vect-stmts.c (vect_build_all_ones_mask)
19324         (vect_build_zero_merge_argument): New functions, split out from...
19325         (vectorizable_load): ...here.
19327 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19329         * tree-vect-stmts.c (vect_check_store_rhs): New function,
19330         split out from...
19331         (vectorizable_mask_load_store): ...here.
19332         (vectorizable_store): ...and here.
19334 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19336         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19337         split out from...
19338         (vectorizable_mask_load_store): ...here.
19340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19342         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19343         (vect_model_store_cost): Take a vec_load_store_type instead of a
19344         vect_def_type.
19345         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19346         (vect_model_store_cost): Take a vec_load_store_type instead of a
19347         vect_def_type.
19348         (vectorizable_mask_load_store): Update accordingly.
19349         (vectorizable_store): Likewise.
19350         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19352 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19354         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19355         IFN_MASK_LOAD calls here rather than...
19356         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19358 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19359             Alan Hayward  <alan.hayward@arm.com>
19360             David Sherwood  <david.sherwood@arm.com>
19362         * expmed.c (extract_bit_field_1): For vector extracts,
19363         fall back to extract_bit_field_as_subreg if vec_extract
19364         isn't available.
19366 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19367             Alan Hayward  <alan.hayward@arm.com>
19368             David Sherwood  <david.sherwood@arm.com>
19370         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19371         they are variable or constant sized.
19372         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19373         slots for constant-sized data.
19375 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19376             Alan Hayward  <alan.hayward@arm.com>
19377             David Sherwood  <david.sherwood@arm.com>
19379         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19380         handling COND_EXPRs with boolean comparisons, try to find a better
19381         basis for the mask type than the boolean itself.
19383 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19385         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19386         is calculated and how it can be overridden.
19387         * genmodes.c (max_bitsize_mode_any_mode): New variable.
19388         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19389         if defined.
19390         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19391         if nonzero.
19393 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19394             Alan Hayward  <alan.hayward@arm.com>
19395             David Sherwood  <david.sherwood@arm.com>
19397         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19398         Remove the mode argument.
19399         (aarch64_simd_valid_immediate): Remove the mode and inverse
19400         arguments.
19401         * config/aarch64/iterators.md (bitsize): New iterator.
19402         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19403         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19404         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19405         aarch64_simd_valid_immediate.
19406         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19407         (aarch64_reg_or_bic_imm): Likewise.
19408         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19409         with an insn_type enum and msl with a modifier_type enum.
19410         Replace element_width with a scalar_mode.  Change the shift
19411         to unsigned int.  Add constructors for scalar_float_mode and
19412         scalar_int_mode elements.
19413         (aarch64_vect_float_const_representable_p): Delete.
19414         (aarch64_can_const_movi_rtx_p)
19415         (aarch64_simd_scalar_immediate_valid_for_move)
19416         (aarch64_simd_make_constant): Update call to
19417         aarch64_simd_valid_immediate.
19418         (aarch64_advsimd_valid_immediate_hs): New function.
19419         (aarch64_advsimd_valid_immediate): Likewise.
19420         (aarch64_simd_valid_immediate): Remove mode and inverse
19421         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
19422         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19423         and aarch64_float_const_representable_p on the result.
19424         (aarch64_output_simd_mov_immediate): Remove mode argument.
19425         Update call to aarch64_simd_valid_immediate and use of
19426         simd_immediate_info.
19427         (aarch64_output_scalar_simd_mov_immediate): Update call
19428         accordingly.
19430 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19431             Alan Hayward  <alan.hayward@arm.com>
19432             David Sherwood  <david.sherwood@arm.com>
19434         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19435         (mode_nunits): Likewise CONST_MODE_NUNITS.
19436         * machmode.def (ADJUST_NUNITS): Document.
19437         * genmodes.c (mode_data::need_nunits_adj): New field.
19438         (blank_mode): Update accordingly.
19439         (adj_nunits): New variable.
19440         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19441         parameter.
19442         (emit_mode_size_inline): Set need_bytesize_adj for all modes
19443         listed in adj_nunits.
19444         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19445         listed in adj_nunits.  Don't emit case statements for such modes.
19446         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19447         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
19448         nothing if adj_nunits is nonnull.
19449         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19450         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19451         (emit_mode_fbit): Update use of print_maybe_const_decl.
19452         (emit_move_size): Likewise.  Treat the array as non-const
19453         if adj_nunits.
19454         (emit_mode_adjustments): Handle adj_nunits.
19456 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19458         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19459         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19460         (VECTOR_MODES): Use it.
19461         (make_vector_modes): Take the prefix as an argument.
19463 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19464             Alan Hayward  <alan.hayward@arm.com>
19465             David Sherwood  <david.sherwood@arm.com>
19467         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19468         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19469         for MODE_VECTOR_BOOL.
19470         * machmode.def (VECTOR_BOOL_MODE): Document.
19471         * genmodes.c (VECTOR_BOOL_MODE): New macro.
19472         (make_vector_bool_mode): New function.
19473         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19474         MODE_VECTOR_BOOL.
19475         * lto-streamer-in.c (lto_input_mode_table): Likewise.
19476         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19477         Likewise.
19478         * stor-layout.c (int_mode_for_mode): Likewise.
19479         * tree.c (build_vector_type_for_mode): Likewise.
19480         * varasm.c (output_constant_pool_2): Likewise.
19481         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19482         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
19483         for MODE_VECTOR_BOOL.
19484         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19485         of mode class checks.
19486         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19487         instead of a list of mode class checks.
19488         (expand_vector_scalar_condition): Likewise.
19489         (type_for_widest_vector_mode): Handle BImode as an inner mode.
19491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19492             Alan Hayward  <alan.hayward@arm.com>
19493             David Sherwood  <david.sherwood@arm.com>
19495         * machmode.h (mode_size): Change from unsigned short to
19496         poly_uint16_pod.
19497         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19498         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19499         or if measurement_type is not polynomial.
19500         (fixed_size_mode::includes_p): Check for constant-sized modes.
19501         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19502         return a poly_uint16 rather than an unsigned short.
19503         (emit_mode_size): Change the type of mode_size from unsigned short
19504         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
19505         (emit_mode_adjustments): Cope with polynomial vector sizes.
19506         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19507         for GET_MODE_SIZE.
19508         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19509         for GET_MODE_SIZE.
19510         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19511         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19512         * caller-save.c (setup_save_areas): Likewise.
19513         (replace_reg_with_saved_mem): Likewise.
19514         * calls.c (emit_library_call_value_1): Likewise.
19515         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19516         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19517         (gen_lowpart_for_combine): Likewise.
19518         * convert.c (convert_to_integer_1): Likewise.
19519         * cse.c (equiv_constant, cse_insn): Likewise.
19520         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19521         (cselib_subst_to_values): Likewise.
19522         * dce.c (word_dce_process_block): Likewise.
19523         * df-problems.c (df_word_lr_mark_ref): Likewise.
19524         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19525         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19526         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19527         (rtl_for_decl_location): Likewise.
19528         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19529         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19530         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19531         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19532         (expand_expr_real_1): Likewise.
19533         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19534         (pad_below): Likewise.
19535         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19536         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19537         * ira.c (get_subreg_tracking_sizes): Likewise.
19538         * ira-build.c (ira_create_allocno_objects): Likewise.
19539         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19540         (ira_sort_regnos_for_alter_reg): Likewise.
19541         * ira-costs.c (record_operand_costs): Likewise.
19542         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19543         (resolve_simple_move): Likewise.
19544         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19545         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19546         (lra_constraints): Likewise.
19547         (CONST_POOL_OK_P): Reject variable-sized modes.
19548         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19549         (add_pseudo_to_slot, lra_spill): Likewise.
19550         * omp-low.c (omp_clause_aligned_alignment): Likewise.
19551         * optabs-query.c (get_best_extraction_insn): Likewise.
19552         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19553         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19554         (expand_mult_highpart, valid_multiword_target_p): Likewise.
19555         * recog.c (offsettable_address_addr_space_p): Likewise.
19556         * regcprop.c (maybe_mode_change): Likewise.
19557         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19558         * regrename.c (build_def_use): Likewise.
19559         * regstat.c (dump_reg_info): Likewise.
19560         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19561         (find_reloads, find_reloads_subreg_address): Likewise.
19562         * reload1.c (eliminate_regs_1): Likewise.
19563         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19564         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19565         (simplify_binary_operation_1, simplify_subreg): Likewise.
19566         * targhooks.c (default_function_arg_padding): Likewise.
19567         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19568         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19569         (verify_gimple_assign_ternary): Likewise.
19570         * tree-inline.c (estimate_move_cost): Likewise.
19571         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19572         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19573         (get_address_cost_ainc): Likewise.
19574         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19575         (vect_supportable_dr_alignment): Likewise.
19576         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19577         (vectorizable_reduction): Likewise.
19578         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19579         (vectorizable_operation, vectorizable_load): Likewise.
19580         * tree.c (build_same_sized_truth_vector_type): Likewise.
19581         * valtrack.c (cleanup_auto_inc_dec): Likewise.
19582         * var-tracking.c (emit_note_insn_var_location): Likewise.
19583         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19584         (ADDR_VEC_ALIGN): Likewise.
19586 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19587             Alan Hayward  <alan.hayward@arm.com>
19588             David Sherwood  <david.sherwood@arm.com>
19590         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19591         unsigned short.
19592         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19593         or if measurement_type is polynomial.
19594         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19595         * combine.c (make_extraction): Likewise.
19596         * dse.c (find_shift_sequence): Likewise.
19597         * dwarf2out.c (mem_loc_descriptor): Likewise.
19598         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19599         (extract_bit_field, extract_low_bits): Likewise.
19600         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19601         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19602         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19603         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19604         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19605         * reload.c (find_reloads): Likewise.
19606         * reload1.c (alter_reg): Likewise.
19607         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19608         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19609         * tree-if-conv.c (predicate_mem_writes): Likewise.
19610         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19611         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19612         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19613         * valtrack.c (dead_debug_insert_temp): Likewise.
19614         * varasm.c (mergeable_constant_section): Likewise.
19615         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19617 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19618             Alan Hayward  <alan.hayward@arm.com>
19619             David Sherwood  <david.sherwood@arm.com>
19621         * expr.c (expand_assignment): Cope with polynomial mode sizes
19622         when assigning to a CONCAT.
19624 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19625             Alan Hayward  <alan.hayward@arm.com>
19626             David Sherwood  <david.sherwood@arm.com>
19628         * machmode.h (mode_precision): Change from unsigned short to
19629         poly_uint16_pod.
19630         (mode_to_precision): Return a poly_uint16 rather than an unsigned
19631         short.
19632         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19633         or if measurement_type is not polynomial.
19634         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
19635         in which the mode is already known to be a scalar_int_mode.
19636         * genmodes.c (emit_mode_precision): Change the type of mode_precision
19637         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
19638         initializer.
19639         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19640         for GET_MODE_PRECISION.
19641         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19642         for GET_MODE_PRECISION.
19643         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19644         as polynomial.
19645         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19646         (expand_field_assignment, make_extraction): Likewise.
19647         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19648         (get_last_value): Likewise.
19649         * convert.c (convert_to_integer_1): Likewise.
19650         * cse.c (cse_insn): Likewise.
19651         * expr.c (expand_expr_real_1): Likewise.
19652         * lra-constraints.c (simplify_operand_subreg): Likewise.
19653         * optabs-query.c (can_atomic_load_p): Likewise.
19654         * optabs.c (expand_atomic_load): Likewise.
19655         (expand_atomic_store): Likewise.
19656         * ree.c (combine_reaching_defs): Likewise.
19657         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19658         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19659         * tree.h (type_has_mode_precision_p): Likewise.
19660         * ubsan.c (instrument_si_overflow): Likewise.
19662 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19663             Alan Hayward  <alan.hayward@arm.com>
19664             David Sherwood  <david.sherwood@arm.com>
19666         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19667         polynomial numbers of units.
19668         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19669         (valid_vector_subparts_p): New function.
19670         (build_vector_type): Remove temporary shim and take the number
19671         of units as a poly_uint64 rather than an int.
19672         (build_opaque_vector_type): Take the number of units as a
19673         poly_uint64 rather than an int.
19674         * tree.c (build_vector_from_ctor): Handle polynomial
19675         TYPE_VECTOR_SUBPARTS.
19676         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19677         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19678         (build_vector_from_val): If the number of units is variable,
19679         use build_vec_duplicate_cst for constant operands and
19680         VEC_DUPLICATE_EXPR otherwise.
19681         (make_vector_type): Remove temporary is_constant ().
19682         (build_vector_type, build_opaque_vector_type): Take the number of
19683         units as a poly_uint64 rather than an int.
19684         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19685         VECTOR_CST_NELTS.
19686         * cfgexpand.c (expand_debug_expr): Likewise.
19687         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19688         (store_constructor, expand_expr_real_1): Likewise.
19689         (const_scalar_mask_from_tree): Likewise.
19690         * fold-const-call.c (fold_const_reduction): Likewise.
19691         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19692         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19693         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19694         (fold_relational_const): Likewise.
19695         (native_interpret_vector): Likewise.  Change the size from an
19696         int to an unsigned int.
19697         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19698         TYPE_VECTOR_SUBPARTS.
19699         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19700         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19701         duplicating a non-constant operand into a variable-length vector.
19702         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19703         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19704         * ipa-icf.c (sem_variable::equals): Likewise.
19705         * match.pd: Likewise.
19706         * omp-simd-clone.c (simd_clone_subparts): Likewise.
19707         * print-tree.c (print_node): Likewise.
19708         * stor-layout.c (layout_type): Likewise.
19709         * targhooks.c (default_builtin_vectorization_cost): Likewise.
19710         * tree-cfg.c (verify_gimple_comparison): Likewise.
19711         (verify_gimple_assign_binary): Likewise.
19712         (verify_gimple_assign_ternary): Likewise.
19713         (verify_gimple_assign_single): Likewise.
19714         * tree-pretty-print.c (dump_generic_node): Likewise.
19715         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19716         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19717         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19718         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19719         (vect_shift_permute_load_chain): Likewise.
19720         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19721         (expand_vector_condition, optimize_vector_constructor): Likewise.
19722         (lower_vec_perm, get_compute_type): Likewise.
19723         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19724         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19725         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19726         (vect_recog_mask_conversion_pattern): Likewise.
19727         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19728         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19729         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19730         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19731         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19732         (vectorizable_shift, vectorizable_operation, vectorizable_store)
19733         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19734         (supportable_widening_operation): Likewise.
19735         (supportable_narrowing_operation): Likewise.
19736         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19737         Likewise.
19738         * varasm.c (output_constant): Likewise.
19740 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19741             Alan Hayward  <alan.hayward@arm.com>
19742             David Sherwood  <david.sherwood@arm.com>
19744         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19745         so that both the length == 3 and length != 3 cases set up their
19746         own permute vectors.  Add comments explaining why we know the
19747         number of elements is constant.
19748         (vect_permute_load_chain): Likewise.
19750 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19751             Alan Hayward  <alan.hayward@arm.com>
19752             David Sherwood  <david.sherwood@arm.com>
19754         * machmode.h (mode_nunits): Change from unsigned char to
19755         poly_uint16_pod.
19756         (ONLY_FIXED_SIZE_MODES): New macro.
19757         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19758         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19759         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19760         New typedefs.
19761         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19762         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19763         or if measurement_type is not polynomial.
19764         * genmodes.c (ZERO_COEFFS): New macro.
19765         (emit_mode_nunits_inline): Make mode_nunits_inline return a
19766         poly_uint16.
19767         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19768         Use ZERO_COEFFS when emitting initializers.
19769         * data-streamer.h (bp_pack_poly_value): New function.
19770         (bp_unpack_poly_value): Likewise.
19771         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19772         for GET_MODE_NUNITS.
19773         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19774         for GET_MODE_NUNITS.
19775         * tree.c (make_vector_type): Remove temporary shim and make
19776         the real function take the number of units as a poly_uint64
19777         rather than an int.
19778         (build_vector_type_for_mode): Handle polynomial nunits.
19779         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19780         * emit-rtl.c (const_vec_series_p_1): Likewise.
19781         (gen_rtx_CONST_VECTOR): Likewise.
19782         * fold-const.c (test_vec_duplicate_folding): Likewise.
19783         * genrecog.c (validate_pattern): Likewise.
19784         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19785         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19786         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19787         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19788         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19789         * rtlanal.c (subreg_get_info): Likewise.
19790         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19791         (vect_grouped_load_supported): Likewise.
19792         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19793         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19794         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19795         (simplify_const_unary_operation, simplify_binary_operation_1)
19796         (simplify_const_binary_operation, simplify_ternary_operation)
19797         (test_vector_ops_duplicate, test_vector_ops): Likewise.
19798         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19799         instead of CONST_VECTOR_NUNITS.
19800         * varasm.c (output_constant_pool_2): Likewise.
19801         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19802         explicit-encoded elements in the XVEC for variable-length vectors.
19804 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19806         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19808 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19809             Alan Hayward  <alan.hayward@arm.com>
19810             David Sherwood  <david.sherwood@arm.com>
19812         * coretypes.h (fixed_size_mode): Declare.
19813         (fixed_size_mode_pod): New typedef.
19814         * builtins.h (target_builtins::x_apply_args_mode)
19815         (target_builtins::x_apply_result_mode): Change type to
19816         fixed_size_mode_pod.
19817         * builtins.c (apply_args_size, apply_result_size, result_vector)
19818         (expand_builtin_apply_args_1, expand_builtin_apply)
19819         (expand_builtin_return): Update accordingly.
19821 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19823         * cse.c (hash_rtx_cb): Hash only the encoded elements.
19824         * cselib.c (cselib_hash_rtx): Likewise.
19825         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19826         CONST_VECTOR encoding.
19828 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19829             Jeff Law  <law@redhat.com>
19831         PR target/83641
19832         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19833         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19834         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19835         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19837         PR target/83641
19838         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19839         explicitly probe *sp in a noreturn function if there were any callee
19840         register saves or frame pointer is needed.
19842 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19844         PR debug/83621
19845         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19846         BLKmode for ternary, binary or unary expressions.
19848         PR debug/83645
19849         * var-tracking.c (delete_vta_debug_insn): New inline function.
19850         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19851         insns from get_insns () to NULL instead of each bb separately.
19852         Use delete_vta_debug_insn.  No longer static.
19853         (vt_debug_insns_local, variable_tracking_main_1): Adjust
19854         delete_vta_debug_insns callers.
19855         * rtl.h (delete_vta_debug_insns): Declare.
19856         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19857         instead of variable_tracking_main.
19859 2018-01-03  Martin Sebor  <msebor@redhat.com>
19861         PR tree-optimization/83603
19862         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19863         arguments past the endof the argument list in functions declared
19864         without a prototype.
19865         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19866         Avoid checking when arguments are null.
19868 2018-01-03  Martin Sebor  <msebor@redhat.com>
19870         PR c/83559
19871         * doc/extend.texi (attribute const): Fix a typo.
19872         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19873         issuing -Wsuggest-attribute for void functions.
19875 2018-01-03  Martin Sebor  <msebor@redhat.com>
19877         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19878         offset_int::from instead of wide_int::to_shwi.
19879         (maybe_diag_overlap): Remove assertion.
19880         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19881         * gimple-ssa-sprintf.c (format_directive): Same.
19882         (parse_directive): Same.
19883         (sprintf_dom_walker::compute_format_length): Same.
19884         (try_substitute_return_value): Same.
19886 2018-01-03  Jeff Law  <law@redhat.com>
19888         PR middle-end/83654
19889         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19890         non-constant residual for zero at runtime and avoid probing in
19891         that case.  Reorganize code for trailing problem to mirror handling
19892         of the residual.
19894 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19896         PR tree-optimization/83501
19897         * tree-ssa-strlen.c (get_string_cst): New.
19898         (handle_char_store): Call get_string_cst.
19900 2018-01-03  Martin Liska  <mliska@suse.cz>
19902         PR tree-optimization/83593
19903         * tree-ssa-strlen.c: Include tree-cfg.h.
19904         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19905         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19906         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19907         to false.
19908         (strlen_dom_walker::before_dom_children): Call
19909         gimple_purge_dead_eh_edges. Dump tranformation with details
19910         dump flags.
19911         (strlen_dom_walker::before_dom_children): Update call by adding
19912         new argument cleanup_eh.
19913         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19915 2018-01-03  Martin Liska  <mliska@suse.cz>
19917         PR ipa/83549
19918         * cif-code.def (VARIADIC_THUNK): New enum value.
19919         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19920         thunks.
19922 2018-01-03  Jan Beulich  <jbeulich@suse.com>
19924         * sse.md (mov<mode>_internal): Tighten condition for when to use
19925         vmovdqu<ssescalarsize> for TI and OI modes.
19927 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19929         Update copyright years.
19931 2018-01-03  Martin Liska  <mliska@suse.cz>
19933         PR ipa/83594
19934         * ipa-visibility.c (function_and_variable_visibility): Skip
19935         functions with noipa attribure.
19937 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19939         * gcc.c (process_command): Update copyright notice dates.
19940         * gcov-dump.c (print_version): Ditto.
19941         * gcov.c (print_version): Ditto.
19942         * gcov-tool.c (print_version): Ditto.
19943         * gengtype.c (create_file): Ditto.
19944         * doc/cpp.texi: Bump @copying's copyright year.
19945         * doc/cppinternals.texi: Ditto.
19946         * doc/gcc.texi: Ditto.
19947         * doc/gccint.texi: Ditto.
19948         * doc/gcov.texi: Ditto.
19949         * doc/install.texi: Ditto.
19950         * doc/invoke.texi: Ditto.
19952 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19954         * vector-builder.h (vector_builder::m_full_nelts): Change from
19955         unsigned int to poly_uint64.
19956         (vector_builder::full_nelts): Update prototype accordingly.
19957         (vector_builder::new_vector): Likewise.
19958         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19959         (vector_builder::operator ==): Likewise.
19960         (vector_builder::finalize): Likewise.
19961         * int-vector-builder.h (int_vector_builder::int_vector_builder):
19962         Take the number of elements as a poly_uint64 rather than an
19963         unsigned int.
19964         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19965         from unsigned int to poly_uint64.
19966         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19967         (vec_perm_indices::new_vector): Likewise.
19968         (vec_perm_indices::length): Likewise.
19969         (vec_perm_indices::nelts_per_input): Likewise.
19970         (vec_perm_indices::input_nelts): Likewise.
19971         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19972         number of elements per input as a poly_uint64 rather than an
19973         unsigned int.  Use the original encoding for variable-length
19974         vectors, rather than clamping each individual element.
19975         For the second and subsequent elements in each pattern,
19976         clamp the step and base before clamping their sum.
19977         (vec_perm_indices::series_p): Handle polynomial element counts.
19978         (vec_perm_indices::all_in_range_p): Likewise.
19979         (vec_perm_indices_to_tree): Likewise.
19980         (vec_perm_indices_to_rtx): Likewise.
19981         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19982         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19983         (tree_vector_builder::new_binary_operation): Handle polynomial
19984         element counts.  Return false if we need to know the number
19985         of elements at compile time.
19986         * fold-const.c (fold_vec_perm): Punt if the number of elements
19987         isn't known at compile time.
19989 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19991         * vec-perm-indices.h (vec_perm_builder): Change element type
19992         from HOST_WIDE_INT to poly_int64.
19993         (vec_perm_indices::element_type): Update accordingly.
19994         (vec_perm_indices::clamp): Handle polynomial element_types.
19995         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19996         (vec_perm_indices::all_in_range_p): Likewise.
19997         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19998         than shwi trees.
19999         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20000         polynomial vec_perm_indices element types.
20001         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20002         * fold-const.c (fold_vec_perm): Likewise.
20003         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20004         * tree-vect-generic.c (lower_vec_perm): Likewise.
20005         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20006         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20007         element type to HOST_WIDE_INT.
20009 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20010             Alan Hayward  <alan.hayward@arm.com>
20011             David Sherwood  <david.sherwood@arm.com>
20013         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20014         rather than an int.  Use plus_constant.
20015         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20016         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20018 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20019             Alan Hayward  <alan.hayward@arm.com>
20020             David Sherwood  <david.sherwood@arm.com>
20022         * calls.c (emit_call_1, expand_call): Change struct_value_size from
20023         a HOST_WIDE_INT to a poly_int64.
20025 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20026             Alan Hayward  <alan.hayward@arm.com>
20027             David Sherwood  <david.sherwood@arm.com>
20029         * calls.c (load_register_parameters): Cope with polynomial
20030         mode sizes.  Require a constant size for BLKmode parameters
20031         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
20032         forces a parameter to be padded at the lsb end in order to
20033         fill a complete number of words, require the parameter size
20034         to be ordered wrt UNITS_PER_WORD.
20036 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20037             Alan Hayward  <alan.hayward@arm.com>
20038             David Sherwood  <david.sherwood@arm.com>
20040         * reload1.c (spill_stack_slot_width): Change element type
20041         from unsigned int to poly_uint64_pod.
20042         (alter_reg): Treat mode sizes as polynomial.
20044 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20045             Alan Hayward  <alan.hayward@arm.com>
20046             David Sherwood  <david.sherwood@arm.com>
20048         * reload.c (complex_word_subreg_p): New function.
20049         (reload_inner_reg_of_subreg, push_reload): Use it.
20051 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20052             Alan Hayward  <alan.hayward@arm.com>
20053             David Sherwood  <david.sherwood@arm.com>
20055         * lra-constraints.c (process_alt_operands): Reject matched
20056         operands whose sizes aren't ordered.
20057         (match_reload): Refer to this check here.
20059 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20060             Alan Hayward  <alan.hayward@arm.com>
20061             David Sherwood  <david.sherwood@arm.com>
20063         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20064         that the mode size is in the set {1, 2, 4, 8, 16}.
20066 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20067             Alan Hayward  <alan.hayward@arm.com>
20068             David Sherwood  <david.sherwood@arm.com>
20070         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20071         Use plus_constant instead of gen_rtx_PLUS.
20073 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20074             Alan Hayward  <alan.hayward@arm.com>
20075             David Sherwood  <david.sherwood@arm.com>
20077         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20078         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20079         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20080         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20081         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20082         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20083         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20084         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20085         * config/i386/i386.c (ix86_push_rounding): ...this new function.
20086         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20087         a poly_int64.
20088         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20089         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20090         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20091         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20092         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20093         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20094         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20095         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20096         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20097         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20098         function.
20099         * expr.c (emit_move_resolve_push): Treat the input and result
20100         of PUSH_ROUNDING as a poly_int64.
20101         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20102         (emit_push_insn): Likewise.
20103         * lra-eliminations.c (mark_not_eliminable): Likewise.
20104         * recog.c (push_operand): Likewise.
20105         * reload1.c (elimination_effects): Likewise.
20106         * rtlanal.c (nonzero_bits1): Likewise.
20107         * calls.c (store_one_arg): Likewise.  Require the padding to be
20108         known at compile time.
20110 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20111             Alan Hayward  <alan.hayward@arm.com>
20112             David Sherwood  <david.sherwood@arm.com>
20114         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20115         Use plus_constant instead of gen_rtx_PLUS.
20117 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20118             Alan Hayward  <alan.hayward@arm.com>
20119             David Sherwood  <david.sherwood@arm.com>
20121         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20122         rather than an int.
20124 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20125             Alan Hayward  <alan.hayward@arm.com>
20126             David Sherwood  <david.sherwood@arm.com>
20128         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20129         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20130         via stack temporaries.  Treat the mode size as polynomial too.
20132 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20133             Alan Hayward  <alan.hayward@arm.com>
20134             David Sherwood  <david.sherwood@arm.com>
20136         * expr.c (expand_expr_real_2): When handling conversions involving
20137         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20138         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
20139         as a poly_uint64 too.
20141 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20142             Alan Hayward  <alan.hayward@arm.com>
20143             David Sherwood  <david.sherwood@arm.com>
20145         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20147 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20148             Alan Hayward  <alan.hayward@arm.com>
20149             David Sherwood  <david.sherwood@arm.com>
20151         * combine.c (can_change_dest_mode): Handle polynomial
20152         REGMODE_NATURAL_SIZE.
20153         * expmed.c (store_bit_field_1): Likewise.
20154         * expr.c (store_constructor): Likewise.
20155         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20156         and polynomial REGMODE_NATURAL_SIZE.
20157         (gen_lowpart_common): Likewise.
20158         * reginfo.c (record_subregs_of_mode): Likewise.
20159         * rtlanal.c (read_modify_subreg_p): Likewise.
20161 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20162             Alan Hayward  <alan.hayward@arm.com>
20163             David Sherwood  <david.sherwood@arm.com>
20165         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20166         numbers of elements.
20168 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20169             Alan Hayward  <alan.hayward@arm.com>
20170             David Sherwood  <david.sherwood@arm.com>
20172         * match.pd: Cope with polynomial numbers of vector elements.
20174 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20175             Alan Hayward  <alan.hayward@arm.com>
20176             David Sherwood  <david.sherwood@arm.com>
20178         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20179         in a POINTER_PLUS_EXPR.
20181 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20182             Alan Hayward  <alan.hayward@arm.com>
20183             David Sherwood  <david.sherwood@arm.com>
20185         * omp-simd-clone.c (simd_clone_subparts): New function.
20186         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20187         (ipa_simd_modify_function_body): Likewise.
20189 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20190             Alan Hayward  <alan.hayward@arm.com>
20191             David Sherwood  <david.sherwood@arm.com>
20193         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20194         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20195         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20196         (expand_vector_condition, vector_element): Likewise.
20197         (subparts_gt): New function.
20198         (get_compute_type): Use subparts_gt.
20199         (count_type_subparts): Delete.
20200         (expand_vector_operations_1): Use subparts_gt instead of
20201         count_type_subparts.
20203 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20204             Alan Hayward  <alan.hayward@arm.com>
20205             David Sherwood  <david.sherwood@arm.com>
20207         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
20208         (vect_compile_time_alias): ...this new function.  Do the calculation
20209         on poly_ints rather than trees.
20210         (vect_prune_runtime_alias_test_list): Update call accordingly.
20212 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20213             Alan Hayward  <alan.hayward@arm.com>
20214             David Sherwood  <david.sherwood@arm.com>
20216         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20217         numbers of units.
20218         (vect_schedule_slp_instance): Likewise.
20220 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20221             Alan Hayward  <alan.hayward@arm.com>
20222             David Sherwood  <david.sherwood@arm.com>
20224         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
20225         constant and extern definitions for variable-length vectors.
20226         (vect_get_constant_vectors): Note that the number of units
20227         is known to be constant.
20229 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20230             Alan Hayward  <alan.hayward@arm.com>
20231             David Sherwood  <david.sherwood@arm.com>
20233         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
20234         of units as polynomial.  Choose between WIDE and NARROW based
20235         on multiple_p.
20237 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20238             Alan Hayward  <alan.hayward@arm.com>
20239             David Sherwood  <david.sherwood@arm.com>
20241         * tree-vect-stmts.c (simd_clone_subparts): New function.
20242         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
20244 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20245             Alan Hayward  <alan.hayward@arm.com>
20246             David Sherwood  <david.sherwood@arm.com>
20248         * tree-vect-stmts.c (vectorizable_call): Treat the number of
20249         vectors as polynomial.  Use build_index_vector for
20250         IFN_GOMP_SIMD_LANE.
20252 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20253             Alan Hayward  <alan.hayward@arm.com>
20254             David Sherwood  <david.sherwood@arm.com>
20256         * tree-vect-stmts.c (get_load_store_type): Treat the number of
20257         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
20258         for variable-length vectors.
20259         (vectorizable_mask_load_store): Treat the number of units as
20260         polynomial, asserting that it is constant if the condition has
20261         already been enforced.
20262         (vectorizable_store, vectorizable_load): Likewise.
20264 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20265             Alan Hayward  <alan.hayward@arm.com>
20266             David Sherwood  <david.sherwood@arm.com>
20268         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
20269         of units as polynomial.  Punt if we can't tell at compile time
20270         which vector contains the final result.
20272 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20273             Alan Hayward  <alan.hayward@arm.com>
20274             David Sherwood  <david.sherwood@arm.com>
20276         * tree-vect-loop.c (vectorizable_induction): Treat the number
20277         of units as polynomial.  Punt on SLP inductions.  Use an integer
20278         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
20279         cast of such a series for variable-length floating-point
20280         reductions.
20282 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20283             Alan Hayward  <alan.hayward@arm.com>
20284             David Sherwood  <david.sherwood@arm.com>
20286         * tree.h (build_index_vector): Declare.
20287         * tree.c (build_index_vector): New function.
20288         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
20289         of units as polynomial, forcibly converting it to a constant if
20290         vectorizable_reduction has already enforced the condition.
20291         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
20292         to create a {1,2,3,...} vector.
20293         (vectorizable_reduction): Treat the number of units as polynomial.
20294         Choose vectype_in based on the largest scalar element size rather
20295         than the smallest number of units.  Enforce the restrictions
20296         relied on above.
20298 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20299             Alan Hayward  <alan.hayward@arm.com>
20300             David Sherwood  <david.sherwood@arm.com>
20302         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
20303         number of units as polynomial.
20305 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20306             Alan Hayward  <alan.hayward@arm.com>
20307             David Sherwood  <david.sherwood@arm.com>
20309         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
20310         * target.def (autovectorize_vector_sizes): Return the vector sizes
20311         by pointer, using vector_sizes rather than a bitmask.
20312         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
20313         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
20314         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20315         Likewise.
20316         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20317         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20318         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20319         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20320         * omp-general.c (omp_max_vf): Likewise.
20321         * omp-low.c (omp_clause_aligned_alignment): Likewise.
20322         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20323         * tree-vect-loop.c (vect_analyze_loop): Likewise.
20324         * tree-vect-slp.c (vect_slp_bb): Likewise.
20325         * doc/tm.texi: Regenerate.
20326         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20327         to a poly_uint64.
20328         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20329         the vector size as a poly_uint64 rather than an unsigned int.
20330         (current_vector_size): Change from an unsigned int to a poly_uint64.
20331         (get_vectype_for_scalar_type): Update accordingly.
20332         * tree.h (build_truth_vector_type): Take the size and number of
20333         units as a poly_uint64 rather than an unsigned int.
20334         (build_vector_type): Add a temporary overload that takes
20335         the number of units as a poly_uint64 rather than an unsigned int.
20336         * tree.c (make_vector_type): Likewise.
20337         (build_truth_vector_type): Take the number of units as a poly_uint64
20338         rather than an unsigned int.
20340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20341             Alan Hayward  <alan.hayward@arm.com>
20342             David Sherwood  <david.sherwood@arm.com>
20344         * target.def (get_mask_mode): Take the number of units and length
20345         as poly_uint64s rather than unsigned ints.
20346         * targhooks.h (default_get_mask_mode): Update accordingly.
20347         * targhooks.c (default_get_mask_mode): Likewise.
20348         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20349         * doc/tm.texi: Regenerate.
20351 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20352             Alan Hayward  <alan.hayward@arm.com>
20353             David Sherwood  <david.sherwood@arm.com>
20355         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20356         * omp-general.c (omp_max_vf): Likewise.
20357         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20358         (expand_omp_simd): Handle polynomial safelen.
20359         * omp-low.c (omplow_simd_context): Add a default constructor.
20360         (omplow_simd_context::max_vf): Change from int to poly_uint64.
20361         (lower_rec_simd_input_clauses): Update accordingly.
20362         (lower_rec_input_clauses): Likewise.
20364 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20365             Alan Hayward  <alan.hayward@arm.com>
20366             David Sherwood  <david.sherwood@arm.com>
20368         * tree-vectorizer.h (vect_nunits_for_cost): New function.
20369         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20370         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20371         (vect_analyze_slp_cost): Likewise.
20372         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20373         (vect_model_load_cost): Likewise.
20375 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20376             Alan Hayward  <alan.hayward@arm.com>
20377             David Sherwood  <david.sherwood@arm.com>
20379         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20380         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20381         from an unsigned int * to a poly_uint64_pod *.
20382         (calculate_unrolling_factor): New function.
20383         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
20385 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20386             Alan Hayward  <alan.hayward@arm.com>
20387             David Sherwood  <david.sherwood@arm.com>
20389         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20390         from an unsigned int to a poly_uint64.
20391         (_loop_vec_info::slp_unrolling_factor): Likewise.
20392         (_loop_vec_info::vectorization_factor): Change from an int
20393         to a poly_uint64.
20394         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20395         (vect_get_num_vectors): New function.
20396         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20397         (vect_get_num_copies): Use vect_get_num_vectors.
20398         (vect_analyze_data_ref_dependences): Change max_vf from an int *
20399         to an unsigned int *.
20400         (vect_analyze_data_refs): Change min_vf from an int * to a
20401         poly_uint64 *.
20402         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20403         than an unsigned HOST_WIDE_INT.
20404         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20405         (vect_analyze_data_ref_dependence): Change max_vf from an int *
20406         to an unsigned int *.
20407         (vect_analyze_data_ref_dependences): Likewise.
20408         (vect_compute_data_ref_alignment): Handle polynomial vf.
20409         (vect_enhance_data_refs_alignment): Likewise.
20410         (vect_prune_runtime_alias_test_list): Likewise.
20411         (vect_shift_permute_load_chain): Likewise.
20412         (vect_supportable_dr_alignment): Likewise.
20413         (dependence_distance_ge_vf): Take the vectorization factor as a
20414         poly_uint64 rather than an unsigned HOST_WIDE_INT.
20415         (vect_analyze_data_refs): Change min_vf from an int * to a
20416         poly_uint64 *.
20417         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20418         vfm1 as a poly_uint64 rather than an int.  Make the same change
20419         for the returned bound_scalar.
20420         (vect_gen_vector_loop_niters): Handle polynomial vf.
20421         (vect_do_peeling): Likewise.  Update call to
20422         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20423         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20424         be constant.
20425         * tree-vect-loop.c (vect_determine_vectorization_factor)
20426         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20427         (vect_get_known_peeling_cost): Likewise.
20428         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20429         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20430         (vect_transform_loop): Likewise.  Use the lowest possible VF when
20431         updating the upper bounds of the loop.
20432         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
20433         rather than an int.
20434         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20435         polynomial unroll factors.
20436         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20437         (vect_make_slp_decision): Likewise.
20438         (vect_supported_load_permutation_p): Likewise, and polynomial
20439         vf too.
20440         (vect_analyze_slp_cost): Handle polynomial vf.
20441         (vect_slp_analyze_node_operations): Likewise.
20442         (vect_slp_analyze_bb_1): Likewise.
20443         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20444         than an unsigned HOST_WIDE_INT.
20445         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20446         (vectorizable_load): Handle polynomial vf.
20447         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20448         a poly_uint64.
20449         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20451 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20452             Alan Hayward  <alan.hayward@arm.com>
20453             David Sherwood  <david.sherwood@arm.com>
20455         * match.pd: Handle bit operations involving three constants
20456         and try to fold one pair.
20458 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20460         * tree-vect-loop-manip.c: Include gimple-fold.h.
20461         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20462         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
20463         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20464         Add a path that uses a step of VF instead of 1, but disable it
20465         for now.
20466         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20467         and niters_no_overflow parameters.  Update calls to
20468         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20469         Create a new SSA name if the latter choses to use a ste other
20470         than zero, and return it via niters_vector_mult_vf_var.
20471         * tree-vect-loop.c (vect_transform_loop): Update calls to
20472         vect_do_peeling, vect_gen_vector_loop_niters and
20473         slpeel_make_loop_iterate_ntimes.
20474         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20475         (vect_gen_vector_loop_niters): Update declarations after above changes.
20477 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
20479         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20480         128-bit round to integer instructions.
20481         (ceil<mode>2): Likewise.
20482         (btrunc<mode>2): Likewise.
20483         (round<mode>2): Likewise.
20485 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20487         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20488         unaligned VSX load/store on P8/P9.
20489         (expand_block_clear): Allow the use of unaligned VSX
20490         load/store on P8/P9.
20492 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20494         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20495         New function.
20496         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20497         swap associated with both a load and a store.
20499 2018-01-02  Andrew Waterman  <andrew@sifive.com>
20501         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20502         * config/riscv/riscv.md (clear_cache): Use it.
20504 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
20506         * web.c: Remove out-of-date comment.
20508 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20510         * expr.c (fixup_args_size_notes): Check that any existing
20511         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20512         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20513         (emit_single_push_insn): ...here.
20515 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20517         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20518         (const_vector_encoded_nelts): New function.
20519         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20520         (const_vector_int_elt, const_vector_elt): Declare.
20521         * emit-rtl.c (const_vector_int_elt_1): New function.
20522         (const_vector_elt): Likewise.
20523         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20524         of CONST_VECTOR_ELT.
20526 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20528         * expr.c: Include rtx-vector-builder.h.
20529         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20530         directly on the tree encoding.
20531         (const_vector_from_tree): Likewise.
20532         * optabs.c: Include rtx-vector-builder.h.
20533         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20534         sequence of "u" values.
20535         * vec-perm-indices.c: Include rtx-vector-builder.h.
20536         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20537         directly on the vec_perm_indices encoding.
20539 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20541         * doc/rtl.texi (const_vector): Describe new encoding scheme.
20542         * Makefile.in (OBJS): Add rtx-vector-builder.o.
20543         * rtx-vector-builder.h: New file.
20544         * rtx-vector-builder.c: Likewise.
20545         * rtl.h (rtx_def::u2): Add a const_vector field.
20546         (CONST_VECTOR_NPATTERNS): New macro.
20547         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20548         (CONST_VECTOR_DUPLICATE_P): Likewise.
20549         (CONST_VECTOR_STEPPED_P): Likewise.
20550         (CONST_VECTOR_ENCODED_ELT): Likewise.
20551         (const_vec_duplicate_p): Check for a duplicated vector encoding.
20552         (unwrap_const_vec_duplicate): Likewise.
20553         (const_vec_series_p): Check for a non-duplicated vector encoding.
20554         Say that the function only returns true for integer vectors.
20555         * emit-rtl.c: Include rtx-vector-builder.h.
20556         (gen_const_vec_duplicate_1): Delete.
20557         (gen_const_vector): Call gen_const_vec_duplicate instead of
20558         gen_const_vec_duplicate_1.
20559         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20560         (gen_const_vec_duplicate): Use rtx_vector_builder.
20561         (gen_const_vec_series): Likewise.
20562         (gen_rtx_CONST_VECTOR): Likewise.
20563         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20564         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20565         Build a new vector rather than modifying a CONST_VECTOR in-place.
20566         (handle_special_swappables): Update call accordingly.
20567         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20568         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20569         Build a new vector rather than modifying a CONST_VECTOR in-place.
20570         (handle_special_swappables): Update call accordingly.
20572 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20574         * simplify-rtx.c (simplify_const_binary_operation): Use
20575         CONST_VECTOR_ELT instead of XVECEXP.
20577 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20579         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20580         the selector elements to be different from the data elements
20581         if the selector is a VECTOR_CST.
20582         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20583         ssizetype for the selector.
20585 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20587         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20588         before testing each element individually.
20589         * tree-vect-generic.c (lower_vec_perm): Likewise.
20591 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20593         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20594         * selftest-run-tests.c (selftest::run_tests): Call it.
20595         * vector-builder.h (vector_builder::operator ==): New function.
20596         (vector_builder::operator !=): Likewise.
20597         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20598         (vec_perm_indices::all_from_input_p): New function.
20599         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20600         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20601         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20602         instead of reading the VECTOR_CST directly.  Detect whether both
20603         vector inputs are the same before constructing the vec_perm_indices,
20604         and update the number of inputs argument accordingly.  Use the
20605         utility functions added above.  Only construct sel2 if we need to.
20607 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20609         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20610         the broadcast of the low byte.
20611         (expand_mult_highpart): Use an explicit encoding for the permutes.
20612         * optabs-query.c (can_mult_highpart_p): Likewise.
20613         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20614         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20615         (vectorizable_bswap): Likewise.
20616         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20617         explicit encoding for the power-of-2 permutes.
20618         (vect_permute_store_chain): Likewise.
20619         (vect_grouped_load_supported): Likewise.
20620         (vect_permute_load_chain): Likewise.
20622 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20624         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20625         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20626         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20627         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20628         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20629         (vect_gen_perm_mask_any): Likewise.
20631 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20633         * int-vector-builder.h: New file.
20634         * vec-perm-indices.h: Include int-vector-builder.h.
20635         (vec_perm_indices): Redefine as an int_vector_builder.
20636         (auto_vec_perm_indices): Delete.
20637         (vec_perm_builder): Redefine as a stand-alone class.
20638         (vec_perm_indices::vec_perm_indices): New function.
20639         (vec_perm_indices::clamp): Likewise.
20640         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20641         (vec_perm_indices::new_vector): New function.
20642         (vec_perm_indices::new_expanded_vector): Update for new
20643         vec_perm_indices class.
20644         (vec_perm_indices::rotate_inputs): New function.
20645         (vec_perm_indices::all_in_range_p): Operate directly on the
20646         encoded form, without computing elided elements.
20647         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20648         encoding.  Update for new vec_perm_indices class.
20649         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20650         the given vec_perm_builder.
20651         (expand_vec_perm_var): Update vec_perm_builder constructor.
20652         (expand_mult_highpart): Use vec_perm_builder instead of
20653         auto_vec_perm_indices.
20654         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20655         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
20656         or double series encoding as appropriate.
20657         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20658         vec_perm_indices instead of auto_vec_perm_indices.
20659         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20660         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20661         (vect_permute_store_chain): Likewise.
20662         (vect_grouped_load_supported): Likewise.
20663         (vect_permute_load_chain): Likewise.
20664         (vect_shift_permute_load_chain): Likewise.
20665         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20666         (vect_transform_slp_perm_load): Likewise.
20667         (vect_schedule_slp_instance): Likewise.
20668         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20669         (vectorizable_mask_load_store): Likewise.
20670         (vectorizable_bswap): Likewise.
20671         (vectorizable_store): Likewise.
20672         (vectorizable_load): Likewise.
20673         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20674         vec_perm_indices instead of auto_vec_perm_indices.  Use
20675         tree_to_vec_perm_builder to read the vector from a tree.
20676         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20677         vec_perm_builder instead of a vec_perm_indices.
20678         (have_whole_vector_shift): Use vec_perm_builder and
20679         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
20680         truncation to calc_vec_perm_mask_for_shift.
20681         (vect_create_epilog_for_reduction): Likewise.
20682         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20683         from auto_vec_perm_indices to vec_perm_indices.
20684         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20685         instead of changing individual elements.
20686         (aarch64_vectorize_vec_perm_const): Use new_vector to install
20687         the vector in d.perm.
20688         * config/arm/arm.c (expand_vec_perm_d::perm): Change
20689         from auto_vec_perm_indices to vec_perm_indices.
20690         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20691         instead of changing individual elements.
20692         (arm_vectorize_vec_perm_const): Use new_vector to install
20693         the vector in d.perm.
20694         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20695         Update vec_perm_builder constructor.
20696         (rs6000_expand_interleave): Likewise.
20697         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20698         (rs6000_expand_interleave): Likewise.
20700 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20702         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20703         to qimode could truncate the indices.
20704         * optabs.c (expand_vec_perm_var): Likewise.
20706 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20708         * Makefile.in (OBJS): Add vec-perm-indices.o.
20709         * vec-perm-indices.h: New file.
20710         * vec-perm-indices.c: Likewise.
20711         * target.h (vec_perm_indices): Replace with a forward class
20712         declaration.
20713         (auto_vec_perm_indices): Move to vec-perm-indices.h.
20714         * optabs.h: Include vec-perm-indices.h.
20715         (expand_vec_perm): Delete.
20716         (selector_fits_mode_p, expand_vec_perm_var): Declare.
20717         (expand_vec_perm_const): Declare.
20718         * target.def (vec_perm_const_ok): Replace with...
20719         (vec_perm_const): ...this new hook.
20720         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20721         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20722         * doc/tm.texi: Regenerate.
20723         * optabs.def (vec_perm_const): Delete.
20724         * doc/md.texi (vec_perm_const): Likewise.
20725         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20726         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20727         expand_vec_perm for constant permutation vectors.  Assert that
20728         the mode of variable permutation vectors is the integer equivalent
20729         of the mode that is being permuted.
20730         * optabs-query.h (selector_fits_mode_p): Declare.
20731         * optabs-query.c: Include vec-perm-indices.h.
20732         (selector_fits_mode_p): New function.
20733         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20734         is defined, instead of checking whether the vec_perm_const_optab
20735         exists.  Use targetm.vectorize.vec_perm_const instead of
20736         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
20737         fit in the vector mode before using a variable permute.
20738         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20739         vec_perm_indices instead of an rtx.
20740         (expand_vec_perm): Replace with...
20741         (expand_vec_perm_const): ...this new function.  Take the selector
20742         as a vec_perm_indices rather than an rtx.  Also take the mode of
20743         the selector.  Update call to shift_amt_for_vec_perm_mask.
20744         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20745         Use vec_perm_indices::new_expanded_vector to expand the original
20746         selector into bytes.  Check whether the indices fit in the vector
20747         mode before using a variable permute.
20748         (expand_vec_perm_var): Make global.
20749         (expand_mult_highpart): Use expand_vec_perm_const.
20750         * fold-const.c: Includes vec-perm-indices.h.
20751         * tree-ssa-forwprop.c: Likewise.
20752         * tree-vect-data-refs.c: Likewise.
20753         * tree-vect-generic.c: Likewise.
20754         * tree-vect-loop.c: Likewise.
20755         * tree-vect-slp.c: Likewise.
20756         * tree-vect-stmts.c: Likewise.
20757         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20758         Delete.
20759         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20760         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20761         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20762         (aarch64_vectorize_vec_perm_const): ...this new function.
20763         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20764         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20765         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20766         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20767         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20768         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20769         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20770         into...
20771         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
20772         check for NEON modes.
20773         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20774         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20775         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20776         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20777         into...
20778         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
20779         the old VEC_PERM_CONST conditions.
20780         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20781         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20782         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20783         (ia64_vectorize_vec_perm_const_ok): Merge into...
20784         (ia64_vectorize_vec_perm_const): ...this new function.
20785         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20786         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20787         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20788         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20789         * config/mips/mips.c (mips_expand_vec_perm_const)
20790         (mips_vectorize_vec_perm_const_ok): Merge into...
20791         (mips_vectorize_vec_perm_const): ...this new function.
20792         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20793         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20794         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20795         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20796         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20797         (rs6000_expand_vec_perm_const): Delete.
20798         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20799         Delete.
20800         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20801         (altivec_expand_vec_perm_const_le): Take each operand individually.
20802         Operate on constant selectors rather than rtxes.
20803         (altivec_expand_vec_perm_const): Likewise.  Update call to
20804         altivec_expand_vec_perm_const_le.
20805         (rs6000_expand_vec_perm_const): Delete.
20806         (rs6000_vectorize_vec_perm_const_ok): Delete.
20807         (rs6000_vectorize_vec_perm_const): New function.
20808         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20809         an element count and rtx array.
20810         (rs6000_expand_extract_even): Update call accordingly.
20811         (rs6000_expand_interleave): Likewise.
20812         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20813         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20814         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20815         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20816         (rs6000_expand_vec_perm_const): Delete.
20817         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20818         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20819         (altivec_expand_vec_perm_const_le): Take each operand individually.
20820         Operate on constant selectors rather than rtxes.
20821         (altivec_expand_vec_perm_const): Likewise.  Update call to
20822         altivec_expand_vec_perm_const_le.
20823         (rs6000_expand_vec_perm_const): Delete.
20824         (rs6000_vectorize_vec_perm_const_ok): Delete.
20825         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
20826         reference to the SPE evmerge intructions.
20827         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20828         an element count and rtx array.
20829         (rs6000_expand_extract_even): Update call accordingly.
20830         (rs6000_expand_interleave): Likewise.
20831         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20832         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20833         new function.
20834         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20836 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20838         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20839         vector mode and that that mode matches the mode of the data
20840         being permuted.
20841         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20842         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
20843         directly using expand_vec_perm_1 when forcing selectors into
20844         registers.
20845         (expand_vec_perm_var): New function, split out from expand_vec_perm.
20847 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20849         * optabs-query.h (can_vec_perm_p): Delete.
20850         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20851         * optabs-query.c (can_vec_perm_p): Split into...
20852         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20853         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20854         particular selector is valid.
20855         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20856         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20857         (vect_grouped_load_supported): Likewise.
20858         (vect_shift_permute_load_chain): Likewise.
20859         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20860         (vect_transform_slp_perm_load): Likewise.
20861         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20862         (vectorizable_bswap): Likewise.
20863         (vect_gen_perm_mask_checked): Likewise.
20864         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
20865         implementations of variable permutation vectors into account
20866         when deciding which selector to use.
20867         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20868         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20869         with a false third argument.
20870         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20871         to test whether the constant selector is valid and can_vec_perm_var_p
20872         to test whether a variable selector is valid.
20874 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20876         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20877         * optabs-query.c (can_vec_perm_p): Likewise.
20878         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20879         instead of vec_perm_indices.
20880         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20881         (vect_gen_perm_mask_checked): Likewise,
20882         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20883         (vect_gen_perm_mask_checked): Likewise,
20885 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20887         * optabs-query.h (qimode_for_vec_perm): Declare.
20888         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20889         (qimode_for_vec_perm): ...this new function.
20890         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20892 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20894         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20895         does not have a conditional at the top.
20897 2018-01-02  Richard Biener  <rguenther@suse.de>
20899         * ipa-inline.c (big_speedup_p): Fix expression.
20901 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20903         PR target/81616
20904         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20905         for generic 4->6.
20907 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20909         PR target/81616
20910         Generic tuning.
20911         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20912         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20913         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20914         cond_taken_branch_cost 3->4.
20916 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
20918         PR tree-optimization/83581
20919         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20920         TODO_cleanup_cfg if any changes have been made.
20922         PR middle-end/83608
20923         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20924         convert_modes if target mode has the right side, but different mode
20925         class.
20927         PR middle-end/83609
20928         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20929         last argument when extracting from CONCAT.  If either from_real or
20930         from_imag is NULL, use expansion through memory.  If result is not
20931         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20932         the parts directly to inner mode, if even that fails, use expansion
20933         through memory.
20935         PR middle-end/83623
20936         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20937         check for bswap in mode rather than HImode and use that in expand_unop
20938         too.
20940 Copyright (C) 2018 Free Software Foundation, Inc.
20942 Copying and distribution of this file, with or without modification,
20943 are permitted in any medium without royalty provided the copyright
20944 notice and this notice are preserved.