GCOV: add cache for streamed locations.
[official-gcc.git] / gcc / ChangeLog
blobca678154c6439aae018acf25b43091c67176682d
1 2018-07-31  Martin Liska  <mliska@suse.cz>
3         PR gcov-profile/85338
4         PR gcov-profile/85350
5         PR gcov-profile/85372
6         * profile.c (struct location_triplet): New.
7         (struct location_triplet_hash): Likewise.
8         (output_location): Do not output a BB that
9         is already recorded for a line.
10         (branch_prob): Use streamed_locations.
12 2018-07-31  Martin Liska  <mliska@suse.cz>
14         PR gcov-profile/85370
15         * coverage.c (coverage_begin_function): Do not mark target
16         clones as artificial functions.
18 2018-07-31  Martin Liska  <mliska@suse.cz>
20         PR gcov-profile/83813
21         PR gcov-profile/84758
22         PR gcov-profile/85217
23         PR gcov-profile/85332
24         * profile.c (branch_prob): Do not record GOTO expressions
25         for GIMPLE statements which locations are already streamed.
27 2018-07-31  Olivier Hainque  <hainque@adacore.com>
29         * gcc.c (handle_spec_function): Accept a soft_matched_part
30         argument, as do_spec_1.  Pass it down to ...
31         (eval_spec_function): Accept a soft_matched_part argument,
32         and pass it down to ...
33         (do_spec_2): Accept a soft_matched_part argument, and pass
34         it down to do_spec_1.
35         (do_spec_1): Pass soft_matched_part to handle_spec_function.
36         (handle_braces): Update call to handle_spec_function.
37         (driver::set_up_specs): Update calls to do_spec_2.
38         (compare_debug_dump_opt_spec_function): Likewise.
39         (compare_debug_self_opt_spec_function): Likewise.
41 2018-07-31  Olivier Hainque  <hainque@adacore.com>
43         * common.opt (nolibc): New option.
44         * doc/invoke.texi (Link Options): Document it.
45         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
46         * config/alpha/linux.h: Likewise.
47         * config/arc/elf.h: Likewise.
48         * config/arm/uclinux-elf.h: Likewise.
49         * config/arm/unknown-elf.h: Likewise.
50         * config/avr/avrlibc.h: Likewise.
51         * config/bfin/bfin.h: Likewise.
52         * config/bfin/linux.h: Likewise.
53         * config/bfin/uclinux.h: Likewise.
54         * config/darwin.h: Likewise.
55         * config/darwin10.h: Likewise.
56         * config/darwin12.h: Likewise.
57         * config/gnu-user.h: Likewise.
58         * config/lm32/uclinux-elf.h: Likewise.
59         * config/pa/pa-hpux11.h: Likewise.
60         * config/pa/pa64-hpux.h: Likewise.
61         * config/sparc/sparc.h: Likewise.
63 2018-07-31  Olivier Hainque  <hainque@adacore.com>
65         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
66         undefined variables.
68 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
70         PR target/86640
71         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
72         instead of GEN_INT.
74 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
76         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
77         terminated string literal.
79 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
81         PR rtl-optimization/85160
82         * combine.c (is_just_move): New function.
83         (try_combine): Allow combining two instructions into two if neither of
84         the original instructions was a move.
86 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
88         PR target/86673
89         * doc/extend.texi (Global Register Variables): Discourage use of type
90         qualifiers.
91         (Local Register Variables): Likewise.
93 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
95         PR tree-optimization/86506
96         * hwint.h (ceil_log2): Resync with hwint.c implementation.
98 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
100         PR target/86547
101         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
102         hard_regno, make sure no insn between `from` and `to` clobbers it.
104 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
105             Tom de Vries  <tdevries@suse.de>
107         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
108         (PTX_DEFAULT_RUNTIME_DIM): ... this.
109         (nvptx_goacc_validate_dims): Set default worker and gang dims to
110         PTX_DEFAULT_RUNTIME_DIM.
111         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
113 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
115         * config/pa/pa.c (pa_output_addr_vec): Align address table.
116         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
117         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
119 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
121         * config/rs6000/constraints.md (wG constraint): Delete, no longer
122         used.
123         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
124         predicate to reflect toc fusion has been deleted.
125         (toc_fusion_mem_raw): Delete, no longer used.
126         (toc_fusion_mem_wrapped): Likewise.
127         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
128         fusion mask bit.
129         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
130         Delete, no longer used.
131         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
132         meant to be used for toc fusion.
133         (rs6000_debug_print_mode): Delete toc fusion debugging.
134         (rs6000_debug_reg_global): Likewise.
135         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
136         fusion and secondary reload support that were never used.
137         (rs6000_option_override_internal): Delete TOC fusion, that was only
138         partially defined, and it did not work unless you also used the
139         -mcmodel= switch.
140         (rs6000_legitimate_address_p): Delete TOC fusion support.
141         (rs6000_opt_masks): Likewise.
142         (fusion_wrap_memory_address): Delete function, no longer used.
143         (fusion_split_address); Delete TOC fusion support.
144         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
145         longer used with toc fusion being deleted.
146         (TARGET_TOC_FUSION_FP): Likewise.
147         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
148         UNSPEC.
149         (toc fusion spliter): Delete TOC fusion support.
150         (toc_fusionload_<mode>): Likewise.
151         (toc_fusionload_di): Likewise.
152         (fusion_gpr_load_<mode>): Delete generator function, this insn no
153         longer needs to be named.  Rename predicate to delete TOC fusion.
154         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
155         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
156         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
157         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
158         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
160 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
162         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
163         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
164         __int128 in built-in function prototypes.
165         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
166         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
168 2018-07-27  Martin Sebor  <msebor@redhat.com>
170         PR tree-optimization/86696
171         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
172         types, including enums.
173         (handle_char_store): Be prepared for the above function to fail.
175 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
177         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
178         when optimization level is lower than 2 or optimize for size.
180 2018-07-26  Martin Sebor  <msebor@redhat.com>
182         PR tree-optimization/86043
183         PR tree-optimization/86042
184         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
185         (get_string_cst_length): Rename...
186         (get_min_string_length): ...to this.  Add argument.
187         (handle_char_store): Extend to handle multi-character stores by
188         MEM_REF.
189         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
190         * tree.h (initializer_zerop): Add argument.
192 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
194         PR middle-end/86660
195         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
196         declare target to variables if they have always,{to,from,tofrom} map
197         kinds.
199 2018-07-26  Martin Liska  <mliska@suse.cz>
201         PR lto/86548
202         * lto-wrapper.c: Add linker_output as prefix
203         for ltrans_output_file.
205 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
207         PR rtl-optimization/85805
208         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
209         value for hard registers if that was written in the same mode.
211 2018-07-26  Martin Liska  <mliska@suse.cz>
213         PR gcov-profile/86536
214         * gcov.c (format_gcov): Use printf format %.*f directly
215         and do not handle special values.
217 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
219         * common/config/arc/arc-common.c (arc_option_optimization_table):
220         Update default optimizations for size.
222 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
224         * config/arc/arc.md (movsf_insn): Add short instruction selection.
225         * config/arc/constraints.md (CfZ): New constraint.
226         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
227         (subsf3_fpu): Likewise.
228         (cmpsf_fpu): Likewise.
229         (cmpsf_fpu_uneq): Likewise.
231 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
233         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
234         accesses as well.
235         (arc_is_uncached_mem_p): uncached applies to both the variable and
236         the pointer.
238 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
240         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
241         register names.
243 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
245         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
246         field "m_scopes" from vec to auto_vec.
248 2018-07-25  Martin Liska  <mliska@suse.cz>
250         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
251         return type.
253 2018-07-25  Richard Biener  <rguenther@suse.de>
255         PR debug/86654
256         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
257         special wrt context_die late.
258         (gen_subprogram_die): Re-use DIEs in local scope.
260 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
262         PR tree-optimization/86644
263         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
265 2018-07-25  Martin Liska  <mliska@suse.cz>
267         PR middle-end/86645
268         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
269         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
271 2018-07-25  Martin Liska  <mliska@suse.cz>
273         PR sanitizer/79635
274         * params.def: Explain ASan abbreviation and provide
275         a documentation link.
277 2018-07-24  Martin Sebor  <msebor@redhat.com>
279         PR tree-optimization/86622
280         PR tree-optimization/86532
281         * builtins.h (string_length): Declare.
282         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
283         (check_access): Be prepared for non-constant length ranges.
284         (string_length): Make extern.
285         * expr.c (string_constant): Only handle the minor non-constant
286         array index.  Use string_constant to compute the length of
287         a generic string constant.
289 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
291         PR tree-optimization/86618
292         * tree-vect-stmts.c (vectorizable_call): Don't take the address
293         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
295 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
297         PR tree-optimization/86636
298         * json.cc (json::object::set): Fix comment.  Add assertions.
299         (json::array::append): Move here from json.h.  Add comment and an
300         assertion.
301         (json::string::string): Likewise.
302         * json.h (json::array::append): Move to json.cc.
303         (json::string::string): Likewise.
304         * optinfo-emit-json.cc
305         (optrecord_json_writer::impl_location_to_json): Assert that we
306         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
307         wrapper around it.  Expand the location once, rather than three
308         times.
309         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
310         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
311         wrappers.
312         (optrecord_json_writer::optinfo_to_json): Likewise, in four
313         places.  Fix some overlong lines.
315 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
317         * config/aarch64/aarch64-simd.md
318         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
319         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
320         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
321         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
322         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
323         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
324         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
325         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
326         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
328 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
330         PR middle-end/86627
331         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
332         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
333         and abs_d == d, do the power of two handling if profitable.
335 2018-07-24  Richard Biener  <rguenther@suse.de>
337         * match.pd: Add BIT_FIELD_REF canonicalizations.
339 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
341         PR c/86617
342         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
344 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
346         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
347         terminated STRING_CST object.
349 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
351         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
353 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
355         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
356         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
357         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
358         the elements into a register.
359         (rs6000_split_v4si_init_di_reg): Delete.
360         (rs6000_split_v4si_init): Delete.
361         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
362         (vsx_init_v4si): Rewrite as a define_expand.
364 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
366         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
367         zero_extend argument from memory): New.
369 2018-07-22  Martin Sebor  <msebor@redhat.com>
371         PR bootstrap/86621
372         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
373         diagnosing calls with unknown arguments unless -Walloca-larger-than
374         is restricted to less than PTRDIFF_MAX bytes.
376 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
378         * doc/gcov.texi (Invoking Gcov): Editorial changes.
380 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
382         * pretty-print.c (text_info::set_location): Remove redundant
383         "line_table" parameter from call to rich_location::set_range.
385 2018-07-20  Martin Sebor  <msebor@redhat.com>
387         PR middle-end/82063
388         * builtins.c (expand_builtin_alloca): Adjust.
389         * calls.c (alloc_max_size): Simplify.
390         * cgraphunit.c (cgraph_node::expand): Adjust.
391         * common.opt (larger_than_size, warn_frame_larger_than): Remove
392         variables.
393         (frame_larger_than_size): Same.
394         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
395         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
396         Initialize.
397         * doc/invoke.texi (GCC Command Options): Document option arguments.
398         Explain byte-size arguments and suffixes.
399         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
400         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
401         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
402         * doc/options.texi (UInteger): Expand.
403         (Host_Wide_Int, ByteSize): Document new properties.
404         * final.c (final_start_function_1): Include sizes in an error message.
405         * function.c (frame_offset_overflow): Same.
406         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
407         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
408         Diagnose unbounded alloca calls only for limits of less than
409         PTRDIFF_MAX.
410         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
411         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
412         for alloca(0).
413         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
414         only for limits of less than PTRDIFF_MAX.
415         * langhooks-def.h (lhd_handle_option): Change function argument
416         to HOST_WIDE_INT.
417         * langhooks.c (lhd_handle_option): Same.
418         * langhooks.h (handle_option): Same.
419         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
420         ByteSize flags.
421         (var_type, var_type_struct): Same.
422         (var_set): Handle ByteSize flag.
423         * optc-gen.awk: Add comments to output to ease debugging.  Make
424         use of HOST_WIDE_INT where appropriate.
425         * opts-gen-save.awk:  Use %lx to format unsigned long.
426         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
427         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
428         arguments.  Parse bytes-size suffixes.
429         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
430         (enum_value_to_arg): Same.
431         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
432         (handle_option): Adjust.
433         (generate_option): Change function argument to HOST_WIDE_INT.
434         (cmdline_handle_error): Adjust.
435         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
436         (set_option): Change function argument to HOST_WIDE_INT.
437         (option_enabled): Handle cl_host_wide_int.
438         (get_option_state): Handle CLVC_SIZE.
439         (control_warning_option): Same.
440         * opts.c (common_handle_option): Change function argument to
441         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
442         OPT_Wvla_larger_than_.
443         * opts.h (enum cl_var_type): Add an enumerator.
444         * stor-layout.c (layout_decl): Print a more meaningful warning.
445         * toplev.c (output_stack_usage): Adjust.
447 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
449         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
450         call to inline_expand_builtin_string_cmp.
451         (expand_builtin_strcmp): Likewise.
452         (expand_builtin_strncmp): Likewise.
453         (inline_string_cmp): Delete the last parameter, change char_type_node
454         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
455         two operands.
456         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
457         the inlining expansion on target where the type of the call has same or 
458         narrower precision than unsigned char.
460 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
462         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
463         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
464         * common.opt (fsave-optimization-record): New option.
465         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
466         * doc/invoke.texi (-fsave-optimization-record): New option.
467         * dumpfile.c: Include "optinfo-emit-json.h".
468         (struct kv_pair): Move to coretypes.h.
469         (optgroup_options): Make non-static.
470         (dump_context::end_scope): Call
471         optimization_records_maybe_pop_dump_scope.
472         * dumpfile.h (optgroup_options): New decl.
473         * json.cc: New file.
474         * json.h: New file.
475         * optinfo-emit-json.cc: New file.
476         * optinfo-emit-json.h: New file.
477         * optinfo.cc: Include "optinfo-emit-json.h".
478         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
479         (optinfo_enabled_p): Check optimization_records_enabled_p.
480         (optinfo_wants_inlining_info_p): Likewise.
481         * optinfo.h: Update comment.
482         * profile-count.c (profile_quality_as_string): New function.
483         * profile-count.h (profile_quality_as_string): New decl.
484         (profile_count::quality): New accessor.
485         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
486         and optinfo_emit_json_cc_tests.
487         * selftest.h (selftest::json_cc_tests): New decl.
488         (selftest::optinfo_emit_json_cc_tests): New decl.
489         * toplev.c: Include "optinfo-emit-json.h".
490         (compile_file): Call optimization_records_finish.
491         (do_compile): Call optimization_records_start.
492         * tree-ssa-live.c: Include optinfo.h.
493         (remove_unused_scope_block_p): Retain inlining information if
494         optinfo_wants_inlining_info_p returns true.
496 2018-07-20  Richard Biener  <rguenther@suse.de>
498         PR debug/86585
499         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
500         to cover -flto-partition=none.
502 2018-07-20  Martin Liska  <mliska@suse.cz>
504         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
505         (get_decl_source_range): Remove unused function.
507 2018-07-20  Richard Biener  <rguenther@suse.de>
509         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
510         (struct vn_phi_s): Likewise.
511         (struct vn_reference_s): Likewise.
512         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
513         for searching the slot of an entry known to be in the hash itself.
514         (vn_phi_hasher::equal): Likewise.
515         (vn_reference_hasher::equal): Likewise.
516         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
517         globals.
518         (optimistic_info, current_info): Remove, keeping only valid_info.
519         (vn_reference_lookup_1): Remove fallback lookup.
520         (vn_reference_lookup_2): Likewise.
521         (vn_nary_op_lookup_1): Likewise.
522         (vn_phi_lookup): Likewise.
523         (vn_nary_build_or_lookup_1): Make sure to not chain the built
524         hash element.
525         (vn_reference_insert): Adjust, chain the inserted hash element
526         at last_inserted_ref.
527         (vn_reference_insert_pieces): Likewise.
528         (visit_reference_op_call): Likewise.
529         (vn_nary_op_insert_into): Chain the inserted hash element at
530         last_inserted_nary.
531         (vn_nary_op_insert_pieces): Adjust.
532         (vn_nary_op_insert): Likewise.
533         (vn_nary_op_insert_stmt): Likewise.
534         (vn_phi_insert): Adjust, chain the inserted hash element at
535         last_inserted_phi.
536         (process_scc): Remove clearing and copying the optimistic
537         table.  Instead remove elements inserted during an optimistic
538         iteration from the single table we maintain.
539         (init_scc_vn): Adjust.
540         (free_scc_vn): Likewise.
541         (sccvn_dom_walker::record_cond): Likewise.
542         (sccvn_dom_walker::after_dom_children): Likewise.
544 2018-07-19  Martin Sebor  <msebor@redhat.com>
546         PR tree-optimization/84047
547         PR tree-optimization/83776
548         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
549         (check_array_bounds): Call it.
551 2018-07-19  Martin Sebor  <msebor@redhat.com>
553         * align.h (align_flags): Use member initialization.
555 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
557         * Makefile.in (OBJS): Add optinfo.o.
558         * coretypes.h (class symtab_node): New forward decl.
559         (struct cgraph_node): New forward decl.
560         (class varpool_node): New forward decl.
561         * dump-context.h: New file.
562         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
563         "tree-pass.h".
564         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
565         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
566         (set_alt_dump_file): Likewise.
567         (dump_context::~dump_context): New dtor.
568         (dump_gimple_stmt): Move implementation to...
569         (dump_context::dump_gimple_stmt): ...this new member function.
570         Add the stmt to any pending optinfo, creating one if need be.
571         (dump_gimple_stmt_loc): Move implementation to...
572         (dump_context::dump_gimple_stmt_loc): ...this new member function.
573         Start a new optinfo and add the stmt to it.
574         (dump_gimple_expr): Move implementation to...
575         (dump_context::dump_gimple_expr): ...this new member function.
576         Add the stmt to any pending optinfo, creating one if need be.
577         (dump_gimple_expr_loc): Move implementation to...
578         (dump_context::dump_gimple_expr_loc): ...this new member function.
579         Start a new optinfo and add the stmt to it.
580         (dump_generic_expr): Move implementation to...
581         (dump_context::dump_generic_expr): ...this new member function.
582         Add the tree to any pending optinfo, creating one if need be.
583         (dump_generic_expr_loc): Move implementation to...
584         (dump_context::dump_generic_expr_loc): ...this new member
585         function.  Add the tree to any pending optinfo, creating one if
586         need be.
587         (dump_printf): Move implementation to...
588         (dump_context::dump_printf_va): ...this new member function.  Add
589         the text to any pending optinfo, creating one if need be.
590         (dump_printf_loc): Move implementation to...
591         (dump_context::dump_printf_loc_va): ...this new member function.
592         Start a new optinfo and add the stmt to it.
593         (dump_dec): Move implementation to...
594         (dump_context::dump_dec): ...this new member function.  Add the
595         value to any pending optinfo, creating one if need be.
596         (dump_context::dump_symtab_node): New member function.
597         (dump_context::get_scope_depth): New member function.
598         (dump_context::begin_scope): New member function.
599         (dump_context::end_scope): New member function.
600         (dump_context::ensure_pending_optinfo): New member function.
601         (dump_context::begin_next_optinfo): New member function.
602         (dump_context::end_any_optinfo): New member function.
603         (dump_context::s_current): New global.
604         (dump_context::s_default): New global.
605         (dump_scope_depth): Delete global.
606         (dumpfile_ensure_any_optinfo_are_flushed): New function.
607         (dump_symtab_node): New function.
608         (get_dump_scope_depth): Reimplement in terms of dump_context.
609         (dump_begin_scope): Likewise.
610         (dump_end_scope): Likewise.
611         (selftest::temp_dump_context::temp_dump_context): New ctor.
612         (selftest::temp_dump_context::~temp_dump_context): New dtor.
613         (selftest::verify_item): New function.
614         (ASSERT_IS_TEXT): New macro.
615         (ASSERT_IS_TREE): New macro.
616         (ASSERT_IS_GIMPLE): New macro.
617         (selftest::test_capture_of_dump_calls): New test.
618         (selftest::dumpfile_c_tests): Call it.
619         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
620         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
621         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
622         descriptive comment.
623         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
624         (dump_node, dump_bb): Move these unrelated decls.
625         (class dump_manager): Add leading comment.
626         * optinfo.cc: New file.
627         * optinfo.h: New file.
629 2018-07-19  Michael Collison  <michael.collison@arm.com>
630             Richard Henderson <rth@redhat.com>
632         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
633         (subti): Handle op1 zero.
634         (subvti4, usub4ti4): New.
635         (*sub<GPI>3_compare1_imm): New.
636         (sub<GPI>3_carryinCV): New.
637         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
638         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
640 2018-07-19  Michael Collison  <michael.collison@arm.com>
641             Richard Henderson <rth@redhat.com>
643         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
644         (addti3): Create simpler code if low part is already known to be 0.
645         (addvti4, uaddvti4): New.
646         (*add<GPI>3_compareC_cconly_imm): New.
647         (*add<GPI>3_compareC_cconly): New.
648         (*add<GPI>3_compareC_imm): New.
649         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
650         handle constants within this pattern..
651         (*add<GPI>3_compareV_cconly_imm): New.
652         (*add<GPI>3_compareV_cconly): New.
653         (*add<GPI>3_compareV_imm): New.
654         (add<GPI>3_compareV): New.
655         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
656         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
657         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
658         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
659         with 'comparison' operator.
660         (*add<GPI>3_compareV_cconly_imm): Ditto.
661         (*add<GPI>3_compareV_cconly): Ditto.
662         (*add<GPI>3_compareV_imm): Ditto.
663         (add<GPI>3_compareV): Ditto.
664         (add<mode>3_carryinC): Ditto.
665         (*add<mode>3_carryinC_zero): Ditto.
666         (*add<mode>3_carryinC): Ditto.
667         (add<mode>3_carryinV): Ditto.
668         (*add<mode>3_carryinV_zero): Ditto.
669         (*add<mode>3_carryinV): Ditto.
671 2018-07-19  Michael Collison  <michael.collison@arm.com>
672             Richard Henderson <rth@redhat.com>
674         * config/aarch64/aarch64-modes.def (CC_V): New.
675         * config/aarch64/aarch64-protos.h
676         (aarch64_addti_scratch_regs): Declare
677         (aarch64_subvti_scratch_regs): Declare.
678         (aarch64_expand_subvti): Declare.
679         (aarch64_gen_unlikely_cbranch): Declare
680         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
681         for signed overflow using CC_Vmode.
682         (aarch64_get_condition_code_1): Handle CC_Vmode.
683         (aarch64_gen_unlikely_cbranch): New function.
684         (aarch64_addti_scratch_regs): New function.
685         (aarch64_subvti_scratch_regs): New function.
686         (aarch64_expand_subvti): New function.
688 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
690         * config/aarch64/aarch64-option-extensions.def: New entry for profile
691         extension.
692         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
693         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
694         extension.
696 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
698         PR target/83009
699         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
700         address check not strict.
702 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
704         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
705         Umq with Umn.
706         (store_pair_lanes<mode>): Likewise.
707         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
708         enum value 'ADDR_QUERY_LDP_STP_N'.
709         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
710         (aarch64_print_address_internal): Add declaration.
711         (aarch64_print_ldpstp_address): Remove.
712         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
713         (aarch64_print_operand): Change printing of 'y'.
714         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
715         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
716         'true' rather than '1'.
717         * config/aarch64/constraints.md (Uml): Likewise.
718         (Uml): Rename to Umn.
719         (Umq): Remove.
721 2018-07-19  Richard Biener  <rguenther@suse.de>
723         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
724         a trailing array.
725         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
726         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
727         (vn_reference_hasher): Likewise.
728         (struct vn_tables_s): Remove obstack and alloc-pool members.
729         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
730         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
731         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
732         (vn_reference_insert_pieces): Likewise.
733         (alloc_vn_nary_op_noinit): Adjust.
734         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
735         (vn_phi_eq): Adjust.
736         (shared_lookup_phiargs): Remove.
737         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
738         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
739         (visit_reference_op_call): Likewise.
740         (copy_nary, copy_phi, copy_reference): Remove.
741         (process_scc): Rewind the obstack when iterating.  Do not
742         copy the elements to valid_info but just move them from one
743         hashtable to the other.
744         (allocate_vn_table): Adjust.
745         (free_vn_table): Likewise.
746         (init_scc_vn): Likewise.
747         (free_scc_vn): Likewise.
749 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
751         PR target/86560
752         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
753         indirect_return as function type attribute.
754         (ix86_attribute_table): Change indirect_return to function
755         type attribute.
756         * doc/extend.texi: Update indirect_return attribute.
758 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
760         * wide-int.h (widest2_int): New.
761         * gimple-fold.c (arith_overflowed_p): Use it.
762         * tree.h (widest2_int_cst): New.
763         * tree-vrp.c (wide_int_binop_overflow): Rename from
764         vrp_int_const_binop.
765         Rewrite to work on trees.
766         (extract_range_from_multiplicative_op_1): Abstract code to...
767         (wide_int_range_min_max): ...here.
768         (wide_int_range_cross_product): ...and here.
769         (extract_range_from_binary_expr_1): Abstract overflow code to...
770         (wide_int_range_mult_wrapping): ...here.
771         * tree-vrp.h (wide_int_range_cross_product): New.
772         (wide_int_range_mult_wrapping): New.
774 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
775             Julia Koval  <julia.koval@intel.com>
777         * config/i386/x86-tune-costs.h (skylake_memcpy,
778         skylake_memset): Replace rep_prefix with unrolling for size 512.
780 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
782         PR middle-end/86544
783         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
784         in last stmt.
786 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
788         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
789         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
790         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
791         previously known as "PowerPC AltiVec Built-in Functions".  Move
792         some material to new subsubsections "PowerPC AltiVec Built-in
793         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
794         ISA 2.07".
795         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
796         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
797         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
798         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
800 2018-07-18  Richard Biener  <rguenther@suse.de>
802         PR tree-optimization/86557
803         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
804         EXACT_DIV_EXPR.
806 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
808         * config/s390/s390.c (s390_function_profiler): Generate CFI.
810 2018-07-17  Jeff Law  <law@redhat.com>
812         * config/arm/arm.c (get_label_padding): Update for recent
813         changes to label_to_alignment.
815         PR tree-optimization/86010
816         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
818         * config/mips/mips.c (vr4130_align_insns): Update for recent
819         changes to label_to_alignment.
821         * config/frv/frv.c (frv_label_align): Update for recent changes
822         to label_to_alignment.
824         * config/nios2/nios2.c (nios2_label_align): Update for recent
825         changes which dropped ALIGN_LABELS_LOG.
827 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
829         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
830         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
832 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
834         * config/arc/arc.c (arc_label_align): Use align_labels instead of
835         deprecated align_labels_log.
837 2018-07-17  Richard Biener  <rguenther@suse.de>
839         PR lto/86456
840         * dwarf2out.c (init_sections_and_labels): Always generate
841         a debug_line_str_section for early LTO debug.
842         (dwarf2out_finish): Reset debug_line_str_hash output early.
843         Bump counter for extra dwarf5 .debug_loc labels to not conflict
844         with fat LTO part.
845         (dwarf2out_early_finish): Output debug_line_str.
847 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
849         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
850         index register on z196 or later.
852 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
854         * config/s390/s390.c (s390_default_align): Set default function
855         alignment to 16.
856         (s390_override_options_after_change): Call s390_default align.
857         (s390_option_override_internal): Call s390_default_align.
858         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
860 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
862         PR middle-end/86542
863         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
864         to _looptemp_ clauses, other than the first two.
866 2018-07-17  Martin Liska  <mliska@suse.cz>
868         * opts.c: Do not enable OPT_falign_* for -Os.
870 2018-07-17  Martin Liska  <mliska@suse.cz>
872         * align.h (MAX_CODE_ALIGN): New.
873         (MAX_CODE_ALIGN_VALUE): New.
874         * common/config/i386/i386-common.c (ix86_handle_option):
875         (MAX_CODE_ALIGN): Moved to align.h.
876         * final.c (MAX_CODE_ALIGN): Likewise.
877         * opts.c (parse_and_check_align_values):
878         (MAX_CODE_ALIGN): Likewise.
879         (MAX_CODE_ALIGN_VALUE): Likewise.
881 2018-07-17  Martin Liska  <mliska@suse.cz>
883         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
884         in order to fulfil coding style.
885         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
886         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
887         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
888         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
889         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
890         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
891         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
892         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
893         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
895 2018-07-17  Martin Liska  <mliska@suse.cz>
897         * align.h: New file.
898         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
899         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
900         align_flags of label_to_alignment.
901         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
902         class.
903         * config/m68k/m68k.c: Do not use removed align_labels_value and
904         align_loops_value.
905         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
906         (LOOP_ALIGN): Likewise.
907         (LABEL_ALIGN): Likewise.
908         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
909         Remove not used macro.
910         (rs6000_loop_align): Change return type to align_flags.
911         (rs6000_loop_align_max_skip): Remove.
912         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
913         Change return type to align_flags.
914         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
915         Remove not used macro.
916         (rs6000_loop_align):  Change return type to align_flags.
917         (rs6000_loop_align_max_skip): Remove.
918         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
919         * config/rx/rx-protos.h (rx_align_for_label): Make it
920         static function.
921         * config/rx/rx.c (rx_align_for_label): Change return type
922         to align_flags.
923         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
924         macro definitions.
925         into align_flags class.
926         (LABEL_ALIGN): Likewise.
927         (LOOP_ALIGN): Likewise.
928         * config/s390/s390.c (s390_label_align): Use align_flags
929         class member.
930         (s390_asm_output_function_label): Likewise.
931         * config/sh/sh.c (sh_override_options_after_change):
932         Use align_flags class directly without macros.
933         (find_barrier): Likewise.
934         (barrier_align): Likewise.
935         (sh_loop_align): Likewise.
936         * config/spu/spu.c (spu_option_override):
937         Use align_flags_tuple::get_value instead of removed macros.
938         (spu_sched_init): Likewise.
939         * config/spu/spu.h (GTY): Likewise.
940         * config/visium/visium.c (visium_option_override):
941         Set "8" as default secondary alignment.
942         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
943         in order to guarantee secondary alignment of 8.
944         * coretypes.h: Include align.h header file.
945         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
946         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
947         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
948         * doc/tm.texi.in: Likewise.
949         * final.c (struct label_alignment): Remove not used structure.
950         (LABEL_ALIGN): Change type to align_flags.
951         (LOOP_ALIGN): Likewise.
952         (JUMP_ALIGN): Likewise.
953         (default_loop_align_max_skip): Remove.
954         (default_label_align_max_skip): Likewise.
955         (default_jump_align_max_skip): Likewise.
956         (default_label_align_after_barrier_max_skip):
957         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
958         (LABEL_TO_MAX_SKIP): Remove.
959         (label_to_alignment): Return align_flags type instead of integer.
960         (label_to_max_skip): Remove.
961         (align_fuzz): Use align_flags type.
962         (compute_alignments): Use align_flags type and use align_flags::max
963         to combine multiple alignments.
964         (grow_label_align): Grow vec instead of C array.
965         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
966         (shorten_branches):  Use align_flags type and use align_flags::max
967         to combine multiple alignments.
968         (final_scan_insn_1): Remove usage of secondary alignment that comes
969         from label alignment, but instead use proper secondary alignment
970         which is computed in grow_label_align.
971         * flags.h (struct align_flags_tuple): Move to align.h.
972         (struct align_flags): Likewise.
973         (state_align_loops): Rename to align_loops.
974         (state_align_jumps): Rename to align_jumps.
975         (state_align_labels): Rename to align_labels.
976         (state_align_functions): Rename to align_functions.
977         (align_loops_log): Remove.
978         (align_jumps_log): Remove.
979         (align_labels_log): Remove.
980         (align_functions_log): Remove.
981         (align_loops_max_skip): Remove.
982         (align_jumps_max_skip): Remove.
983         (align_labels_max_skip): Remove.
984         (align_functions_max_skip): Remove.
985         (align_loops_value): Remove.
986         (align_jumps_value): Remove.
987         (align_labels_value): Remove.
988         (align_functions_value): Remove.
989         * output.h (label_to_alignment): Change return type to align_flags.
990         (label_to_max_skip): Remove.
991         * target.def: Remove loop_align_max_skip, label_align_max_skip,
992         jump_align_max_skip macros.
993         * targhooks.h (default_loop_align_max_skip): Remove.
994         (default_label_align_max_skip): Likewise.
995         (default_jump_align_max_skip): Likewise.
996         (default_label_align_after_barrier_max_skip): Remove.
997         * toplev.c (read_log_maxskip): Use ::normalize function.
998         (parse_N_M): Remove not used argument and also call ::normalize.
999         (parse_alignment_opts): Do not pass unused arguments.
1000         * varasm.c (assemble_start_function): Use directly align_functions
1001         instead of removed macros.
1002         * system.h: Do not poison removed macros.
1004 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
1006         PR middle-end/86539
1007         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1008         and cond temporaries don't have reference type if iterator has
1009         pointer type.  For init use &for_pre_body instead of pre_p if
1010         for_pre_body is non-empty.
1012 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1014         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1015         double-double modes to SFmode directly directly.
1016         (trunc<mode>sf2_fprs): Delete.
1018 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1020         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1021         for conversions between IFmode and the decimal floating point modes.
1022         (init_float128_ieee): Use the correct names for conversions between
1023         KFmode and the decimal floating point modes.
1025 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1027         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1028         for the conversions between TDmode and IFmode.
1029         (init_float128_ieee): Use more correct names for the conversions
1030         between TDmode and KFmode.
1032 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
1034         PR tree-optimization/86526
1035         * builtins.c (expand_builtin_memcmp): Formatting fixes.
1036         (inline_expand_builtin_string_cmp): Likewise.
1037         (inline_string_cmp): Likewise.  Use c_readstr instead of
1038         builtin_memcpy_read_str.  Add unit_mode temporary.
1040 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1042         PR middle-end/86528
1043         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1044         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1046 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1048         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1049         Alphabetize prototypes of built-in functions, separating out
1050         built-in functions that are listed in this section but should be
1051         described elsewhere.
1053 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
1055         PR target/86511
1056         * expmed.c (emit_store_flag): Do not emit setcc followed by a
1057         conditional move when trapping comparison was split to a
1058         non-trapping one (and vice versa).
1060 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1062         * config/s390/s390.c (s390_function_profiler): Generate nops
1063         instead of profiler call sequences.
1064         * config/s390/s390.opt: Add the new option.
1066 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1068         * config/s390/s390.c (s390_function_profiler): Generate
1069         __mcount_loc section.
1070         * config/s390/s390.opt: Add the new option.
1072 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1074         * common.opt: Add the new warning.
1075         * config/s390/s390.c (s390_function_profiler): Emit "brasl
1076         %r0,__fentry__" when -mfentry is specified.
1077         (s390_option_override_internal): Disallow -mfentry for 31-bit
1078         CPUs.
1079         * config/s390/s390.opt: Add the new option.
1081 2018-07-16  Richard Biener  <rguenther@suse.de>
1083         PR lto/86523
1084         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1085         for function-local FUNCTION_DECL and RESULT_DECL immediately.
1087 2018-07-16  Martin Liska  <mliska@suse.cz>
1089         PR ipa/86529
1090         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1091         to ::get_create.
1093 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
1095         * config/arc/arcHS.md: Update ARCHS scheduling rules.
1097 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
1099         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1100         for ARCHS4x.
1101         * config/arc/arc-cpus.def (hs4x): New cpu.
1102         (hs4xd): Likewise.
1103         * config/arc/arc-tables.opt: Regenerate.
1104         * config/arc/arc.c (arc_sched_issue_rate): New function.
1105         (TARGET_SCHED_ISSUE_RATE): Define.
1106         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1107         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1108         fpu_cvt.
1109         (attr tune): Add ARCHS4x tune values.
1110         (attr tune_dspmpy): Define.
1111         (*tst): Correct instruction type.
1112         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1113         * config/arc/arcHS4x.md: New file.
1114         * config/arc/fpu.md: Update instruction type attributes.
1115         * config/arc/t-multilib: Regenerate.
1117 2018-07-16  Tom de Vries  <tdevries@suse.de>
1119         PR debug/86455
1120         * var-tracking.c (vt_initialize): Fix pre_dec handling.
1122 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1124         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1125         early clobber.
1127 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
1129         PR tree-optimization/86514
1130         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1131         conversion to a boolean type from a type with greater precision.
1133 2018-07-16  Tom de Vries  <tdevries@suse.de>
1135         * var-tracking.c (vt_initialize): Print adjusted insn slim if
1136         dump_flags request TDF_SLIM.
1138 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
1140         * fold-const.c (int_const_binop_1): Abstract...
1141         (wide_int_binop): ...wide int code here.
1142         (poly_int_binop): ...poly int code here.
1143         Abstract the rest of int_const_binop_1 into int_const_binop.
1144         * fold-const.h (wide_int_binop): New.
1145         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1146         Remove useless PLUS/MINUS_EXPR case.
1147         (zero_nonzero_bits_from_vr): Move wide int code...
1148         (zero_nonzero_bits_from_bounds): ...here.
1149         (extract_range_from_binary_expr_1): Move mask optimization code...
1150         (range_easy_mask_min_max): ...here.
1151         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1152         (range_easy_mask_min_max): New.
1154 2018-07-15  Jeff Law  <law@redhat.com>
1156         PR target/85993
1157         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1158         block.
1160 2018-07-14  Jim Wilson  <jimw@sifive.com>
1162         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1164 2018-07-14  Paul Koning  <ni1d@arrl.net>
1166         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1168 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
1170         * lto-streamer-out.c (copy_function_or_variable): Dump info about
1171         copying section.
1173 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
1174             Steve Munroe  <munroesj52@gmail.com>
1176         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1177         (_mm_andnot_si128): Likewise.
1178         (_mm_or_si128): Likewise.
1179         (_mm_xor_si128): Likewise.
1181 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
1183         PR middle-end/78809
1184         * builtins.c (expand_builtin_memcmp): Inline the calls first
1185         when result_eq is false.
1186         (expand_builtin_strcmp): Inline the calls first.
1187         (expand_builtin_strncmp): Likewise.
1188         (inline_string_cmp): New routine. Expand a string compare
1189         call by using a sequence of char comparison.
1190         (inline_expand_builtin_string_cmp): New routine. Inline expansion
1191         a call to str(n)cmp/memcmp.
1192         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1193         New option.
1194         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1196 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
1198         * config/arm/driver-arm.c: Include arm-native.h.
1199         (host_detect_local_cpu): Use auto-generated data tables.
1200         (vendors, arm_cpu_table): Delete.  Move part information to ...
1201         * config/arm/arm-cpus.in: ... here.
1202         * config/arm/parsecpu.awk (gen_native): New function.
1203         (vendor, part): New CPU fields.
1204         (END): Add support for building the native CPU detection tables.
1205         * config/arm/t-arm (arm-native.h): Add build rule.
1206         (driver-arm.o): Add dependency on arm-native.h.
1208 2018-07-13  Richard Biener  <rguenther@suse.de>
1210         PR middle-end/85974
1211         * match.pd (addr1 - addr2): Allow either of the operand to
1212         have a conversion.
1214 2018-07-13  Tom de Vries  <tdevries@suse.de>
1216         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
1217         in remap_ssa_name.
1219 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
1221         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
1222         arrays instead of numbered variables.
1224 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
1226         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
1227         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
1229 2018-07-13  Richard Biener  <rguenther@suse.de>
1231         PR debug/86452
1232         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
1233         instead of get_context_die.
1235 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
1236             Richard Biener  <rguenther@suse.de>
1238         PR middle-end/86489
1239         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
1240         that the loop latch destination where phi is defined.
1242 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
1244         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
1245         (riscv_expand_epilogue): Add assertion to check interrupt mode.
1246         (riscv_set_current_function): Extract getting interrupt type to new
1247         function.
1248         (riscv_get_interrupt_type): New function.
1249         (riscv_merge_decl_attributes): New function, checking interrupt type is
1250         same.
1251         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
1253 2018-07-12  Paul Koning  <ni1d@arrl.net>
1255         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
1256         directive.
1258 2018-07-12  Paul Koning  <ni1d@arrl.net>
1260         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
1261         zero reference, add doloop_end instead.
1262         * doc/md.texi (decrement_and_branch_until_zero): Remove.
1263         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
1264         detail for doloop_end.
1266 2018-07-12  Martin Sebor  <msebor@redhat.com>
1268         PR c/86453
1269         * attribs.c (decl_attributes): Reject conflicting attributes before
1270         calling attribute handlers.
1272 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1274         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
1275          parameter.
1276         (gcc::dump_manager::get_dump_file_name): likewise.
1277         (dump_begin): Likewise.
1278         * dumpfile.h (dump_begin): Update prototype.
1279         (gcc::dump_manager::get_dump_file_name,
1280         gcc::dump_manager::get_dump_file_name): Update prototype.
1282 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1284         * internal-fn.h (vectorizable_internal_fn_p): New function.
1285         * tree-vect-slp.c (compatible_calls_p): Likewise.
1286         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
1287         to internal functions.
1288         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1290 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1292         * fold-const.h (inverse_conditions_p): Declare.
1293         * fold-const.c (inverse_conditions_p): New function.
1294         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
1295         that test the inverse condition of a conditional internal function.
1296         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1297         * internal-fn.c (internal_fn_mask_index): Handle conditional
1298         internal functions.
1299         (vectorized_internal_fn_supported_p): New function.
1300         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1301         (any_pred_load_store): Replace with...
1302         (need_to_predicate): ...this new variable.
1303         (redundant_ssa_names): New variable.
1304         (ifcvt_can_use_mask_load_store): Move initial checks to...
1305         (ifcvt_can_predicate): ...this new function.  Handle tree codes
1306         for which a conditional internal function exists.
1307         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1308         instead of ifcvt_can_use_mask_load_store.  Update after variable
1309         name change.
1310         (predicate_load_or_store): New function, split out from
1311         predicate_mem_writes.
1312         (check_redundant_cond_expr): New function.
1313         (value_available_p): Likewise.
1314         (predicate_rhs_code): Likewise.
1315         (predicate_mem_writes): Rename to...
1316         (predicate_statements): ...this.  Use predicate_load_or_store
1317         and predicate_rhs_code.
1318         (combine_blocks, tree_if_conversion): Update after above name changes.
1319         (ifcvt_local_dce): Handle redundant_ssa_names.
1320         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1321         general conditional functions.
1322         * tree-vect-stmts.c (vectorizable_call): Likewise.
1324 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1325             Alan Hayward  <alan.hayward@arm.com>
1326             David Sherwood  <david.sherwood@arm.com>
1328         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1329         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1330         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1331         plus and minus and convert them into IFN_COND_FMA-based sequences.
1332         (convert_mult_to_fma): Handle conditional plus and minus.
1334 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1336         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1337         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1338         (cond_fnms_optab): New optabs.
1339         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1340         internal functions.
1341         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1342         * internal-fn.h (get_conditional_internal_fn): Declare.
1343         (get_unconditional_internal_fn): Likewise.
1344         * internal-fn.c (cond_ternary_direct): New macro.
1345         (expand_cond_ternary_optab_fn): Likewise.
1346         (direct_cond_ternary_optab_supported_p): Likewise.
1347         (FOR_EACH_COND_FN_PAIR): Likewise.
1348         (get_conditional_internal_fn): New function.
1349         (get_unconditional_internal_fn): Likewise.
1350         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1351         (gimple_match_op::gimple_match_op): Add a new overload for 5
1352         operands.
1353         (gimple_match_op::set_op): Likewise.
1354         (gimple_resimplify5): Declare.
1355         * genmatch.c (decision_tree::gen): Generate simplifications for
1356         5 operands.
1357         * gimple-match-head.c (gimple_simplify): Define an overload for
1358         5 operands.  Handle calls with 5 arguments in the top-level overload.
1359         (convert_conditional_op): Handle conversions from unconditional
1360         internal functions to conditional ones.
1361         (gimple_resimplify5): New function.
1362         (build_call_internal): Pass a fifth operand.
1363         (maybe_push_res_to_seq): Likewise.
1364         (try_conditional_simplification): Try converting conditional
1365         internal functions to unconditional internal functions.
1366         Handle 3-operand unconditional forms.
1367         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1368         Define ternary equivalents of the current rules for binary conditional
1369         internal functions.
1370         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1371         ternary operations.
1372         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1373         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1374         (optab): Handle them.
1375         (SVE_COND_FP_TERNARY): New int iterator.
1376         (sve_fmla_op, sve_fmad_op): New int attributes.
1377         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1378         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1379         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1381 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1383         * target.def (preferred_else_value): New target hook.
1384         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1385         * doc/tm.texi: Regenerate.
1386         * targhooks.h (default_preferred_else_value): Declare.
1387         * targhooks.c (default_preferred_else_value): New function.
1388         * internal-fn.h (conditional_internal_fn_code): Declare.
1389         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1390         (get_conditional_internal_fn): Use it.
1391         (conditional_internal_fn_code): New function.
1392         * gimple-match.h (gimple_match_cond): New struct.
1393         (gimple_match_op): Add a cond member function.
1394         (gimple_match_op::gimple_match_op): Update all forms to take a
1395         gimple_match_cond.
1396         * genmatch.c (expr::gen_transform): Use the same condition as res_op
1397         for the suboperation, but don't specify a particular else_value.
1398         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1399         (visit_nary_op, visit_reference_op_load): Pass
1400         gimple_match_cond::UNCOND to the gimple_match_op constructor.
1401         * gimple-match-head.c: Include tree-eh.h
1402         (convert_conditional_op): New function.
1403         (maybe_resimplify_conditional_op): Likewise.
1404         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1405         (gimple_resimplify2): Likewise.
1406         (gimple_resimplify3): Likewise.
1407         (gimple_resimplify4): Likewise.
1408         (maybe_push_res_to_seq): Return null for conditional operations.
1409         (try_conditional_simplification): New function.
1410         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
1411         constructor.
1412         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1413         IFN_COND_* call.
1414         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1415         function.
1416         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1418 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1420         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1421         DECL_FCONTEXT
1422         (hash_tree): Do not hash DECL_FCONTEXT
1423         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1424         Do not stream DECL_FCONTEXT.
1425         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1426         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1428 2018-07-12  Richard Biener  <rguenther@suse.de>
1430         PR debug/86462
1431         * dwarf2out.c (gen_block_die): Only output blocks when they have
1432         at least one !DECL_IGNORED_P variable.
1434 2018-07-12  Richard Biener  <rguenther@suse.de>
1436         PR target/84829
1437         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1438         Remove -mieee-fp handling.
1440 2018-07-12  Richard Biener  <rguenther@suse.de>
1442         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1443         left-over from last patch.
1445 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
1447         PR tree-optimization/86492
1448         * gimple-ssa-store-merging.c
1449         (imm_store_chain_info::coalesce_immediate_stores): Call
1450         check_no_overlap even for the merge_overlapping case.  Formatting fix.
1452 2018-07-12  Richard Biener  <rguenther@suse.de>
1454         PR middle-end/86479
1455         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1456         move possibly trapping operations into the conditional.
1458 2018-07-12  Richard Biener  <rguenther@suse.de>
1460         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1461         (vn_lookup_simplify_result): Remove recursion limit applied
1462         here.
1463         (vn_nary_build_or_lookup_1): Adjust.
1464         (try_to_simplify): Likewise.
1465         * gimple-match-head.c (gimple_resimplify1): Instead apply one
1466         here.
1467         (gimple_resimplify2): Likewise.
1468         (gimple_resimplify3): Likewise.
1469         (gimple_resimplify4): Likewise.
1471 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
1473         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1474         Use __mmask64 type instead of __mmask8 for __M argument.
1475         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1476         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1477         __U argument.
1478         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1479         __mmask16 for __M argument.
1480         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1481         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1482         to __mmask16 instead of __mmask8.
1483         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1484         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1485         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1486         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1487         instead of __mmask16 for __U argument.
1488         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1489         __mmask16 instead of __mmask8 for __U argument.
1490         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1491         __U argument.
1492         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1493         __mmask16.
1494         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1495         argument.
1496         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1497         __U argument.
1498         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1499         __mmask16.
1500         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1501         of __mmask16.
1502         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1503         __U argument.
1504         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1505         __U argument.
1506         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1507         __U argument.
1508         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1509         __U argument.
1510         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1511         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1512         return type as well as __M argument type and all casts from __mmask8
1513         to __mmask32.
1514         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1515         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1516         return type as well as __M argument type and all casts from __mmask8
1517         to __mmask16.
1518         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1519         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1520         return type as well as __M argument type and all casts from __mmask8
1521         to __mmask32.
1522         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1523         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1524         return type as well as __M argument type and all casts from __mmask8
1525         to __mmask16.
1526         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1527         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1528         __mmask16.
1530 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
1532         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1533         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1534         for __U argument.
1536 2018-07-11  Paul Koning  <ni1d@arrl.net>
1538         * doc/md.texi (define_subst): Document how multiple occurrences of
1539         the same argument in the replacement pattern are handled.
1541 2018-07-11  Paul Koning  <ni1d@arrl.net>
1543         * doc/extend.texi (Common Variable Attributes): Move "mode" into
1544         alphabetical order.
1545         (Common Type Attributes): Add "mode" attribute.
1547 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
1549         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1550         stream DECL_ORIGINAL_TYPE.
1551         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1552         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1553         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1554         Do not walk original type.
1555         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1556         external decls.
1557         (write_ts_decl_non_common_tree_pointers): Do not stream
1558         DECL_ORIGINAL_TYPE
1559         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1560         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1562 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
1564         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1565         thread twice from the same starting edge.
1567 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
1569         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1570         * gimple.c (gimple_call_nonnull_result_p): ...here...
1571         (gimple_call_nonnull_arg): ...and here.
1572         * gimple.h (gimple_call_nonnull_result_p): New.
1573         (gimple_call_nonnull_arg): New.
1575 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
1577         * config/arm/arm-cpus.in: Move information from fpu field of each
1578         cpu definition to the isa field.
1579         * config/arm/parsecpu.awk (fpu): Delete match rule.
1580         (gen_comm_data): Don't add bits from the CPU's FPU entry.
1582 2018-07-11  Richard Biener  <rguenther@suse.de>
1584         PR debug/86457
1585         * dwarf2out.c (init_sections_and_labels): Use
1586         output_asm_line_debug_info consistently.
1587         (dwarf2out_early_finish): Likewise.
1588         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1589         type units.
1591 2018-07-11  Richard Biener  <rguenther@suse.de>
1593         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1594         Rework father_bb setting in a way to avoid propagating constants
1595         multiple times on a loop body.
1597 2018-07-10  Mark Wielaard  <mark@klomp.org>
1599         PR debug/86459
1600         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1602 2018-07-10  Richard Biener  <rguenther@suse.de>
1604         * hash-map.h (hash_map::iterator::operator*): Return
1605         references to key and value.
1607 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
1609         PR c++/86443
1610         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1611         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1612         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1613         (gimplify_omp_for): For composite loops, move outer
1614         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1615         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
1616         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
1617         TREE_LIST for both the original class iterator and the "last" helper
1618         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
1619         loop, remember has_decl_expr from outer composite loops for the
1620         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1622 2018-07-09  Martin Sebor  <msebor@redhat.com>
1624         PR middle-end/77357
1625         PR middle-end/86428
1626         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1627         accessing implicitly initialized array elements.
1628         * expr.c (string_constant): Handle string initializers of
1629         character arrays within aggregates.
1630         * gimple-fold.c (fold_array_ctor_reference): Add argument.
1631         Store element offset.  As a special case, handle zero size.
1632         (fold_nonarray_ctor_reference): Same.
1633         (fold_ctor_reference): Add argument.  Store subobject offset.
1634         * gimple-fold.h (fold_ctor_reference): Add argument.
1636 2018-07-09  Paul Koning  <ni1d@arrl.net>
1638         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1639         (pdp11_insn_cost): New function.
1640         (pdp11_md_asm_adjust): New function.
1641         (TARGET_INVALID_WITHIN_DOLOOP): Define.
1642         (pdp11_rtx_costs): Update to match machine better.
1643         (output_addr_const_pdp11): Correct format mismatch warnings.
1644         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1645         * config/pdp11/pdp11.md: General change to add base_cost and/or
1646         length attributes for use by new pdp11_insn_cost function.
1647         (MIN_BRANCH): Correct definition.
1648         (MIN_SOB): Ditto.
1649         (doloop_end): Use standard pattern name for looping pattern.
1650         (doloop_end_nocc): New.
1651         (movsf): Add another constraint alternative.
1652         (zero_extendqihi2): Add constraint alternatives for not in place
1653         extend.
1654         (zero_extendhisi2): Remove.
1655         (shift patterns): Add CC handling variants.
1656         (bswaphi2): New.
1657         (bswapsi2): New.
1658         (rothi3): New.
1659         (define_peephole2): New peephole to recognize mov that sets CC for
1660         subsequent test.
1662 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1664         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1665         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1666         wi::add.
1668 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
1670         PR c/86420
1671         * real.c (real_nextafter): Return true if result is denormal.
1673 2018-07-09  Martin Liska  <mliska@suse.cz>
1675         * common.opt: Add back wrongly removed attribute.
1677 2018-07-09  Richard Biener  <rguenther@suse.de>
1679         PR debug/86413
1680         * dwarf2out.c (gen_block_die): For an early generated DIE
1681         always output high/low PC attributes.
1683 2018-07-09  Tom de Vries  <tdevries@suse.de>
1685         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1686         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1687         onto VAR_DECL with abstract origin.
1689 2018-07-07  Jim Wilson  <jimw@sifive.com>
1691         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1693 2018-07-07  Tom de Vries  <tdevries@suse.de>
1695         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1697 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
1699         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1700         overflow_type.
1701         (combine_bound): Use wide-int overflow calculation instead of
1702         rolling our own.
1703         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1704         overflow_type.
1705         * fold-const.c (int_const_binop_2): Same.
1706         (extract_muldiv_1): Same.
1707         (fold_div_compare): Same.
1708         (fold_abs_const): Same.
1709         * match.pd: Same.
1710         * poly-int.h (add): Same.
1711         (sub): Same.
1712         (neg): Same.
1713         (mul): Same.
1714         * predict.c (predict_iv_comparison): Same.
1715         * profile-count.c (slow_safe_scale_64bit): Same.
1716         * simplify-rtx.c (simplify_const_binary_operation): Same.
1717         * tree-chrec.c (tree_fold_binomial): Same.
1718         * tree-data-ref.c (split_constant_offset_1): Same.
1719         * tree-if-conv.c (idx_within_array_bound): Same.
1720         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1721         * tree-ssa-phiopt.c (minmax_replacement): Same.
1722         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1723         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1724         * vr-values.c (vr_values::adjust_range_with_scev): Same.
1725         * wide-int.cc (wi::add_large): Same.
1726         (wi::mul_internal): Same.
1727         (wi::sub_large): Same.
1728         (wi::divmod_internal): Same.
1729         * wide-int.h: Change overflow type to overflow_type for neg, add,
1730         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1731         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1732         mul_internal, divmod_internal.
1733         (overflow_type): New enum.
1734         (accumulate_overflow): New.
1736 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
1738         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1739         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1741 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
1743         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1744         argument is checked for zero before entering loop, avoid checking again.
1746 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
1748         * gimplify.h (generic_expr_could_trap_p): Set as global function.
1749         * gimplify.h (generic_expr_could_trap_p): Likwise.
1750         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1752 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
1754         PR tree-optimization/86401
1755         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1756         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1757         (fold_bit_and_mask): ... here.  New helper function for match.pd.
1758         * fold-const.h (fold_bit_and_mask): Declare.
1759         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1761 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
1763         PR target/86324
1764         * target.def (translate_mode_attribute): New hook.
1765         * targhooks.h (default_translate_mode_attribute): Declare.
1766         * targhooks.c (default_translate_mode_attribute): New function.
1767         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1768         * doc/tm.texi: Regenerate.
1769         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1770         (rs6000_translate_mode_attribute): New function.
1772 2018-07-06  Paul Koning  <ni1d@arrl.net>
1774         * doc/md.texi (define_split): Document DONE and FAIL.
1775         (define_peephole2): Ditto.
1777 2018-07-05  Jeff Law  <law@redhat.com>
1779         PR tree-optimization/86010
1780         * tree-ssa-dse.c (compute_trims): More aggressively trim at
1781         both the head and tail of mem* and str* calls.
1783 2018-07-05  Jim Wilson  <jimw@sifive.com>
1785         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1787 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
1789         * config/aarch64/aarch64-simd.md: correct flags text for
1790         MIN_EXPR replacement.
1792 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
1794         * configure: Regenerated.
1796 2018-07-05  Carl Love  <cel@us.ibm.com>
1798         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1799         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1800         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1801         VSX_BUILTIN_DOUBLEL_V4SF.
1803 2018-07-05  Martin Sebor  <msebor@redhat.com>
1805         PR c++/86400
1806         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1807         than its domain to compute its the upper bound of a char array.
1809 2018-07-05  Nathan Sidwell  <nathan@acm.org>
1811         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1812         * doc/cpp.texi: Update comment.
1813         * doc/tm.texi: Rebuilt.
1814         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1815         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1816         * doc/extend.texi (Backwards Compatibility): Clarify it is system
1817         headers affected by extern "C".
1818         * system.h: Poison NO_IMPLICIT_EXTERN_C.
1819         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1820         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1821         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1822         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1823         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1824         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1825         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1826         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1827         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1828         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1829         config/sparc/sp64-elf.h, config/spu/spu.h,
1830         config/stormy16/stormy16.h, config/v850/v850.h,
1831         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1832         define NO_IMPLICIT_EXTERN_C.
1833         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1835 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1837         PR target/84711
1838         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1839         instead of GET_MODE_SIZE when comparing Units.
1841 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1843         PR target/84711
1844         * rtlanal.c (set_noop_p): Constrain on mode change,
1845         include hard-reg-set.h
1847 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1849         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1851 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
1853         Revert
1854         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1856         PR sanitizer/84250
1857         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1858         libasan.
1859         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1861 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1863         PR sanitizer/84250
1864         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1865         libasan.
1866         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1868 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
1870         PR middle-end/86380
1871         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1873 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
1875         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1876         neg_*_op* variables.
1878 2018-07-04  Martin Liska  <mliska@suse.cz>
1880         * tree-switch-conversion.c: Define
1881         max_ratio_for_speed and max_ratio_for_size constants.
1883 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
1884             Martin Liska  <mliska@suse.cz>
1886         PR middle-end/66240
1887         PR target/45996
1888         PR c/84100
1889         * common.opt: Rename align options with 'str_' prefix.
1890         * common/config/i386/i386-common.c (set_malign_value): New
1891         function.
1892         (ix86_handle_option): Use it to set -falign-* options/
1893         * config/aarch64/aarch64-protos.h (struct tune_params): Change
1894         type from int to string.
1895         * config/aarch64/aarch64.c: Update default values from int
1896         to string.
1897         * config/alpha/alpha.c (alpha_override_options_after_change):
1898         Likewise.
1899         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1900         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1901         max skip conditionally.
1902         * config/i386/freebsd.h (SUBALIGN_LOG): New.
1903         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1904         max skip conditionally.
1905         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1906         max skip conditionally.
1907         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1908         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1909         max skip conditionally.
1910         * config/i386/i386.c (struct ptt): Change type from int to
1911         string.
1912         (ix86_default_align): Set default values.
1913         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1914         max skip conditionally.
1915         * config/i386/iamcu.h (SUBALIGN_LOG): New.
1916         (ASM_OUTPUT_MAX_SKIP_ALIGN):
1917         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1918         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1919         max skip conditionally.
1920         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1921         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1922         * config/i386/x86-64.h (SUBALIGN_LOG): New.
1923         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1924         max skip conditionally.
1925         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1926         * config/ia64/ia64.c (ia64_option_override): Set default values
1927         for alignment options.
1928         * config/m68k/m68k.c: Handle new str_align_* options.
1929         * config/mips/mips.c (mips_set_compression_mode): Change
1930         type of constants.
1931         (mips_option_override): Set default values for options.
1932         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1933         Likewise.
1934         * config/rs6000/rs6000.c (rs6000_option_override_internal):
1935         Likewise.
1936         * config/rx/rx.c (rx_option_override): Likewise.
1937         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1938         (LABEL_ALIGN): Use align_labels_log.
1939         (LOOP_ALIGN): Use align_loops_align.
1940         * config/s390/s390.c (s390_asm_output_function_label): Use new
1941         macros.
1942         * config/sh/sh.c (sh_override_options_after_change):
1943         Change type of constants.
1944         * config/spu/spu.c (spu_sched_init): Likewise.
1945         * config/sparc/sparc.c (sparc_option_override): Set default
1946         values for options.
1947         * config/visium/visium.c (visium_option_override): Likewise.
1948         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1949         emit p2align format with last argument if it's not needed.
1950         * doc/invoke.texi: Document extended format of -falign-*.
1951         * final.c: Use align_labels alignment.
1952         * flags.h (struct target_flag_state): Change type to use
1953         align_flags.
1954         (struct align_flags_tuple): New.
1955         (struct align_flags): Likewise.
1956         (align_loops_log): Redefine macro to use new types.
1957         (align_loops_max_skip): Redefine macro to use new types.
1958         (align_jumps_log): Redefine macro to use new types.
1959         (align_jumps_max_skip): Redefine macro to use new types.
1960         (align_labels_log): Redefine macro to use new types.
1961         (align_labels_max_skip): Redefine macro to use new types.
1962         (align_functions_log): Redefine macro to use new types.
1963         (align_loops): Redefine macro to use new types.
1964         (align_jumps): Redefine macro to use new types.
1965         (align_labels): Redefine macro to use new types.
1966         (align_functions): Redefine macro to use new types.
1967         (align_functions_max_skip): Redefine macro to use new types.
1968         (align_loops_value): New macro.
1969         (align_jumps_value): New macro.
1970         (align_labels_value): New macro.
1971         (align_functions_value): New macro.
1972         * function.c (invoke_set_current_function_hook): Propagate
1973         alignment values from flags to global variables default in
1974         topleev.h.
1975         * ipa-icf.c (sem_function::equals_wpa): Use
1976         cl_optimization_option_eq instead of memcmp.
1977         * lto-streamer.h (cl_optimization_stream_out): Support streaming
1978         of string types.
1979         (cl_optimization_stream_in): Likewise.
1980         * optc-save-gen.awk: Support strings in cl_optimization.
1981         * opth-gen.awk: Likewise.
1982         * opts.c (finish_options): Remove error checking of invalid
1983         value ranges.
1984         (MAX_CODE_ALIGN): Remove.
1985         (MAX_CODE_ALIGN_VALUE): Likewise.
1986         (parse_and_check_align_values): New function.
1987         (check_alignment_argument): Likewise.
1988         (common_handle_option): Use check_alignment_argument.
1989         * opts.h (parse_and_check_align_values): Declare.
1990         * toplev.c (init_alignments): Remove.
1991         (read_log_maxskip): New.
1992         (parse_N_M): Likewise.
1993         (parse_alignment_opts): Likewise.
1994         (backend_init_target): Remove usage of init_alignments.
1995         * toplev.h (parse_alignment_opts): Declare.
1996         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1997         argument.
1998         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1999         * tree.c (cl_option_hasher::equal): New.
2000         * varasm.c: Use new global macros.
2002 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
2004         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2005         Use a simpler align directive also if MAXSKIP = ALIGN-1.
2006         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2007         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2008         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2009         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2010         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2011         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2012         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2013         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2014         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2015         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2016         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2018 2018-07-04  Martin Liska  <mliska@suse.cz>
2019             Jonathan Wakely  <jwakely@redhat.com>
2021         * coverage.c: Use correct type.
2022         * doc/invoke.texi: Language correction.
2024 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
2026         PR target/85620
2027         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2028         ENDBRANCH for non-tail call which may return via indirect branch.
2029         * doc/extend.texi: Document indirect_return attribute.
2031 2018-07-03  Martin Sebor  <msebor@redhat.com>
2033         PR tree-optimization/86274
2034         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2035         precondition.
2036         (format_floating): Correct handling of infinities and NaNs.
2038 2018-07-03  Martin Sebor  <msebor@redhat.com>
2040         * print-tree.c (print_real_cst): New function.
2041         (print_node_brief): Call it.
2042         (print_node): Ditto.
2044 2018-07-03  Jeff Law  <law@redhat.com>
2046         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2047         into a single pattern.
2049         * config/h8300/h8300.md (ors code_iterator): New.
2050         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2051         a single pattern and single splitter.
2052         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2053         (iorqi3_1, xorqi3_1): Likewise.
2054         (iorqi3, xorqi3 expanders): Similarly.
2056         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2057         (movmd_internal) into a single pattern using the P mode iterator.
2058         (movmd splitters): Similarly.
2059         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2060         (movsd splitters): Similarly.
2062         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2063         ADDB, ADDW and ADDL into a single ADD attribute which selects the
2064         right table based on the size of the operand.
2065         * config/h8300/h8300.md (length_table): Corresponding changes. All
2066         references to "addb", "addw" and "addl" changed to "add".
2067         (btst patterns): Merge two variants into a single pattern.
2068         (tstqi, tsthi): Likewise.
2069         (addhi3_incdec, addsi3_incdec): Likewise.
2070         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2071         (mulhi3, mulsi3): Likewise.
2072         (udivhi3, udivsi3): Likewise.
2073         (divhi3, divsi3): Likewise.
2074         (andorqi3, andorhi3, andorsi3): Likewise.
2076 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
2078         PR target/85694
2079         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2080         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2082 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2084         PR tree-optimization/85694
2085         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2086         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2087         UNSPEC_URHADD.
2088         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2089         (<u>avg<mode>3_ceil): New patterns.
2091 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
2093         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2094         scan-tree-dump directive.
2095         * gcc.dg/vect/slp-perm-2.c: Likewise.
2096         * gcc.dg/vect/slp-perm-3.c: Likewise.
2097         * gcc.dg/vect/slp-perm-5.c: Likewise.
2098         * gcc.dg/vect/slp-perm-6.c: Likewise.
2099         * gcc.dg/vect/slp-perm-7.c: Likewise.
2100         * gcc.dg/vect/slp-perm-8.c: Likewise.
2102 2018-07-03  Marek Polacek  <polacek@redhat.com>
2104         PR middle-end/86202
2105         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2107 2018-07-03  Richard Biener  <rguenther@suse.de>
2109         PR ipa/86389
2110         * tree-ssa-structalias.c (find_func_clobbers): Properly
2111         handle indirect calls.
2113 2018-07-03  Jeff Law  <law@redhat.com>
2115         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2116         (shifts): New code iterator.
2117         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2118         expander.  Fix HImode handling on H8/SX.
2119         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2120         (subqi3, subhi3, subsi3 expanders): Likewise.
2121         (andqi3, andhi3, andsi3 expanders): Likewise.
2122         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2123         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2124         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2125         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2126         (zero_extendqihi2, zero_extendqisi2): Likewise.
2127         (extendqihi2, extendqisi2): Likewise.
2128         (rotlqi3, rotlhi3, rotlsi3): Likewise.
2129         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2130         (rotlqi3_1, rotlhi3_1): Likewise.
2131         (logicalhi3_sn, logicalsi3_sn): Likewise.
2132         (logicalhi3, logicalsi3): Likewise.
2134 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2136         * tree-vect-patterns.c (vect_recog_rotate_pattern)
2137         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2138         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2139         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2140         type to append_pattern_def_seq instead of creating a stmt_vec_info
2141         directly.
2142         (build_mask_conversion): Likewise.  Remove vinfo argument.
2143         (vect_add_conversion_to_patterm): Likewise, renaming to...
2144         (vect_add_conversion_to_pattern): ...this.
2145         (vect_recog_mask_conversion_pattern): Update call to
2146         build_mask_conversion.  Pass the vector type to
2147         append_pattern_def_seq here too.
2148         (vect_recog_gather_scatter_pattern): Update call to
2149         vect_add_conversion_to_pattern.
2151 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2153         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2154         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2155         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2156         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2157         STMT_VINFO_PATTERN_DEF_SEQ to null here.
2158         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2159         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2160         append_pattern_def_seq instead of new_pattern_def_seq.
2161         (vect_recog_divmod_pattern): Do both of the above.
2162         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2163         is null.
2165 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2167         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2168         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2169         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2170         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2171         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2172         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2173         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2174         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2175         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2176         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2177         parameter with a single stmt_vec_info.
2178         (vect_recog_func_ptr): Likewise.
2179         (vect_recog_gather_scatter_pattern): Likewise, folding in...
2180         (vect_try_gather_scatter_pattern): ...this.
2181         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2182         the stmt_vec_info of the statement to be matched.  Don't clear
2183         STMT_VINFO_RELATED_STMT.
2184         (vect_pattern_recog): Update call accordingly.
2186 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2188         PR tree-optimization/85694
2189         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2190         (uavgM3_ceil): Document new optabs.
2191         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2192         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2193         functions.
2194         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2195         (savg_ceil_optab): New optabs.
2196         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2197         (vect_vect_recog_func_ptrs): Add it.
2198         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2199         constant directly from the associated lhs.
2201 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2203         * tree-vect-patterns.c (vect_split_statement): New function.
2204         (vect_convert_input): Use it to try to split an existing cast.
2206 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2208         * poly-int.h (print_hex): New function.
2209         * dumpfile.h (dump_dec, dump_hex): Declare.
2210         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
2211         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
2212         min_input_precision, operation_precision and operation_sign.
2213         * tree-vect-patterns.c (vect_get_range_info): New function.
2214         (vect_same_loop_or_bb_p, vect_single_imm_use)
2215         (vect_operation_fits_smaller_type): Delete.
2216         (vect_look_through_possible_promotion): Add an optional
2217         single_use_p parameter.
2218         (vect_recog_over_widening_pattern): Rewrite to use new
2219         stmt_vec_info infomration.  Handle one operation at a time.
2220         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
2221         (vect_truncatable_operation_p, vect_set_operation_type)
2222         (vect_set_min_input_precision): New functions.
2223         (vect_determine_min_output_precision_1): Likewise.
2224         (vect_determine_min_output_precision): Likewise.
2225         (vect_determine_precisions_from_range): Likewise.
2226         (vect_determine_precisions_from_users): Likewise.
2227         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
2228         (vect_vect_recog_func_ptrs): Put over_widening first.
2229         Add cast_forwprop.
2230         (vect_pattern_recog): Call vect_determine_precisions.
2232 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2234         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
2235         statements that have been replaced by further pattern statements.
2236         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
2238 2018-07-03  Richard Biener  <rguenther@suse.de>
2240         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
2241         always set *dt.  Dump vectype in vectype overload.
2242         * dumpfile.h (dump_gimple_expr): New function.
2243         (dump_gimple_expr_loc): Likewise.
2244         * dumpfile.c (dump_gimple_expr): New function.
2245         (dump_gimple_expr_loc): Likewise.
2247 2018-07-02  Jeff Law  <law@redhat.com>
2249         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
2250         the H8/300, H8/300H and H8/S variants into a single pattern.
2251         (movhi_h8300, movqi_h8300hs): Similarly.
2252         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
2253         (QHI mode iterator): New.
2255         * config/h8300/h8300.md: Remove trailing whitespace.
2257 2018-07-02  Jim Wilson  <jimw@sifive.com>
2259         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
2260         instead of emit_insn for interrupt returns.
2261         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
2262         (riscv_sret, riscv_uret): Likewise.
2264 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2266         * pretty-print.c (selftest::test_pp_format): Move save and restore
2267         of quotes to class auto_fix_quotes, and add an instance.
2268         * selftest.c: Include "intl.h".
2269         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
2270         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
2271         * selftest.h (selftest::auto_fix_quotes): New class.
2273 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
2275         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
2276         (aarch64_sve_prepare_conditional_op): Remove.
2277         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
2278         Allow aarch64_simd_reg_or_zero as select operand; remove
2279         the aarch64_sve_prepare_conditional_op call.
2280         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
2281         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2282         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
2283         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
2284         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
2285         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
2286         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
2287         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2288         and a splitters to match all of the *_any patterns.
2289         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2291         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2292         (SVE_COND_FP_BINARY_REV): Remove.
2293         (sve_int_op_rev, sve_fp_op_rev): New.
2294         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2295         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2296         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2297         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2298         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2299         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2300         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2301         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2302         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2304         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2305         Remove match_dup 1 from the inner unspec.
2306         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2308         * config/aarch64/aarch64.md (movprfx): New attr.
2309         (length): Default movprfx to 8.
2310         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2311         (*madd<SVE_I>, *msub<SVE_I): Likewise.
2312         (*<su>mul<SVE_I>3_highpart): Likewise.
2313         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2314         (*v<ASHIFT><SVE_I>3): Likewise.
2315         (*<su><MAXMIN><SVE_I>3): Likewise.
2316         (*<su><MAXMIN><SVE_F>3): Likewise.
2317         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2318         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2319         (*div<SVE_F>4): Likewise.
2321 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
2323         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2324         in dump string.
2326 2018-07-02  Richard Biener  <rguenther@suse.de>
2328         PR tree-optimization/86363
2329         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2330         memset argument refers to a non-variable address.
2332 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2334         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2335         {PLUS,MINUS}_EXPR code to...
2336         (adjust_symbolic_bound): ...here,
2337         (combine_bound): ...here,
2338         (set_value_range_with_overflow): ...and here.
2340 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2342         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2343         code...
2344         (extract_range_from_abs_expr): ...here.
2346 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
2348         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2349         -fno-omit-frame-pointer when not optimizing.
2351 2018-07-02  Martin Liska  <mliska@suse.cz>
2353         PR ipa/86279
2354         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2355         (propagate_nothrow): Likewise.
2357 2018-07-02  Martin Liska  <mliska@suse.cz>
2359         PR ipa/86323
2360         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2362 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2364         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2365         function in r262149, changing "loc" param from source_location to
2366         const dump_location_t &.
2367         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2368         declaration, as above.
2370 2018-07-01  Paul Koning  <ni1d@arrl.net>
2372         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2373         -munit-asm, -mgnu-asm, -mdec-asm.
2374         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2375         (pdp11_output_labelref): New.
2376         (pdp11_output_def): New.
2377         (pdp11_output_addr_vec_elt): New.
2378         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
2379         %# and %@ format codes.
2380         (pdp11_option_override): New.
2381         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2382         (pdp11_output_ident): New.
2383         (pdp11_asm_named_section): New.
2384         (pdp11_asm_init_sections): New.
2385         (pdp11_file_start): New.
2386         (pdp11_file_end): New.
2387         (output_ascii): Use .ascii/.asciz for -mdec-asm.
2388         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
2389         %o, like %c but octal.
2390         (pdp11_option_override): New.
2391         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2392         -mdec-asm.
2393         (DATA_SECTION_ASM_OP): Ditto.
2394         (READONLY_DATA_SECTION_ASM_OP): New.
2395         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2396         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2397         (ASM_OUTPUT_LABELREF): Ditto.
2398         (ASM_OUTPUT_DEF): Ditto.
2399         (ASM_OUTPUT_EXTERNAL): New.
2400         (ASM_OUTPUT_SOURCE_FILENAME): New.
2401         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2402         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2403         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
2404         %# and %@ format codes.
2405         * config/pdp11/pdp11.opt (mgnu-asm): New.
2406         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2407         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2408         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2410 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
2412         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2413         dereferencing path[] beyond its length.
2414         (debug_path): New.
2415         (debug_all_paths): New.
2416         (rewire_first_differing_edge): New.
2417         (adjust_paths_after_duplication): New.
2418         (duplicate_thread_path): Call adjust_paths_after_duplication.
2419         Add new argument.
2420         (thread_through_all_blocks): Add new argument to
2421         duplicate_thread_path.
2423 2018-06-30  Jim Wilson  <jimw@sifive.com>
2425         * config/riscv/predicates.md (p2m1_shift_operand): New.
2426         (high_mask_shift_operand): New.
2427         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2428         pattern using p2m1_shift_operand.
2429         (lshsi3_zero_extend_3+2): New combiner pattern using
2430         high_mask_shift_operand.
2432 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2434         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2435         split out from...
2436         (vect_recog_rotate_pattern): ...here.
2437         (vect_convert_input): Try to insert casts of invariants in the
2438         preheader.
2439         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2440         preheader to be empty.
2442 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2444         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2445         vector type.  If given, install it in the new statement's
2446         STMT_VINFO_VECTYPE.
2447         (vect_element_precision): New function.
2448         (vect_unpromoted_value): New struct.
2449         (vect_unpromoted_value::vect_unpromoted_value): New function.
2450         (vect_unpromoted_value::set_op): Likewise.
2451         (vect_look_through_possible_promotion): Likewise.
2452         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2453         (vect_widened_op_tree, vect_convert_input): Likewise.
2454         (vect_convert_inputs, vect_convert_output): Likewise.
2455         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2456         to handle the optional cast of the multiplication result and
2457         vect_widened_op_tree to detect the widened multiplication itself.
2458         Do not require the input and output of promotion casts to have
2459         the same sign, but base the signedness of the operation on the
2460         input rather than the result.  If the pattern includes two
2461         promotions, check that those promotions have the same sign.
2462         Do not restrict the MULT_EXPR handling to a double-width result;
2463         handle quadruple-width results and wider.  Use vect_convert_inputs
2464         to convert the inputs to the common type.
2465         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
2466         to handle the optional cast of the ABS result.  Also allow a sign
2467         change or a sign extension between the ABS and MINUS.
2468         Use vect_widened_op_tree to detect the widened subtraction and use
2469         vect_convert_inputs to convert the inputs to the common type.
2470         (vect_handle_widen_op_by_const): Delete.
2471         (vect_recog_widen_op_pattern): New function.
2472         (vect_recog_widen_mult_pattern): Use it.
2473         (vect_recog_widen_shift_pattern): Likewise.
2474         (vect_recog_widen_sum_pattern): Use
2475         vect_look_through_possible_promotion to handle the promoted
2476         PLUS_EXPR operand.
2478 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2480         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2481         the containing gimple_seq *.
2482         * gimple-iterator.h (gsi_for_stmt): Declare it.
2483         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2484         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2485         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2486         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2487         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2488         checks.
2489         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2490         split out from...
2491         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
2492         statement being replaced is part of an existing pattern
2493         definition sequence, inserting the new pattern statements before
2494         the original one.
2495         (vect_pattern_recog_1): Don't return a bool.  If the statement
2496         is already part of a pattern, instead apply pattern matching
2497         to the pattern definition statements.  Don't clear the
2498         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2499         (vect_pattern_recog): Don't break after the first match;
2500         continue processing the pattern definition statements instead.
2501         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2503 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2505         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2506         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2507         (vect_recog_widen_sum_pattern): Use it.
2509 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2511         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2512         phi is not a pattern statement and has not been replaced by
2513         a pattern statement.
2514         * tree-vect-patterns.c (type_conversion_p): Don't check
2515         STMT_VINFO_IN_PATTERN_P.
2516         (vect_recog_vector_vector_shift_pattern): Likewise.
2517         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2518         the pattern statement rather than the original statement; check
2519         directly for a WIDEN_MULT_EXPR here.
2520         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2521         vect_is_simple_use to return the pattern statement rather
2522         than the original statement; use is_pattern_stmt_p to check
2523         for such a pattern statement.
2524         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2525         to return the pattern statement rather than the original statement;
2526         don't do the same transformation here.
2527         (vect_is_simple_use): If the defining statement has been replaced
2528         by a pattern statement, return the pattern statement instead.
2529         Remove the corresponding (local) transformation from the vectype
2530         overload.
2532 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2534         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2535         end and default to null.
2536         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2537         (vectorizable_reduction): Update calls accordingly, dropping the
2538         gimple ** argument if the passed-back statement isn't needed.
2539         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2540         (vect_recog_rotate_pattern): Likewise.
2541         (vect_recog_mask_conversion_pattern): Likewise.
2542         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2543         (vect_mask_constant_operand_p): Likewise.
2544         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2545         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2546         (get_group_load_store_type, get_load_store_type): Likewise.
2547         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2548         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2549         (vectorizable_conversion, vectorizable_assignment): Likewise.
2550         (vectorizable_shift, vectorizable_operation): Likewise.
2551         (vectorizable_store, vect_is_simple_cond): Likewise.
2552         (vectorizable_condition, vectorizable_comparison): Likewise.
2553         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2554         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2555         and move it to the end.  Cope with null def_stmt_outs.
2557 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2559         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2561 2018-06-29  Jeff Law  <law@redhat.com>
2563         * config/v850/v850.c (v850_legitimate_address_p): Handle large
2564         displacements for TARGET_V850E2V3 and newer.
2565         (TARGET_LRA_P): Remove.  Defaults to LRA now.
2566         * config/v850/v850.md (sign23byte_load): Remove.
2567         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2568         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2570 2018-06-29  Martin Liska  <mliska@suse.cz>
2572         PR lto/85759
2573         * coverage.c (coverage_init): Mangle full path name.
2574         * doc/invoke.texi: Document the change.
2575         * gcov-io.c (mangle_path): New.
2576         * gcov-io.h (mangle_path): Likewise.
2577         * gcov.c (mangle_name): Use mangle_path for path mangling.
2579 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2581         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2582         if starting source register is not even.
2584 2018-06-29  Martin Liska  <mliska@suse.cz>
2586         PR tree-optimization/86263
2587         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2588         Make edge redirection.
2590 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
2592         * dumpfile.c (dump_loc): Add indentation based on scope depth.
2593         (dump_scope_depth): New variable.
2594         (get_dump_scope_depth): New function.
2595         (dump_begin_scope): New function.
2596         (dump_end_scope): New function.
2597         * dumpfile.h (get_dump_scope_depth): New declaration.
2598         (dump_begin_scope): New declaration.
2599         (dump_end_scope): New declaration.
2600         (class auto_dump_scope): New class.
2601         (AUTO_DUMP_SCOPE): New macro.
2602         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2603         AUTO_DUMP_SCOPE.
2605 2018-06-29  Richard Biener  <rguenther@suse.de>
2607         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2608         compute_all_dependences succeeds.
2609         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2610         exceed --param loop-max-datarefs-for-datadeps.
2612 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
2614         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2616 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
2618         PR target/86348
2619         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2620         alternative 0 in preferred_for_speed attribute.
2622 2018-06-28  Paul Koning  <ni1d@arrl.net>
2624         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2625         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2626         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2627         * config/pdp11/pdp11.md: Correct "length" attribute calculation
2628         for shift insn patterns.
2630 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
2632         * cgraph.c (cgraph_node::get_body): Replace assignments to
2633         "dump_file" with calls to set_dump_file.
2634         * dumpfile.c (alt_dump_file): Make static, and group with...
2635         (alt_flags): ...this definition.
2636         (dumps_are_enabled): New variable.
2637         (refresh_dumps_are_enabled): New function.
2638         (set_dump_file): New function.
2639         (set_alt_dump_file): New function.
2640         (gcc::dump_manager::dump_start): Replace assignments to
2641         "dump_file" and "alt_dump_file" with calls to set_dump_file and
2642         set_alt_dump_file.
2643         (gcc::dump_manager::dump_finish): Likewise.
2644         * dumpfile.h (alt_dump_file): Delete decl.
2645         (dumps_are_enabled): New variable decl.
2646         (set_dump_file): New function decl.
2647         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2648         global.
2649         * tree-nested.c (lower_nested_functions): Replace assignments to
2650         "dump_file" with calls to set_dump_file.
2652 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
2654         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2655         goto_locus of each outgoing edge of each basic block.
2657 2018-06-28  Richard Biener  <rguenther@suse.de>
2659         * dwarf2out.c (decl_scope_table): Remove.
2660         (push_decl_scope): Likewise.
2661         (pop_decl_scope): Likewise.
2662         (gen_type_die_for_member): Do not call push/pop_decl_scope.
2663         (gen_struct_or_union_type_die): Likewise.
2664         (gen_tagged_type_die): Likewise.
2665         (dwarf2out_init): Do not initialize decl_scope_table.
2666         (dwarf2out_c_finalize): Do not free it.
2668 2018-06-28  Richard Biener  <rguenther@suse.de>
2670         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2671         deciding whether to not re-use a DIE.
2673 2018-06-28  Richard Biener  <rguenther@suse.de>
2675         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2676         DW_AT_abstract_origin attribute.
2678 2018-06-28  Martin Liska  <mliska@suse.cz>
2680         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2681         Use newly introduced constants.
2682         * tree-switch-conversion.h (struct jump_table_cluster):
2683         Define max_ratio_for_size and max_ratio_for_speed.
2685 2018-06-28  Martin Liska  <mliska@suse.cz>
2687         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2688         Add new checking assert to catch invalid state.
2689         (jump_table_cluster::can_be_handled): Handle single case
2690         clusters.
2691         (jump_table_cluster::is_beneficial): Bail out for such case.
2692         (bit_test_cluster::find_bit_tests):
2693         Add new checking assert to catch invalid state.
2694         (bit_test_cluster::can_be_handled): Handle single case
2695         clusters.
2696         (bit_test_cluster::is_beneficial): Bail out for such case.
2697         (switch_decision_tree::analyze_switch_statement):
2698         Fix comment.
2700 2018-06-28  Martin Liska  <mliska@suse.cz>
2702         * common.opt: Introduce -completion option.
2703         * gcc.c (driver_handle_option): Handle it.
2704         (driver::main): Print completions if completion
2705         is set.
2706         * opt-suggestions.c (option_proposer::get_completions):
2707         New function.
2708         (option_proposer::suggest_completion): Likewise.
2709         (option_proposer::find_param_completions): Likewise.
2710         (verify_autocompletions): Likewise.
2711         (test_completion_valid_options): Likewise.
2712         (test_completion_valid_params): Likewise.
2713         (in_completion_p): Likewise.
2714         (empty_completion_p): Likewise.
2715         (test_completion_partial_match): Likewise.
2716         (test_completion_garbage): Likewise.
2717         (opt_proposer_c_tests): Likewise.
2718         * opt-suggestions.h: Declare new functions.
2719         * opts.c (common_handle_option): Handle OPT__completion_.
2720         * selftest-run-tests.c (selftest::run_tests): Add
2721         opt_proposer_c_tests.
2722         * selftest.c (assert_str_startswith): New.
2723         * selftest.h (assert_str_startswith): Likewise.
2724         (opt_proposer_c_tests): New.
2725         (ASSERT_STR_STARTSWITH): Likewise.
2727 2018-06-28  Martin Liska  <mliska@suse.cz>
2729         * Makefile.in: Add opt-suggestions.o.
2730         * gcc-main.c: Include opt-suggestions.h.
2731         * gcc.c (driver::driver): Likewise.
2732         (driver::~driver): Remove m_option_suggestions.
2733         (driver::build_option_suggestions): Moved to option_proposer.
2734         (driver::suggest_option): Likewise.
2735         (driver::handle_unrecognized_options): Use option_proposer.
2736         * gcc.h (class driver): Add new memver m_option_proposer.
2737         * opt-suggestions.c: New file.
2738         * opt-suggestions.h: New file.
2740 2018-06-28  Martin Liska  <mliska@suse.cz>
2742         * vec.h (class auto_string_vec): New (moved from auto_argvec).
2743         (auto_string_vec::~auto_string_vec): Likewise.
2745 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
2747         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2748         prevent_decl_creation_for_types fields up and add reset_location field.
2749         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2750         statement if id->reset_location is true.
2751         (copy_edges_for_bb): Do not set goto_locus on the new edges if
2752         id->reset_location is true.
2753         (copy_phis_for_bb): Force input_location on the arguments if
2754         id->reset_location is true.
2755         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2756         is set on the function to be inlined.
2758 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
2760         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2762 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
2764         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2765         registers for Pmode.
2766         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2767         hard registers for the clobbered pseudo.
2769 2018-06-27  Paul Koning  <ni1d@arrl.net>
2771         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2772         mutually exclusive options.
2773         * config/pdp11/constraints.md (h): New constraint.
2774         (O): Update definition to match shift code generation.
2775         (D): New constraint.
2776         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2777         (CCFP): Remove.
2778         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2779         function.
2780         (output_jump): Change arguments.
2781         (pdp11_fixed_cc_regs): New function.
2782         (pdp11_cc_mode): Ditto.
2783         (pdp11_expand_shift): Ditto.
2784         (pdp11_assemble_shift): Ditto.
2785         (pdp11_small_shift): Ditto.
2786         (pdp11_branch_cost): Remove.
2787         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2788         from output.
2789         (pdp11_register_move_cost): Update for CC registers.
2790         (pdp11_rtx_costs): Add case for LSHIFTRT.
2791         (pdp11_output_jump): Add CCNZ mode conditional branches.
2792         (notice_update_cc_on_set): Remove.
2793         (pdp11_cc_mode): New function.
2794         (simple_memory_operand): Correct pre/post decrement case.
2795         (no_side_effect_operand): New function.
2796         (pdp11_regno_reg_class): Add CC_REGS class.
2797         (pdp11_fixed_cc_regs): New function.
2798         (pdp11_small_shift): New function.
2799         (pdp11_expand_shift): New function to expand shift insns.
2800         (pdp11_assemble_shift): New function to output shifts.
2801         (pdp11_branch_cost): Remove.
2802         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2803         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2804         (WCHAR_TYPE): Ditto.
2805         (PTRDIFF_TYPE): Ditto.
2806         (ADJUST_INSN_LENGTH): New macro.
2807         (FIXED_REGISTERS): Add CC registers.
2808         (CALL_USED_REGISTERS): Ditto.
2809         (reg_class): Ditto.
2810         (REG_CLASS_NAMES): Ditto.
2811         (REG_CLASS_CONTENTS): Ditto.
2812         (SELECT_CC_MODE): Use new function.
2813         (TARGET_FLAGS_REGNUM): New macro.
2814         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2815         (cc0_reg_rtx): Remove.
2816         (CC_STATUS_MDEP): Remove.
2817         (CC_STATUS_MDEFP_INIT): Remove.
2818         (CC_IN_FPU): Remove.
2819         (NOTICE_UPDATE_CC): Remove.
2820         (REGISTER_NAMES): Add CC registers.
2821         (BRANCH_COST): Change to constant 1.
2822         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2823         handling.
2824         * config/pdp11/pdp11.opt (mbcopy): Remove.
2825         (mbcopy-builtin): Remove.
2826         (mbranch-cheap): Remove.
2827         (mbranch-expensive): Remove.
2828         * config/pdp11/predicates.md (expand_shift_operand): Update to
2829         match shift code generation.
2830         (ccnz_operator): New predicate.
2831         * doc/invoke.texi (PDP-11 Options): Remove deleted options
2832         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2833         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
2834         exclusive options.
2835         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
2836         description of O constraint.
2838 2018-06-27  Jeff Law  <law@redhat.com>
2839             Austin Law  <austinklaw@gmail.com>
2841         * config/v850/v850.md (addsi3_set_flags): New pattern.
2842         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2843         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2844         (zero_extendhisi2_v850_set_flags): Likewise.
2845         (zero_extendqisi2_v850_set_flags): Likewise.
2846         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2847         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2848         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2850         * config/v850/v850-protos.h (notice_update_cc): Remove.
2851         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2852         (v850_print_operand): Handle 'D' and "d".
2853         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2854         Add handling of arithmetic/logical operations compared against zero.
2855         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2856         Do not look at v850_compare_op, instead get mode from last argument.
2857         (v850_gen_compare): Remove
2858         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2859         after reload for prologue insns.
2860         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2861         patterns.
2862         (construct_save_jarl): Likewise.
2863         (TARGET_FLAGS_REGNUM): Define.
2864         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2865         (NOTICE_UPDATE_CC): Remove.
2866         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2867         than cc0.  Conditionalize on reload_completed.
2868         (cmpsi_insn, setfcc_insn): Likewise.
2869         (tst1 splitter): Turn into define_and_split which sets the flags
2870         after reload.
2871         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2872         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2873         (cstoresf4, cstoredf4): Clobber the flags.
2874         (cmpsi, cmpsf, cmpdf): Remove expanders.
2875         (setf_insn): Remove pattern.
2876         (addsi3): Turn into define_and_split which clobbers the flags after
2877         reload and a suitable pattern (addsi3_clobber_flags) for use after
2878         reload.
2879         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2880         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2881         (ashrsi3, ashrsi3_v850e2): Likewise.
2882         (bins): Clobber the flags.
2883         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2884         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2885         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2886         (call_value_internal_short, call_value_internal_long): Likewise.
2887         (callt_save_interrupt, callt_return_interrupt): Likewise.
2888         (save_interrupt, return_interrupt): Likewise.
2889         (callt_save_all_interrupt, save_all_interrupt): Likewise.
2890         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2891         (restore_all_interrupt, _restore_all_interrupt): Likewise.
2892         (All FP comparisons): Only allow after reload has completed.
2893         (trfsr): Likewise.
2894         (divh, divhu): Tweak output template.
2895         (branch_z_normal, branch_z_invert): Remove
2896         (branch_nz_normal, branch_nz_invert): Likewise.
2897         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2899         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2900         * config/v850/v850.c (notice_update_cc): Remove.
2901         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
2902         (CC_NO_CARRY): Likewise.
2903         (NOTICE_UPDATE_CC): Define to nothing.
2904         * config/v850/v850.md: Remove block comment on cc0 handling
2905         Remove "cc" attribute from all patterns.  Remove cc_status handling
2906         from all patterns.  Minor formatting fixes.
2908 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2910         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2911         (cortex-a76.cortex-a55): Likewise.
2912         * config/aarch64/aarch64-tune.md: Regenerate.
2913         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2914         cortex-a76.cortex-a55.
2916 2018-06-27  Jeff Law  <law@redhat.com>
2918         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2919         (MULTILIB_DIRNAMES): Similarly.
2921 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
2923         * gimple.h (gimple_return_retbnd): Delete.
2924         (gimple_return_set_retbnd): Likewise.
2925         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2926         gimple_return_set_retbnd.
2927         * gimple-pretty-print.c (dump_gimple_return): Remove call to
2928         gimple_return_retbnd and adjust.
2929         * tree-inline.h (struct copy_body_data): Remove retbnd field.
2930         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2931         Explicitly return NULL in a couple more cases.  Move assertion
2932         on debug statements and remove unreachable code.
2933         (reset_debug_binding): Do not test id->retbnd.
2934         (expand_call_inline): Do not set it.
2936 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2938         * configure.ac: Add --disable-gcov option.
2939         * configure: Regenerate.
2940         * Makefile.in: Honour @enable_gcov@.
2941         * doc/install.texi: Document --disable-gcov.
2943 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2945         * config/arm/arm-cpus.in (cortex-a76): New entry.
2946         (cortex-a76.cortex-a55): Likewise.
2947         * config/arm/arm-tables.opt: Regenerate.
2948         * config/arm/arm-tune.md: Likewise.
2949         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2950         * doc/invoke.texi (ARM Options): Document cortex-a76 and
2951         cortex-a76.cortex-a55.
2953 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
2955         PR target/85769
2956         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2958 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2960         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2961         comment.
2962         (EPILOGUE_USES): Likewise.
2964 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
2966         * tree-inline.c (remap_location): New function extracted from...
2967         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
2968         (copy_phis_for_bb): ...here.  Call remap_location.
2969         (copy_cfg_body): Adjust call to copy_edges_for_bb.
2971 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
2973         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2974         unaligned vsx for 16B memset.
2976 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
2978         PR target/86285
2979         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2980         ieee128_float_type_node to long_double_type_node unless
2981         TARGET_LONG_DOUBLE_128 is set.
2983 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
2985         * cfgloop.c (get_loop_location): Convert return type from
2986         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2987         by implicit construction from rtx_insn *, and using
2988         dump_user_location_t::from_function_decl for the fallback case.
2989         * cfgloop.h (get_loop_location): Convert return type from
2990         location_t to dump_user_location_t.
2991         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2992         dump_printf_loc to pass in a dump_location_t rather than a
2993         location_t, via the gimple stmt.
2994         * coverage.c (get_coverage_counts): Update calls to
2995         dump_printf_loc to pass in dump_location_t rather than a
2996         location_t.
2997         * doc/optinfo.texi (Dump types): Convert example of
2998         dump_printf_loc from taking "locus" to taking "insn".  Update
2999         description of the "_loc" calls to cover dump_location_t.
3000         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3001         "selftest.h".
3002         (dump_user_location_t::dump_user_location_t): New constructors,
3003         from gimple *stmt and rtx_insn *.
3004         (dump_user_location_t::from_function_decl): New function.
3005         (dump_loc): Make static.
3006         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3007         const dump_location_t &.
3008         (dump_generic_expr_loc): Delete.
3009         (dump_printf_loc): Convert param "loc" from location_t to
3010         const dump_location_t &.
3011         (selftest::test_impl_location): New function.
3012         (selftest::dumpfile_c_tests): New function.
3013         * dumpfile.h: Include "profile-count.h".
3014         (class dump_user_location_t): New class.
3015         (struct dump_impl_location_t): New struct.
3016         (class dump_location_t): New class.
3017         (dump_printf_loc): Convert 2nd param from source_location to
3018         const dump_location_t &.
3019         (dump_generic_expr_loc): Delete.
3020         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3021         const dump_location_t &.
3022         * gimple-fold.c (fold_gimple_assign): Update call to
3023         dump_printf_loc to pass in a dump_location_t rather than a
3024         location_t, via the gimple stmt.
3025         (gimple_fold_call): Likewise.
3026         * gimple-loop-interchange.cc
3027         (loop_cand::analyze_iloop_reduction_var): Update for change to
3028         check_reduction_path.
3029         (tree_loop_interchange::interchange): Update for change to
3030         find_loop_location.
3031         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3032         change in return-type of find_loop_location.
3033         (graphite_regenerate_ast_isl): Likewise.
3034         * graphite-optimize-isl.c (optimize_isl): Likewise.
3035         * graphite.c (graphite_transform_loops): Likewise.
3036         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3037         pass in a dump_location_t rather than a location_t, via the
3038         gimple stmt.
3039         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3040         * ipa.c (walk_polymorphic_call_targets): Likewise.
3041         * loop-unroll.c (report_unroll): Convert "locus" param from
3042         location_t to dump_location_t.
3043         (decide_unrolling): Update for change to get_loop_location's
3044         return type.
3045         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3046         location_t to dump_user_location_t.
3047         (grid_find_single_omp_among_assignments_1): Updates calls to
3048         dump_printf_loc to pass in a dump_location_t rather than a
3049         location_t, via the gimple stmt.
3050         (grid_parallel_clauses_gridifiable): Convert "tloc" from
3051         location_t to dump_location_t.  Updates calls to dump_printf_loc
3052         to pass in a dump_location_t rather than a location_t, via the
3053         gimple stmt.
3054         (grid_inner_loop_gridifiable_p): Likewise.
3055         (grid_dist_follows_simple_pattern): Likewise.
3056         (grid_gfor_follows_tiling_pattern): Likewise.
3057         (grid_target_follows_gridifiable_pattern): Likewise.
3058         (grid_attempt_target_gridification): Convert initialization
3059         of local "grid" from memset to zero-initialization; FIXME: does
3060         this require C++11?  Update call to dump_printf_loc to pass in a
3061         optinfo_location rather than a location_t, via the gimple stmt.
3062         * profile.c (read_profile_edge_counts): Updates call to
3063         dump_printf_loc to pass in a dump_location_t rather than a
3064         location_t
3065         (compute_branch_probabilities): Likewise.
3066         * selftest-run-tests.c (selftest::run_tests): Call
3067         dumpfile_c_tests.
3068         * selftest.h (dumpfile_c_tests): New decl.
3069         * tree-loop-distribution.c (pass_loop_distribution::execute):
3070         Update for change in return type of find_loop_location.
3071         * tree-parloops.c (parallelize_loops): Likewise.
3072         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3073         "locus" from location_t to dump_user_location_t.
3074         (canonicalize_loop_induction_variables): Likewise.
3075         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3076         for change in return type of find_loop_location.
3077         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3078         to dump_printf_loc to pass in a dump_location_t rather than a
3079         location_t, via the stmt.
3080         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3081         Likewise.
3082         * tree-vect-loop-manip.c (find_loop_location): Convert return
3083         type from source_location to dump_user_location_t.
3084         (vect_do_peeling): Update for above change.
3085         (vect_loop_versioning): Update for change in type of
3086         vect_location.
3087         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3088         from location_t to dump_user_location_t.
3089         (vect_estimate_min_profitable_iters): Update for change in type
3090         of vect_location.
3091         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3092         location_t to dump_location_t.
3093         (vect_slp_bb): Update for change in type of vect_location.
3094         * tree-vectorizer.c (vect_location): Convert from source_location
3095         to dump_user_location_t.
3096         (try_vectorize_loop_1): Update for change in vect_location's type.
3097         (vectorize_loops): Likewise.
3098         (increase_alignment): Likewise.
3099         * tree-vectorizer.h (vect_location): Convert from source_location
3100         to dump_user_location_t.
3101         (find_loop_location): Convert return type from source_location to
3102         dump_user_location_t.
3103         (check_reduction_path): Convert 1st param from location_t to
3104         dump_user_location_t.
3105         * value-prof.c (check_counter): Update call to dump_printf_loc to
3106         pass in a dump_user_location_t rather than a location_t; update
3107         call to error_at for change in type of "locus".
3108         (check_ic_target): Update call to dump_printf_loc to
3109         pass in a dump_user_location_t rather than a location_t, via the
3110         call_stmt.
3112 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
3114         * config/s390/s390.h (enum processor_flags): Do not use
3115         default tune parameter when -march was specified.
3117 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
3119         PR target/86314
3120         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3121         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3122         operands.
3124 2018-06-26  Richard Biener  <rguenther@suse.de>
3126         PR tree-optimization/86287
3127         PR bootstrap/86316
3128         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3129         (vect_analyze_loop): Initialize n_stmts.
3131 2018-06-26  Richard Biener  <rguenther@suse.de>
3133         PR middle-end/86271
3134         * fold-const.c (fold_convertible_p): Pointer extension
3135         isn't valid.
3137 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
3139         PR debug/86064
3140         * dwarf2out.c (loc_list_has_views): Adjust comments.
3141         (dw_loc_list): Split single cross-partition range with
3142         nonzero locview.
3144 2018-06-25  Jeff Law  <law@redhat.com>
3146         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3147         on -mbig-switch by default.
3149         * config/v850/predicates.md (const_float_1_operand): Fix match_code
3150         test.
3151         (const_float_0_operand): Remove unused predicate.
3152         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3153         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3154         (recipsf2): New expander.  Original pattern now called
3155         (recipsf2_insn).
3156         (recipdf2, recipdf2_insn): Similarly.
3157         (rsqrtsf2, rsqrtsf2_insn): Similarly
3158         (rsqrtdf2, rsqrtdf2_insn): Similarly
3160 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
3162         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3163         Simplify logic for FreeBSD (twice).
3165 2018-06-25  Martin Sebor  <msebor@redhat.com>
3167         PR tree-optimization/86204
3168         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3169         a strnlen result if it's less than the length of the string.
3171 2018-06-25  Martin Sebor  <msebor@redhat.com>
3173         PR tree-optimization/85700
3174         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3175         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3176         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3178 2018-06-25  Martin Sebor  <msebor@redhat.com>
3180         * doc/extend.texi (Zero-length arrays): Update and clarify.
3182 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
3184         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3185         added IEEE/IBM long double multilib support on PowerPC little
3186         endian Linux systems.
3187         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3188         (MULTILIB_DEFAULTS): Likewise.
3189         * config/rs6000/rs6000.c (rs6000_option_override_internal):
3190         Likewise.
3191         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3192         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3193         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3195 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
3197         PR middle-end/86311
3198         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3199         (REORDER_45): Likewise.
3201 2018-06-25  Jeff Law  <law@redhat.com>
3203         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3204         dividend to 32 bits.  Adjust length.
3205         (udivmodhi4): Cleanup output template.  Fix length.
3207 2018-06-25  Carl Love  <cel@us.ibm.com>
3209         * config/rs6000/vsx.md: Change word selector to prefered location.
3211 2018-06-25  Richard Biener  <rguenther@suse.de>
3213         PR tree-optimization/86304
3214         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
3215         epilogue-if-converted loops as well.
3217 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
3219         * lto-section-out.c (lto_begin_section): Do not print section
3220         name for noaddr and unnumbered dumps.
3222 2018-06-25  Richard Biener  <rguenther@suse.de>
3224         * tree-vectorizer.h (struct vec_info_shared): New structure
3225         with parts split out from struct vec_info and loop_nest from
3226         struct _loop_vec_info.
3227         (struct vec_info): Adjust accordingly.
3228         (struct _loop_vec_info): Likewise.
3229         (LOOP_VINFO_LOOP_NEST): Adjust.
3230         (LOOP_VINFO_DATAREFS): Likewise.
3231         (LOOP_VINFO_DDRS): Likewise.
3232         (struct _bb_vec_info): Likewise.
3233         (BB_VINFO_DATAREFS): Likewise.
3234         (BB_VINFO_DDRS): Likewise.
3235         (struct _stmt_vec_info): Add dr_aux member.
3236         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
3237         (DR_MISALIGNMENT_UNINITIALIZED): New.
3238         (set_dr_misalignment): Adjust.
3239         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
3240         (vect_analyze_loop): Adjust prototype.
3241         (vect_analyze_loop_form): Likewise.
3242         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3243         Compute dependences lazily.
3244         (vect_record_base_alignments): Use shared datarefs/ddrs.
3245         (vect_verify_datarefs_alignment): Likewise.
3246         (vect_analyze_data_refs_alignment): Likewise.
3247         (vect_analyze_data_ref_accesses): Likewise.
3248         (vect_analyze_data_refs): Likewise.
3249         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
3250         constructor parameter for shared part.
3251         (vect_analyze_loop_form): Pass in shared part and adjust.
3252         (vect_analyze_loop_2): Pass in storage for the number of
3253         stmts.  Move loop nest finding to the caller.  Compute
3254         datarefs lazily.
3255         (vect_analyze_loop): Pass in shared part.
3256         (vect_transform_loop): Verify shared datarefs are unchanged.
3257         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
3258         constructor parameter for shared part.
3259         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
3260         (vect_slp_bb): Verify shared datarefs are unchanged before
3261         transform.
3262         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
3263         change.
3264         (new_stmt_vec_info): Initialize DR_AUX misalignment to
3265         DR_MISALIGNMENT_UNINITIALIZED.
3266         * tree-vectorizer.c (vec_info::vec_info): Add constructor
3267         parameter for shared part.
3268         (vec_info::~vec_info): Adjust.
3269         (vec_info_shared::vec_info_shared): New.
3270         (vec_info_shared::~vec_info_shared): Likewise.
3271         (vec_info_shared::save_datarefs): Likewise.
3272         (vec_info_shared::check_datarefs): Likewise.
3273         (try_vectorize_loop_1): Construct shared part live for analyses
3274         of a single loop for multiple vector sizes.
3275         * tree-parloops.c (gather_scalar_reductions): Adjust.
3277 2018-06-25  Richard Biener  <rguenther@suse.de>
3279         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
3280         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
3281         (vect_analyze_data_refs): Remove similar code from here and
3282         simplify accordingly.
3284 2018-06-25  Richard Biener  <rguenther@suse.de>
3286         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
3287         for reverse storage order accesses rather than asserting
3288         they cannot happen here.
3290 2018-06-25  Tom de Vries  <tdevries@suse.de>
3292         PR debug/86257
3293         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3294         Use data16 instead of .byte for insn prefix.
3296 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
3298         PR C++/86082
3299         * parser.c (make_char_string_pack): Pass this literal chars
3300         through cpp_interpret_string.
3301         (cp_parser_userdef_numeric_literal): Check the result of
3302         make_char_string_pack.
3304 2018-06-24  Maya Rashish  <coypu@sdf.org>
3306         * ginclude/stddef.h: Simplify conditions around avoiding
3307         re-definition of __size_t.
3309 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3311         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3312         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3314 2018-06-22  Maya Rashish  <coypu@sdf.org>
3316         * doc/invoke.texi (mno-fancy-math-387): Update for changes
3317         made to OpenBSD and NetBSD through the years.
3319 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3321         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3322         behavior of vec_pack (vector double, vector double) to match
3323         behavior of vec_float2 (vector double, vector double).
3325 2018-06-22  Olivier Hainque  <hainque@adacore.com>
3327         * gimplify.c (gimplify_function_tree): Prevent creation
3328         of a trampoline for the address of the current function
3329         passed to entry/exit instrumentation hooks.
3331 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
3333         PR target/86222
3334         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3335         correctly.
3337 2018-06-22  Martin Liska  <mliska@suse.cz>
3339         PR tree-optimization/86263
3340         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3341         Bail out if is_enabled is false.
3342         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3343         New declaration.
3344         (jump_table_cluster::is_enabled): New function.
3346 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3348         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3349         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3350         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3351         (lto_input_ts_binfo_tree_pointers): Likewise.
3352         * tree-streamer-out.c (streamer_write_tree_bitfields,
3353         write_ts_binfo_tree_pointers): Likewise.
3354         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3356 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3358         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3360 2018-06-22  Martin Liska  <mliska@suse.cz>
3362         * symbol-summary.h (get): Make it pure and inline move
3363         functionality from ::get function.
3364         (get): Remove and inline into ::get and ::get_create.
3365         (get_create): Move code from ::get function.
3367 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3369         PR target/85994
3370         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3371         -x assembler-with-cpp.
3373 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3375         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3376         _FILE_OFFSET_BITS=64 for C++.
3378 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
3380         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3381         conversion insn that shows up when pr85657-3.c is compiled using
3382         IEEE 128-bit long double.
3383         (neg<mode>2_internal): Use the correct mode to check whether the
3384         mode is IBM extended.
3385         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3386         multiply and divide external functions from being created more
3387         than once.
3389 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3391         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3392         functions.
3393         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
3394         the edge can be forwarded.
3395         (cfg_layout_merge_blocks): Likewise.
3397 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3399         * except.c (finish_eh_generation): Commit edge insertions only after
3400         the EH edges have been redirected from post-landing to landing pads.
3402 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3404         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3405         create_tmp_var_for to create the FRAME decl.
3406         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3408 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3410         * tree-inline.c (copy_edges_for_bb): Minor tweak.
3411         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3412         debug statement when resetting its value.
3413         (expand_call_inline): Copy the locus of the call onto the assignment
3414         of the return value, if any.  Use local variable in more cases.
3416 2018-06-21  Martin Liska  <mliska@suse.cz>
3418         * ipa-pure-const.c (propagate_nothrow): Use
3419         funct_state_summaries->get.
3420         (dump_malloc_lattice): Likewise.
3421         (propagate_malloc): Likewise.
3423 2018-06-21  Richard Biener  <rguenther@suse.de>
3425         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3426         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3427         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3428         comment.
3429         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3430         BLOCK_ABSTRACT_ORIGIN unconditionally.
3432 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
3434         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3435         deleting it.
3436         * ipa-reference.c (ipa_reference_c_finalize): Delete
3437         ipa_ref_opt_sum_summaries and set it to NULL.
3439 2018-06-21  Tom de Vries  <tdevries@suse.de>
3441         PR tree-optimization/85859
3442         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3443         test with comment from bb_no_side_effects_p.
3445 2018-06-21  Richard Biener  <rguenther@suse.de>
3447         PR tree-optimization/86232
3448         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3449         max for constant niter.
3451 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3453         * config/aarch64/aarch64-simd.md
3454         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3456 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3458         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3459         Make opernads of the unspec commutative.
3461 2018-06-21  Richard Biener  <rguenther@suse.de>
3463         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3464         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3465         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3466         (vect_analyze_data_ref_dependence): Re-order checks to deal with
3467         NULL DR_STEP.
3468         (vect_record_base_alignments): Do not record base alignment
3469         for gathers or scatters.
3470         (vect_compute_data_ref_alignment): Drop return value that is always
3471         true.  Bail out early for gathers or scatters.
3472         (vect_enhance_data_refs_alignment): Bail out early for gathers
3473         or scatters.
3474         (vect_find_same_alignment_drs): Likewise.
3475         (vect_analyze_data_refs_alignment): Remove dead code.
3476         (vect_slp_analyze_and_verify_node_alignment): Likewise.
3477         (vect_analyze_data_refs): For possible gathers or scatters do
3478         not create an alternate DR, just check their possible validity
3479         and mark them.  Adjust DECL_NONALIASED handling to not rely
3480         on DR_BASE_ADDRESS.
3481         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3482         update inits of gathers or scatters.
3483         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3484         Also copy gather/scatter flag to pattern vinfo.
3486 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3488         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3489         behavior of vec_packsu (vector unsigned long long, vector unsigned
3490         long long) to match behavior of vec_packs with same signature.
3492 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
3493             Thomas Schwinge <thomas@codesourcery.com>
3494             Cesar Philippidis  <cesar@codesourcery.com>
3496         * gimplify.c (gimplify_scan_omp_clauses): Add support for
3497         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3498         (gimplify_adjust_omp_clauses): Likewise.
3499         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3500         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3501         (gimplify_omp_target_update): Update handling of acc update and
3502         enter/exit data.
3503         * omp-low.c (install_var_field): Remove unused parameter
3504         base_pointers_restrict.
3505         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3506         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3507         FINALIZE}
3508         (omp_target_base_pointers_restrict_p): Delete.
3509         (scan_omp_target): Update call to scan_sharing_clauses.
3510         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3511         FINALIZE}.
3512         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3513         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3514         (convert_local_omp_clauses): Likewise.
3515         * tree-pretty-print.c (dump_omp_clause): Likewise.
3516         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
3517         FINALIZE}.
3518         (omp_clause_code_name): Likewise.
3520 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3522         PR debug/86194
3523         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3524         be narrowed.
3526         PR tree-optimization/86231
3527         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
3528         anti-range don't overwrite *vr0min before using it to compute *vr0max.
3530 2018-06-20  Tom de Vries  <tdevries@suse.de>
3532         PR tree-optimization/86097
3533         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3534         iv type if signedness of iv type is not the same as that of *nit.
3536 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3538         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
3539         EDGE_EH edges, verify they are all EDGE_EH.
3541 2018-06-20  Maya Rashish  <coypu@sdf.org>
3543         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3545 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3547         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3548         * config/aarch64/aarch64.c (xgene1_tunings): Add
3549         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3550         (aarch64_mode_valid_for_sched_fusion_p):
3551         Allow 16-byte modes.
3552         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3553         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3554         128-bit modes.
3555         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3556         New pattern.
3557         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3558         * config/aarch64/iterators.md (VQ2): New mode iterator.
3560 2018-06-20  Martin Liska  <mliska@suse.cz>
3562         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3563         Change default ratio from 10 to 8.
3565 2018-06-20  Martin Liska  <mliska@suse.cz>
3567         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3568         New.
3569         (bit_test_cluster::find_bit_tests): Likewise.
3570         (switch_decision_tree::analyze_switch_statement): Find clusters.
3571         * tree-switch-conversion.h (struct jump_table_cluster): Document
3572         hierarchy.
3574 2018-06-20  Martin Liska  <mliska@suse.cz>
3576         * tree-switch-conversion.c (switch_conversion::collect):
3577         Record m_uniq property.
3578         (switch_conversion::expand): Bail out for special conditions.
3579         (group_cluster::~group_cluster): New.
3580         (group_cluster::group_cluster): Likewise.
3581         (group_cluster::dump): Likewise.
3582         (jump_table_cluster::emit): New.
3583         (switch_decision_tree::fix_phi_operands_for_edges): New.
3584         (struct case_node): Remove struct.
3585         (jump_table_cluster::can_be_handled): New.
3586         (case_values_threshold): Moved to header.
3587         (reset_out_edges_aux): Likewise.
3588         (jump_table_cluster::is_beneficial): New.
3589         (bit_test_cluster::can_be_handled): Likewise.
3590         (add_case_node): Remove.
3591         (bit_test_cluster::is_beneficial): New.
3592         (case_bit_test::cmp): New.
3593         (bit_test_cluster::emit): New.
3594         (expand_switch_as_decision_tree_p): Remove.
3595         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3596         (fix_phi_operands_for_edge): Likewise.
3597         (switch_decision_tree::analyze_switch_statement): New.
3598         (compute_cases_per_edge): Move ...
3599         (switch_decision_tree::compute_cases_per_edge): ... here.
3600         (try_switch_expansion): Likewise.
3601         (switch_decision_tree::try_switch_expansion): Likewise.
3602         (record_phi_operand_mapping): Likewise.
3603         (switch_decision_tree::record_phi_operand_mapping): Likewise.
3604         (emit_case_decision_tree): Likewise.
3605         (switch_decision_tree::emit): Likewise.
3606         (balance_case_nodes): Likewise.
3607         (switch_decision_tree::balance_case_nodes): Likewise.
3608         (dump_case_nodes): Likewise.
3609         (switch_decision_tree::dump_case_nodes): Likewise.
3610         (emit_jump): Likewise.
3611         (switch_decision_tree::emit_jump): Likewise.
3612         (emit_cmp_and_jump_insns): Likewise.
3613         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3614         (emit_case_nodes): Likewise.
3615         (switch_decision_tree::emit_case_nodes): Likewise.
3616         (conditional_probability): Remove.
3617         * tree-switch-conversion.h (enum cluster_type): New.
3618         (PRINT_CASE): New.
3619         (struct cluster): Likewise.
3620         (cluster::cluster): Likewise.
3621         (struct simple_cluster): Likewise.
3622         (simple_cluster::simple_cluster): Likewise.
3623         (struct group_cluster): Likewise.
3624         (struct jump_table_cluster): Likewise.
3625         (struct bit_test_cluster): Likewise.
3626         (struct min_cluster_item): Likewise.
3627         (struct case_tree_node): Likewise.
3628         (case_tree_node::case_tree_node): Likewise.
3629         (jump_table_cluster::case_values_threshold): Likewise.
3630         (struct case_bit_test): Likewise.
3631         (struct switch_decision_tree): Likewise.
3632         (struct switch_conversion): Likewise.
3633         (switch_decision_tree::reset_out_edges_aux): Likewise.
3635 2018-06-20  Martin Liska  <mliska@suse.cz>
3637         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3638         (hoist_edge_and_branch_if_true): Likewise.
3639         (expand_switch_using_bit_tests_p): Likewise.
3640         (struct case_bit_test): Likewise.
3641         (case_bit_test_cmp): Likewise.
3642         (emit_case_bit_tests): Likewise.
3643         (switch_conversion::switch_conversion): New class.
3644         (struct switch_conv_info): Remove old struct.
3645         (collect_switch_conv_info): More to ...
3646         (switch_conversion::collect): ... this.
3647         (check_range): Likewise.
3648         (switch_conversion::check_range): Likewise.
3649         (check_all_empty_except_final): Likewise.
3650         (switch_conversion::check_all_empty_except_final): Likewise.
3651         (check_final_bb): Likewise.
3652         (switch_conversion::check_final_bb): Likewise.
3653         (create_temp_arrays): Likewise.
3654         (switch_conversion::create_temp_arrays): Likewise.
3655         (free_temp_arrays): Likewise.
3656         (gather_default_values): Likewise.
3657         (switch_conversion::gather_default_values): Likewise.
3658         (build_constructors): Likewise.
3659         (switch_conversion::build_constructors): Likewise.
3660         (constructor_contains_same_values_p): Likewise.
3661         (switch_conversion::contains_same_values_p): Likewise.
3662         (array_value_type): Likewise.
3663         (switch_conversion::array_value_type): Likewise.
3664         (build_one_array): Likewise.
3665         (switch_conversion::build_one_array): Likewise.
3666         (build_arrays): Likewise.
3667         (switch_conversion::build_arrays): Likewise.
3668         (gen_def_assigns): Likewise.
3669         (switch_conversion::gen_def_assigns): Likewise.
3670         (prune_bbs): Likewise.
3671         (switch_conversion::prune_bbs): Likewise.
3672         (fix_phi_nodes): Likewise.
3673         (switch_conversion::fix_phi_nodes): Likewise.
3674         (gen_inbound_check): Likewise.
3675         (switch_conversion::gen_inbound_check): Likewise.
3676         (process_switch): Use the newly created class.
3677         (switch_conversion::expand): New.
3678         (switch_conversion::~switch_conversion): New.
3679         * tree-switch-conversion.h: New file.
3681 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3683         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3684         tree-vect-patterns.c.
3685         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3686         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
3687         (vect_recog_sad_pattern): Likewise.
3688         (vect_recog_widen_sum_pattern): Likewise.
3689         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
3690         (vect_recog_widen_shift_pattern): Remove the type_in argument.
3691         (vect_recog_rotate_pattern): Likewise.
3692         (vect_recog_mult_pattern): Likewise.
3693         (vect_recog_vector_vector_shift_pattern): Likewise.
3694         (vect_recog_divmod_pattern): Likewise.
3695         (vect_recog_mixed_size_cond_pattern): Likewise.
3696         (vect_recog_bool_pattern): Likewise.
3697         (vect_recog_mask_conversion_pattern): Likewise.
3698         (vect_try_gather_scatter_pattern): Likewise.
3699         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
3700         (vect_recog_over_widening_pattern): Likewise.
3701         (vect_recog_gather_scatter_pattern): Likewise.
3702         (vect_recog_func_ptr): Move from tree-vectorizer.h
3703         (vect_vect_recog_func_ptrs): Move further down the file.
3704         (vect_recog_func): Likewise.  Remove the third argument.
3705         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3706         (vect_pattern_recog_1): Expect the pattern function to do any
3707         necessary target tests.  Also expect it to provide a vector type.
3708         Remove the type_in handling.
3710 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3712         * tree-vect-patterns.c (vect_pattern_detected): New function.
3713         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3714         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3715         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3716         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3717         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3718         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3719         (vect_recog_mask_conversion_pattern)
3720         (vect_try_gather_scatter_pattern): Likewise.
3722 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3724         * tree-vect-patterns.c (vect_get_internal_def): New function.
3725         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3726         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3727         (search_type_for_mask_1): Use it.
3729 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3731         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3732         redundant WIDEN_SUM_EXPR handling.
3733         (vect_recog_sad_pattern): Likewise.
3735 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3737         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3738         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3739         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3740         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3741         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3743 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3745         * tree-vect-stmts.c (vectorizable_call): Make sure that we
3746         use the stmt_vec_info of the original bb statement for the
3747         new zero assignment, even if the call is part of a pattern.
3749 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3751         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3752         that the sequence is attached to the original statement rather
3753         than the pattern statement.
3754         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3755         PATTERN_DEF_SEQ from the original statement rather than
3756         the main pattern statement.
3757         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3758         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3759         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3761 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3763         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3764         definition statements before the early exit for statements that aren't
3765         live or relevant.
3766         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3767         split out from...
3768         (vect_transform_loop): ...here.  Process pattern definition
3769         statements without first checking whether the main pattern
3770         statement is live or relevant.
3772 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3774         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3775         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3777 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
3779         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3780         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3781         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3782         (expand_block_compare): Change select_block_compare_mode call.
3783         (expand_strncmp_align_check): Use new functions, fix comment.
3784         (emit_final_str_compare_gpr): New function.
3785         (expand_strn_compare): Refactor and clean up code.
3786         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3788 2018-06-19  Tony Reix  <tony.reix@atos.com>
3789             Damien Bergamini  <damien.bergamini@atos.com>
3790             David Edelsohn  <dje.gcc@gmail.com>
3792         * collect2.c (static_obj): New variable.
3793         (static_libs): New variable.
3794         (is_in_list): Uncomment declaration.
3795         (main): Track AIX libraries linked statically.
3796         (is_in_list): Uncomment definition.
3797         (scan_prog_file): Don't add AIX shared libraries initializer
3798         to constructor list if linking statically.
3800 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
3802         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3803         constant.
3804         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3806 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
3808         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3809         blocks.
3811 2018-06-19  Martin Liska  <mliska@suse.cz>
3813         * config/i386/i386.c (ix86_can_inline_p): Do not use
3814         ipa_fn_summaries::get_create.
3815         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3816         get.
3817         (devirtualization_time_bonus): Likewise.
3818         (ipcp_propagate_stage): Likewise.
3819         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3820         (edge_set_predicate): Likewise.
3821         (evaluate_conditions_for_known_args): Likewise.
3822         (evaluate_properties_for_edge): Likewise.
3823         (ipa_call_summary::reset): Tranform to ...
3824         (ipa_call_summary::~ipa_call_summary): ... this.
3825         (ipa_fn_summary::reset): Transform to ...
3826         (ipa_fn_summary::~ipa_fn_summary): ... this.
3827         (ipa_fn_summary_t::remove): Rename to ...
3828         (ipa_fn_summary_t::remove_callees): ... this.
3829         (ipa_fn_summary_t::duplicate): Use placement new
3830         instead of memory copy.
3831         (ipa_call_summary_t::duplicate): Likewise.
3832         (ipa_call_summary_t::remove): Remove.
3833         (dump_ipa_call_summary): Change get_create to get.
3834         (ipa_dump_fn_summary): Dump only when summary exists.
3835         (analyze_function_body): Use symbol_summary::get instead
3836         of get_create.
3837         (compute_fn_summary): Likewise.
3838         (estimate_edge_devirt_benefit): Likewise.
3839         (estimate_edge_size_and_time): Likewise.
3840         (inline_update_callee_summaries): Likewise.
3841         (remap_edge_change_prob): Likewise.
3842         (remap_edge_summaries): Likewise.
3843         (ipa_merge_fn_summary_after_inlining): Likewise.
3844         (write_ipa_call_summary): Likewise.
3845         (ipa_fn_summary_write): Likewise.
3846         (ipa_free_fn_summary): Likewise.
3847         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3848         (struct ipa_call_summary): Likewise.
3849         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3850         of get_create.
3851         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3852         (estimate_size_after_inlining): Likewise.
3853         (estimate_growth): Likewise.
3854         (growth_likely_positive): Likewise.
3855         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3856         (inline_call): Likewise.
3857         * ipa-inline.c (caller_growth_limits): Likewise.
3858         (can_inline_edge_p): Likewise.
3859         (can_inline_edge_by_limits_p): Likewise.
3860         (compute_uninlined_call_time): Likewise.
3861         (compute_inlined_call_time): Likewise.
3862         (want_inline_small_function_p): Likewise.
3863         (edge_badness): Likewise.
3864         (update_caller_keys): Likewise.
3865         (update_callee_keys): Likewise.
3866         (inline_small_functions): Likewise.
3867         (inline_to_all_callers_1): Likewise.
3868         (dump_overall_stats): Likewise.
3869         (early_inline_small_functions): Likewise.
3870         (early_inliner): Likewise.
3871         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3872         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3873         * ipa-pure-const.c (malloc_candidate_p): Likewise.
3874         * ipa-split.c (execute_split_functions): Likewise.
3875         * symbol-summary.h: Likewise.
3876         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3878 2018-06-19  Richard Biener  <rguenther@suse.de>
3880         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3881         (vectorize_loops): ... here.  Fix dbgcnt handling.
3882         (try_vectorize_loop): Wrap try_vectorize_loop_1.
3884 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
3886         PR target/86197
3887         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3888         ieee128 argument takes up only one (vector) register, not two (floating
3889         point) registers.
3891 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3893         * gimplify.c (gimplify_init_constructor): Really never clear for an
3894         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3896 2018-06-19  Richard Biener  <rguenther@suse.de>
3898         PR tree-optimization/86179
3899         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3900         after failed recognition.
3902 2018-06-18  Martin Sebor  <msebor@redhat.com>
3904         PR middle-end/85602
3905         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3906         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3907         Handle integer subtraction.
3908         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3909         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3911 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3913         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3914         param from rtx to rtx_insn *.
3915         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3916         param.
3917         (frv_ifcvt_modify_insn): Likwise.
3918         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3919         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
3920         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3921         as_a <rtx_insn *> cast to local "unprotected_region" once
3922         it's been established that it's not NULL or pc_rtx.
3923         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3924         param "sethi" from rtx to rtx_insn *.
3925         (nds32_group_float_insns): Likewise for param "insn".
3926         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3927         param.
3928         (vax_output_int_subtract): Likewise.
3929         * config/vax/vax.c (vax_output_int_add): Likewise for param
3930         "insn".
3931         (vax_output_int_subtract): Likewise.
3932         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3933         (emit_pattern_after): Likewise for param "after".
3934         (emit_insn_after): Likewise.
3935         (emit_jump_insn_after): Likewise.
3936         (emit_call_insn_after): Likewise.
3937         (emit_debug_insn_after): Likewise.
3938         (emit_pattern_before): Likewise for param "before".
3939         (emit_insn_before): Likewise.
3940         (emit_jump_insn_before): Likewise.
3941         * final.c (get_insn_template): Likewise for param "insn", removing
3942         a cast.
3943         * output.h (get_insn_template): Likewise for 2nd param.
3944         * rtl.h (emit_insn_before): Likewise.
3945         (emit_jump_insn_before): Likewise.
3946         (emit_debug_insn_before_noloc): Likewise.
3947         (emit_insn_after): Likewise.
3948         (emit_jump_insn_after): Likewise.
3949         (emit_call_insn_after): Likewise.
3950         (emit_debug_insn_after): Likewise.
3951         (set_insn_deleted): Likewise for param.
3953 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
3955         PR target/85358
3956         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3957         floating point modes, so that IFmode is numerically greater than
3958         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3959         to declare the ordering.  This prevents IFmode from being
3960         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3961         machine.  Include rs6000-modes.h to share the fractional values
3962         between genmodes* and the rest of the compiler.
3963         (IFmode): Likewise.
3964         (KFmode): Likewise.
3965         (TFmode): Likewise.
3966         * config/rs6000/rs6000-modes.h: New file.
3967         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3968         meaning of rs6000_long_double_size so that 126..128 selects an
3969         appropriate 128-bit floating point type.
3970         (rs6000_option_override_internal): Likewise.
3971         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3972         (TARGET_LONG_DOUBLE_128): Change the meaning of
3973         rs6000_long_double_size so that 126..128 selects an appropriate
3974         128-bit floating point type.
3975         (LONG_DOUBLE_TYPE_SIZE): Update comment.
3976         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3977         source and destination to match the standard usage.
3978         (truncifkf2): Likewise.
3979         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3980         ISA 2.07 to use an explicit clobber, instead of passing in a
3981         temporary.
3982         (copysign<mode>3_soft): Likewise.
3984 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3986         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3987         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3988         (vect_slp_analyze_instance_dependence): Likewise.
3989         (vect_enhance_data_refs_alignment): Likewise.
3990         (vect_analyze_data_refs_alignment): Likewise.
3991         (vect_slp_analyze_and_verify_instance_alignment
3992         (vect_analyze_data_ref_accesses): Likewise.
3993         (vect_prune_runtime_alias_test_list): Likewise.
3994         (vect_analyze_data_refs): Likewise.
3995         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3996         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3997         (vect_analyze_scalar_cycles_1): Likewise.
3998         (vect_get_loop_niters): Likewise.
3999         (vect_analyze_loop_form_1): Likewise.
4000         (vect_update_vf_for_slp): Likewise.
4001         (vect_analyze_loop_operations): Likewise.
4002         (vect_analyze_loop): Likewise.
4003         (vectorizable_induction): Likewise.
4004         (vect_transform_loop): Likewise.
4005         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4006         * tree-vect-slp.c (vect_analyze_slp): Likewise.
4007         (vect_make_slp_decision): Likewise.
4008         (vect_detect_hybrid_slp): Likewise.
4009         (vect_slp_analyze_operations): Likewise.
4010         (vect_slp_bb): Likewise.
4011         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4012         (vectorizable_bswap): Likewise.
4013         (vectorizable_call): Likewise.
4014         (vectorizable_simd_clone_call): Likewise.
4015         (vectorizable_conversion): Likewise.
4016         (vectorizable_assignment): Likewise.
4017         (vectorizable_shift): Likewise.
4018         (vectorizable_operation): Likewise.
4019         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4021 2018-06-18  Martin Sebor  <msebor@redhat.com>
4023         PR tree-optimization/81384
4024         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4025         * builtins.c (expand_builtin_strnlen): New function.
4026         (expand_builtin): Call it.
4027         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4028         * builtins.def (BUILT_IN_STRNLEN): New.
4029         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4030         Warn for bounds in excess of maximum object size.
4031         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4032         single-value ranges.  Handle strnlen.
4033         (handle_builtin_strlen): Handle strnlen.
4034         (strlen_check_and_optimize_stmt): Same.
4035         * doc/extend.texi (Other Builtins): Document strnlen.
4037 2018-06-18  Maya Rashish  <coypu@sdf.org>
4039         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4040         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4041         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4043         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4044         here to ...
4045         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4047 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4049         * tree.c (escaped_string::escape): Replace cast to char * by
4050         const_cast<char *> (unescaped).
4052 2018-06-18  Nick Clifton  <nickc@redhat.com>
4054         PR 84195
4055         * tree.c (escaped_string): New class.  Converts an unescaped
4056         string into its escaped equivalent.
4057         (warn_deprecated_use): Use the new class to convert the
4058         deprecation message, if present.
4059         (test_escaped_strings): New self test.
4060         (test_c_tests): Add test_escaped_strings.
4061         * doc/extend.texi (deprecated): Add a note that the
4062         deprecation message is affected by the -fmessage-length
4063         option, and that control characters will be escaped.
4064         (#pragma GCC error): Document this pragma.
4065         (#pragma GCC warning): Likewise.
4066         * doc/invoke.texi (-fmessage-length): Document this option's
4067         effect on the #warning and #error preprocessor directives and
4068         the deprecated attribute.
4070 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
4072         * tree.c (decl_value_expr_lookup): Revert latest change.
4073         (decl_value_expr_insert): Likewise.
4075 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
4077         * gimplify.c (nonlocal_vlas): Delete.
4078         (nonlocal_vla_vars): Likewise.
4079         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4080         referenced VLAs.
4081         (gimplify_body): Do not create and destroy nonlocal_vlas.
4082         * tree-nested.c: Include diagnostic.h.
4083         (use_pointer_in_frame): Tweak.
4084         (lookup_field_for_decl): Add assertion and declare the transformation.
4085         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4086         internal error when the reference is in a wrong context.  Do not
4087         create a debug decl by default.
4088         (note_nonlocal_block_vlas): Delete.
4089         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4090         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
4091         create a debug decl by default.
4092         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4093         call is in a wrong context.
4094         (fixup_vla_decls): New function.
4095         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
4096         debug variables were created.
4097         * tree.c (decl_value_expr_lookup): Add checking assertion.
4098         (decl_value_expr_insert): Likewise.
4100 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
4102         PR middle-end/82479
4103         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4104         * tree-scalar-evolution.c (interpret_expr): Likewise.
4105         (expression_expensive_p): Likewise.
4106         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4107         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4108         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4109         (ssa_defined_by_minus_one_stmt_p): New.
4111 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
4113         PR middle-end/64946
4114         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4115         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4116         * dojump.c (do_jump): Likewise.
4117         * expr.c (expand_expr_real_2): Check operand type's sign.
4118         * fold-const.c (const_unop): Handle ABSU_EXPR.
4119         (fold_abs_const): Likewise.
4120         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4121         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4122         (strip_sign_op_1): Likesise.
4123         * match.pd: Add new pattern to generate ABSU_EXPR.
4124         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4125         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4126         * tree-eh.c (operation_could_trap_helper_p): Likewise.
4127         * tree-inline.c (estimate_operator_cost): Likewise.
4128         * tree-pretty-print.c (dump_generic_node): Likewise.
4129         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4130         * tree.def (ABSU_EXPR): New.
4132 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
4134         PR middle-end/86095
4135         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4136         documented as preserved for backward compatibility only.
4137         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4139         PR rtl-optimization/86108
4140         * bb-reorder.c (create_forwarder_block): Renamed to ...
4141         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
4142         jump from new landing pad to the second part.
4143         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4144         Adjust callers.
4146 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
4148         PR middle-end/85878
4149         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4150         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4151         Only call store_expr for halves if the mode is the same.
4153         PR middle-end/86123
4154         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4155         Fix up comment formatting.
4157 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4159         * typed-splay-tree.h (typed_splay_tree::remove): New function.
4160         (typed_splay_tree::closure,
4161         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4162         (typed_splay_tree::typed_splay_tree,
4163         typed_splay_tree::operator =): Declared private.
4164         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4165         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4166         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4167         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4168         typed_splay_tree::splay_tree_splay,
4169         typed_splay_tree::splay_tree_foreach_helper,
4170         typed_splay_tree::splay_tree_insert,
4171         typed_splay_tree::splay_tree_remove,
4172         typed_splay_tree::splay_tree_lookup,
4173         typed_splay_tree::splay_tree_predecessor,
4174         typed_splay_tree::splay_tree_successor,
4175         typed_splay_tree::splay_tree_min,
4176         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4177         (typed_splay_tree::root, typed_splay_tree::comp,
4178         typed_splay_tree::delete_key,
4179         typed_splay_tree::delete_value): New data members.
4180         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4181         typed_splay_tree::remove.
4183 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
4185         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4186         -mginv and -mno-ginv to the assembler.
4187         * config/mips/mips.opt (-mcrc): New option.
4188         (-mginv): Likewise.
4189         * doc/invoke.text (-mcrc): Document.
4190         (-mginv): Likewise.
4192 2018-06-15  Nick Clifton  <nickc@redhat.com>
4194         PR 84195
4195         * tree.c (escaped_string): New class.  Converts an unescaped
4196         string into its escaped equivalent.
4197         (warn_deprecated_use): Use the new class to convert the
4198         deprecation message, if present.
4199         (test_escaped_strings): New self test.
4200         (test_c_tests): Add test_escaped_strings.
4201         * doc/extend.texi (deprecated): Add a note that the
4202         deprecation message is affected by the -fmessage-length
4203         option, and that control characters will be escaped.
4204         (#pragma GCC error): Document this pragma.
4205         (#pragma GCC warning): Likewise.
4206         * doc/invoke.texi (-fmessage-length): Document this option's
4207         effect on the #warning and #error preprocessor directives and
4208         the deprecated attribute.
4210 2018-06-15  Richard Biener  <rguenther@suse.de>
4212         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
4213         here, also noting vector size used.
4214         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
4215         size used in MSG_OPTIMIZED_LOCATIONS dump.
4216         (pass_slp_vectorize::execute): Adjust.
4218 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
4220         PR target/85968
4221         * config/arc/arc.c (arc_return_address_register): Fix
4222         if-condition.
4224 2018-06-15  Richard Biener  <rguenther@suse.de>
4226         PR middle-end/86159
4227         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
4228         leave useless conversion stripping to force_gimple_operand_gsi.
4229         (gimplify_build2): Likewise.
4230         (gimplify_build1): Likewise.
4232 2018-06-15  Richard Biener  <rguenther@suse.de>
4234         PR middle-end/86076
4235         * tree-cfg.c (move_stmt_op): unshare invariant addresses
4236         before adjusting their block.
4238 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4240         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
4241         multilibs for *-*-rtems*.
4242         * config/riscv/t-rtems: New file.
4244 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
4246         PR middle-end/86122
4247         * match.pd ((A +- CST1) +- CST2): Punt if last resort
4248         unsigned_type_for returns NULL.
4250         PR target/85945
4251         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4252         subregs of multi-word pseudos unless the float mode has word size.
4254 2018-06-14  Richard Biener  <rguenther@suse.de>
4256         PR middle-end/86139
4257         * tree-vect-generic.c (build_word_mode_vector_type): Remove
4258         duplicate and harmful type_hash_canon.
4259         * tree.c (type_hash_canon): Assert we didn't find ourselves.
4261 2018-06-14  Richard Biener  <rguenther@suse.de>
4263         PR ipa/86124
4264         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
4265         NULL cgraph_node.
4267 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4269         * config/rtems.h (STDINT_LONG32): Define.
4271 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
4272             Prachi Godbole  <prachi.godbole@imgtec.com>
4274         * config/mips/mips-cpus.def: Define P6600.
4275         * config/mips/mips-tables.opt: Regenerate.
4276         * config/mips/mips.c (mips_ucbranch_type): New enum.
4277         (mips_rtx_cost_data): Add support for P6600.
4278         (mips_issue_rate): Likewise.
4279         (mips_multipass_dfa_lookahead): Likewise.
4280         (mips_avoid_hazard): Likewise.
4281         (mips_reorg_process_insns): Likewise.
4282         (mips_classify_branch_p6600): New function.
4283         * config/mips/mips.h (TUNE_P6600): New define.
4284         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
4285         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
4286         * config/mips/mips.md: Include p6600.md.
4287         (processor): Add p6600.
4288         * config/mips/p6600.md: New file.
4289         * doc/invoke.texi: Add p6600 to supported architectures.
4291 2018-06-13  Martin Sebor  <msebor@redhat.com>
4293         PR tree-optimization/86114
4294         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4295         of integer types.
4296         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4298 2018-06-13  Richard Biener  <rguenther@suse.de>
4300         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4301         Properly set vector type of the intermediate stmt.
4302         * tree-vect-stmts.c (vectorizable_operation): The destination
4303         var always has vectype_out type.
4305 2018-06-13  Jeff Law  <law@redhat.com>
4307         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4308         integer 0 for argument to print_rtl_with_bb.
4309         (rl78_reorg): Likewise.
4311 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
4313         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4314         from rtx to rtx_insn *.
4315         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4316         "label".
4317         (add_sched_insns_for_speculation): Likewise for local "target",
4318         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4319         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4320         from rtx_insn ** to rtx_code_label **.
4321         (reorg_emit_nops): Likewise.
4322         (c6x_reorg): Likewise for local "call_labels".
4323         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4324         rtx to rtx_insn *.
4325         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4326         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4327         the loops over LABEL_REFS.
4328         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4329         braf_label.
4330         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4331         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4332         (split_branches): Strengthen local "olabel" from rtx to
4333         rtx_insn *, adding a safe_as_a cast.
4334         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4335         to "rtx_insn *".
4336         (add_insn_after): Likewise for first two params.
4337         (add_insn_before): Likewise.
4338         (remove_insn): Likewise for param.
4339         (emit_pattern_before_noloc): Likewise for second and third params.
4340         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4341         (emit_call_insn_before_noloc): Likewise.
4342         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4343         to "rtx_insn *".
4344         (emit_barrier_before): Likewise.
4345         (emit_label_before): Strengthen "label" param from "rtx" to
4346         "rtx_code_label *".  Strengthen "before" param from "rtx" to
4347         "rtx_insn *".
4348         (emit_insn_after_1): Strengthen "after" param from "rtx" to
4349         "rtx_insn *".
4350         (emit_pattern_after_noloc): Likewise.
4351         (emit_insn_after_noloc): Likewise.
4352         (emit_jump_insn_after_noloc): Likewise.
4353         (emit_call_insn_after_noloc): Likewise.
4354         (emit_debug_insn_after_noloc): Likewise.
4355         (emit_barrier_after): Likewise.
4356         (emit_label_after): Likewise for both params.
4357         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
4358         "loc" param from "int" to "location_t".
4359         (emit_insn_after_setloc): Likewise.
4360         (emit_jump_insn_after_setloc): Likewise.
4361         (emit_call_insn_after_setloc): Likewise.
4362         (emit_debug_insn_after_setloc): Likewise.
4363         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
4364         "loc" param from "int" to "location_t".
4365         (emit_pattern_before): Convert NULL_RTX to NULL.
4366         (emit_insn_before_setloc): Convert "loc" param from "int" to
4367         "location_t".
4368         (emit_jump_insn_before_setloc): Likewise.
4369         (emit_call_insn_before_setloc): Likewise.
4370         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4371         rtx_insn *.  Convert "loc" param from "int" to "location_t".
4372         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4373         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4374         Convert 3rd param from "int" to "location_t".
4375         (emit_barrier_before, emit_barrier_after, next_real_insn):
4376         Strengthen param from rtx to rtx_insn *.
4377         (emit_label_before): Strengthen 1st param from "rtx" to
4378         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
4379         "rtx_insn *".
4380         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4381         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4382         Strengthen 2nd param from "rtx" to "rtx_insn *".
4383         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4384         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4385         Likewise. Convert 3rd param from "int" to "location_t".
4386         (emit_label_after): Strengthen 1st param from "rtx" to
4387         "rtx_code_label *".
4388         (next_real_insn, remove_insn): Strengthen param from "rtx" to
4389         "rtx_insn *".
4390         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4391         from "rtx" to "rtx_insn *".
4393 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
4395         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4396         bodies streamed in with -Q.
4397         * dumpfile.c (dump_files): Add lto-stream-out dump file.
4398         * dumpfile.h (tree_dump_index): Add lto_stream_out.
4399         * gimple-streamer-out.c: Include gimple-pretty-print.h
4400         (output_bb): Dump stmts streamed.
4401         * lto-section-out.c: Include print-tree.h
4402         (lto_begin_section): Dump sections created.
4403         (lto_output_decl_index): Dump decl encoded.
4404         * lto-streamer-out.c: Include print-tree.h
4405         (create_output_block): Dump output block created.
4406         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4407         (output_function): Dump function output.
4408         (output_constructor): Dump constructor streamed.
4409         (write_global_stream): Output indexes encoded.
4410         (produce_asm_for_decls): Dump streams encoded.
4411         * lto-streamer.c (streamer_dump_file): New global var.
4412         * lto-streamer.h (streamer_dump_file): Declare.
4413         * passes.c (ipa_write_summaries): Initialize streamer dump.
4414         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4415         in.
4417 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
4419         PR target/86048
4420         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4421         offsets for register save directives.  Emit a second batch of save
4422         directives, if need be, when the function accesses prior frames.
4424 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4426         * config/arc/fpu.md (fmasf4): Force operand to register.
4427         (fnmasf4): Likewise.
4429 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4431         * config/arc/arc-protos.h (arc_pad_return): Remove.
4432         * config/arc/arc.c (machine_function): Remove force_short_suffix
4433         and size_reason.
4434         (arc_print_operand): Adjust printing of '&'.
4435         (arc_verify_short): Remove conditional printing of short suffix.
4436         (arc_final_prescan_insn): Remove reference to size_reason.
4437         (pad_return): New function.
4438         (arc_reorg): Call pad_return.
4439         (arc_pad_return): Remove.
4440         (arc_init_machine_status): Remove reference to force_short_suffix.
4441         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4442         (attr length): When attribute iscompact is true force to 2
4443         regardless; in the case of maybe check if we want to force the
4444         instruction to have 4 bytes length.
4445         (nopv): Change it to generate 4 byte long nop as well.
4446         (blockage): New pattern.
4447         (simple_return): Remove call to arc_pad_return.
4448         (p_return_i): Likewise.
4450 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4452         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4454 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4456         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4457         ARC cores.
4459 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4461         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4462         for ARC700 and ARCv2.
4464 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
4466         PR target/86076
4467         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4468         operands[2] instead of operands[1].
4471 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
4473         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4474         case, check whether the outer register overlaps an unallocatable
4475         register, not just whether it fits the required class.
4477 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
4479         * poly-int.h (can_div_trunc_p): Add new overload in which all values
4480         are poly_ints.
4481         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4482         (memrefs_conflict_p): Likewise.
4483         (init_alias_analysis): Likewise.
4484         * cfgexpand.c (expand_debug_expr): Likewise.
4485         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4486         * cse.c (fold_rtx): Likewise.
4487         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4488         * expr.c (emit_block_move_hints): Likewise.
4489         (clear_storage_hints, push_block, emit_push_insn): Likewise.
4490         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4491         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4492         (emit_group_store): Likewise.
4493         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
4494         to read the PRE/POST_MODIFY increment.
4495         * calls.c (store_one_arg): Use strip_offset.
4496         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4497         poly_int_rtx_p.
4498         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4499         by a VEC_SELECT.
4500         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4501         (simplify_binary_operation_1): Extend CONST_INT handling to
4502         poly_int_rtx_p.
4503         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4504         than a HOST_WIDE_INT.
4505         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4506         poly_int64.
4507         (adjust_mems, add_stores): Update accodingly.
4508         (vt_canonicalize_addr): Track polynomial offsets.
4509         (emit_note_insn_var_location): Likewise.
4510         (vt_add_function_parameter): Likewise.
4511         (vt_initialize): Likewise.
4513 2018-06-12  Jeff Law  <law@redhat.com>
4515         * config.gcc (alpha*-*-freebsd*): Remove.
4516         * config/alpha/freebsd.h: Remove.
4518 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
4520         PR other/69968
4521         * spellcheck-tree.c (levenshtein_distance): Rename to...
4522         (get_edit_distance): ...this, and update for underlying renaming.
4523         * spellcheck-tree.h (levenshtein_distance): Rename to...
4524         (get_edit_distance): ...this.
4525         * spellcheck.c (levenshtein_distance): Rename to...
4526         (get_edit_distance): ...this.  Convert from Levenshtein distance
4527         to Damerau-Levenshtein distance by supporting transpositions of
4528         adjacent characters.  Rename "v1" to "v_next" and "v0" to
4529         "v_one_ago".
4530         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4531         (selftest::test_edit_distance_unit_test_oneway): ...this, and
4532         update for underlying renaming.
4533         (selftest::levenshtein_distance_unit_test): Rename to...
4534         (selftest::test_get_edit_distance_unit): ...this, and update for
4535         underlying renaming.
4536         (selftest::test_find_closest_string): Add example from PR 69968
4537         where transposition helps
4538         (selftest::test_metric_conditions): Update for renaming.
4539         (selftest::test_metric_conditions): Likewise.
4540         (selftest::spellcheck_c_tests): Likewise.
4541         * spellcheck.h (levenshtein_distance): Rename both overloads to...
4542         (get_edit_distance): ...this.
4543         (best_match::consider): Update for renaming.
4545 2018-06-12  Martin Sebor  <msebor@redhat.com>
4547         PR tree-optimization/85259
4548         * builtins.c (compute_objsize): Handle constant offsets.
4549         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4550         true iff a warning has been issued.
4551         * gimple.h (gimple_nonartificial_location): New function.
4552         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4553         gimple_nonartificial_location and handle -Wno-system-headers.
4554         (handle_builtin_stxncpy): Same.
4556 2018-06-12  Martin Sebor  <msebor@redhat.com>
4558         PR c/85931
4559         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4561 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
4563         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4564         BUILTIN_VEC_XST entries for pointer to double and long long.
4566 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
4568         PR target/85990
4569         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4570         Update comments.
4571         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4572         Likewise.
4574 2018-06-12  Martin Liska  <mliska@suse.cz>
4576         * doc/options.texi: Document IntegerRange.
4578 2018-06-12  Martin Liska  <mliska@suse.cz>
4580         * config/i386/i386.opt: Make MPX-related options as Deprecated.
4581         * opt-functions.awk: Handle Deprecated flag.
4582         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4583         and report error.
4584         (read_cmdline_option): Report warning for a deprecated option.
4585         * opts.h (struct cl_option): Add new field cl_deprecated.
4586         (CL_ERR_DEPRECATED): New.
4588 2018-06-12  Martin Liska  <mliska@suse.cz>
4590         * doc/options.texi: Document Deprecated option flag.
4592 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4594         * config/arc/arc-arch.h (arc_extras): New enum.
4595         (arc_cpu_t):Add field extra.
4596         (arc_cpu_types): Consider the extras.
4597         * config/arc/arc-cpus.def: Add extras info.
4598         * config/arc/arc-opts.h (processor_type): Consider extra field.
4599         * config/arc/arc.c (arc_override_options): Handle extra field.
4601 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4603         * config/arc/arc-arch.h: Update ARC_OPTX macro.
4604         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4605         field.
4606         * config/arc/arc.c (arc_init): Update pic warning.
4607         (irq_range): Update irq range parsing warnings.
4608         (arc_override_options): Update various warning messages.
4609         (arc_handle_aux_attribute): Likewise.
4611 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
4613         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4615 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4617         * doc/sourcebuild.texi: Document usage of line number 0 in verify
4618         compiler messages directives.
4620 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
4622         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4623         * config/mips/mips-tables.opt: Regenerate.
4624         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4625         mips64r6.
4626         * doc/invoke.texi: Document -march=i6500.
4628 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
4630         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4631         (i6400_gpmul): Add cpu_unit.
4632         (i6400_gpdiv): Likewise.
4633         (i6400_msa_add_d): Update reservations.
4634         (i6400_msa_int_add) Likewise.
4635         (i6400_msa_short_logic3) Likewise.
4636         (i6400_msa_short_logic2) Likewise.
4637         (i6400_msa_short_logic) Likewise.
4638         (i6400_msa_move) Likewise.
4639         (i6400_msa_cmp) Likewise.
4640         (i6400_msa_short_float2) Likewise.
4641         (i6400_msa_div_d) Likewise.
4642         (i6400_msa_long_logic1) Likewise.
4643         (i6400_msa_long_logic2) Likewise.
4644         (i6400_msa_mult) Likewise.
4645         (i6400_msa_long_float2) Likewise.
4646         (i6400_msa_long_float4) Likewise.
4647         (i6400_msa_long_float5) Likewise.
4648         (i6400_msa_long_float8) Likewise.
4649         (i6400_fpu_fadd): Include frint type.
4650         (i6400_fpu_store): New define_insn_reservation.
4651         (i6400_fpu_load): Likewise.
4652         (i6400_fpu_move): Likewise.
4653         (i6400_fpu_fcmp): Likewise.
4654         (i6400_fpu_fmadd): Likewise.
4655         (i6400_int_mult): Include imul3nc type and update reservation.
4656         (i6400_int_div): Include idiv3 type and update reservation.
4657         (i6400_int_load): Update to check type not move_type.
4658         (i6400_int_store): Likewise.
4659         (i6400_int_prefetch): Set zero latency.
4661 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
4663         * gcc.c: Document new %@{...} sequence.
4664         (LINK_COMMAND_SPEC): Use it for the -L switches.
4665         (cpp_unique_options): Use it for the -I switches.
4666         (at_file_argbuf): New global variable.
4667         (in_at_file): Likewise.
4668         (alloc_args): Create at_file_argbuf.
4669         (clear_args): Truncate at_file_argbuf.
4670         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4671         (open_at_file): New function.
4672         (close_at_file): Likewise.
4673         (create_at_file): Delete.
4674         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4675         <'o'>: Likewise.
4676         <'@'>: New case.
4677         (validate_switches_from_spec): Deal with %@{...} sequence.
4678         (validate_switches): Likewise.
4679         (driver::finalize): Call clear_args.
4681 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
4683         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4685 2018-06-11  Martin Sebor  <msebor@redhat.com>
4687         * doc/invoke.texi (-Wall): List -Wc++17-compat.
4688         (Wno-class-memaccess): Add @opindex.
4689         (Wno-templates, Wno-multiple-inheritance): Same.
4690         (Wno-virtual-inheritance, Wno-namespaces): Same.
4691         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4692         (Wno-format-overflow, Wno-format-truncation): Same.
4693         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4694         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4695         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4696         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4697         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4698         (Wno-misspelled-isr): Same.
4700 2018-06-11  Martin Sebor  <msebor@redhat.com>
4702         * PR tree-optimization/86083
4703         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4705 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4707         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4709 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
4711         PR target/85755
4712         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4713         on the correct operand.
4714         (*movdi_internal64): Ditto.
4716 2018-06-11  Martin Liska  <mliska@suse.cz>
4718         PR tree-optimization/86089
4719         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4721 2018-06-11  Julia Koval  <julia.koval@intel.com>
4723         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4724         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4725         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4727 2018-06-11  Olivier Hainque  <hainque@adacore.com>
4729         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4730         for Ada with strict dwarf2.
4732 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
4734         PR target/85755
4735         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4736         addresses.
4738 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
4740         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4742 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
4744         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4745         TARGET_ELF.
4747 2018-06-08  Martin Liska  <mliska@suse.cz>
4749         * tree-cfg.h (debug_function): Fix argument type to match
4750         implementation.
4752 2018-06-08  Martin Liska  <mliska@suse.cz>
4754         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4755         Remove usage of MPX-related (and removed) fields.
4756         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4758 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
4760         * cfg.c (debug): Use TDF_NONE rather than 0.
4761         * cfghooks.c (debug): Likewise.
4762         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4763         (struct dump_option_value_info): Convert to...
4764         (struct kv_pair): ...this template type.
4765         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4766         rather than 0.
4767         (optinfo_verbosity_options): Likewise.
4768         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4769         OPTGROUP_NONE.
4770         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4771         than int for "optgroup_flags" param.
4772         (dump_generic_expr_loc): Use dump_flags_t rather than int for
4773         "dump_kind" param.
4774         (dump_dec): Likewise.
4775         (dump_finish): Use TDF_NONE rather than 0.
4776         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4777         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
4778         than 0.  Update for change to option_ptr.
4779         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4780         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
4781         0.  Update for changes to optinfo_verbosity_options and
4782         optgroup_options.
4783         (opt_info_switch_p): Convert optgroup_flags from int to
4784         optgroup_flags_t.
4785         (dump_basic_block): Use dump_flags_t rather than int
4786         for "dump_kind" param.
4787         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4788         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4789         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4790         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4791         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4792         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4793         TDF_NONE): Convert from macros to...
4794         (enum dump_flag): ...this new enum.
4795         (dump_flags_t): Update to use enum.
4796         (operator|, operator&, operator~, operator|=, operator&=):
4797         Implement for dump_flags_t.
4798         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4799         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4800         Convert from macros to...
4801         (enum optgroup_flag): ...this new enum.
4802         (optgroup_flags_t): New typedef.
4803         (operator|, operator|=): Implement for optgroup_flags_t.
4804         (struct dump_file_info): Convert field "alt_flags" to
4805         dump_flags_t.  Convert field "optgroup_flags" to
4806         optgroup_flags_t.
4807         (dump_basic_block): Use dump_flags_t rather than int for param.
4808         (dump_generic_expr_loc): Likewise.
4809         (dump_dec): Likewise.
4810         (dump_register): Convert param "optgroup_flags" to
4811         optgroup_flags_t.
4812         (opt_info_enable_passes): Likewise.
4813         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4814         than 0.
4815         * gimple-pretty-print.c (debug): Likewise.
4816         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4817         (merged_store_group::apply_stores): Likewise.
4818         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4819         * gimple.c (verify_gimple_pp): Likewise.
4820         * graphite-poly.c (print_pbb_body): Likewise.
4821         * passes.c (pass_manager::register_one_dump_file): Convert
4822         local "optgroup_flags" to optgroup_flags_t.
4823         * print-tree.c (print_node): Use TDF_NONE rather than 0.
4824         (debug): Likewise.
4825         (debug_body): Likewise.
4826         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4827         to optgroup_flags_t.
4828         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4829         than 0.
4830         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4831         (convert_mult_to_fma): Likewise.
4832         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4833         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4834         * tree-vect-data-refs.c (dump_lower_bound): Convert param
4835         "dump_kind" to dump_flags_t.
4837 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4839         * config/rs6000/rs6000.c (min, max): Delete.
4841 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4843         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4844         -mabi=spe and -mabi=no-spe.
4846 2018-06-08  Martin Liska  <mliska@suse.cz>
4848         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4849         where we expect an existing summary.
4851 2018-06-08  Martin Liska  <mliska@suse.cz>
4853         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4854         * ipa-inline.h (estimate_edge_growth): Likewise.
4856 2018-06-08  Martin Liska  <mliska@suse.cz>
4858         * cgraph.c (function_version_hasher::hash): Use
4859         cgraph_node::get_uid ().
4860         (function_version_hasher::equal):
4861         * cgraph.h (cgraph_node::get_uid): New method.
4862         * ipa-inline.c (update_caller_keys): Use
4863         cgraph_node::get_uid ().
4864         (update_callee_keys): Likewise.
4865         * ipa-utils.c (searchc): Likewise.
4866         (ipa_reduced_postorder): Likewise.
4867         * lto-cgraph.c (input_node): Likewise.
4868         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4869         * symbol-summary.h (symtab_insertion): Likewise.
4870         (symtab_removal): Likewise.
4871         (symtab_duplication): Likewise.
4872         * tree-pretty-print.c (dump_function_header): Likewise.
4873         * tree-sra.c (convert_callers_for_node): Likewise.
4875 2018-06-08  Martin Liska  <mliska@suse.cz>
4877         * cgraph.c (symbol_table::create_edge): Always assign a new
4878         unique number.
4879         (symbol_table::free_edge): Do not recycle numbers.
4880         * cgraph.h (cgraph_edge::get): New method.
4881         * symbol-summary.h (symtab_removal): Use it.
4882         (symtab_duplication): Likewise.
4883         (call_summary::hashable_uid): Remove.
4885 2018-06-08  Martin Liska  <mliska@suse.cz>
4887         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4888         (initialize_growth_caches): Remove.
4889         (free_growth_caches): Likewise.
4890         (do_estimate_edge_time): Use edge_growth_cache.
4891         (do_estimate_edge_size): Likewise.
4892         (do_estimate_edge_hints): Likewise.
4893         * ipa-inline.c (reset_edge_caches): Likewise.
4894         (recursive_inlining): Likewise.
4895         (inline_small_functions): Likewise.
4896         * ipa-inline.h (initialize_growth_caches): Remove.
4897         (estimate_edge_size): Likewise.
4898         (estimate_edge_time): Likewise.
4899         (estimate_edge_hints): Likewise.
4900         (reset_edge_growth_cache): Likewise.
4901         * symbol-summary.h (call_summary::remove): New method.
4903 2018-06-08  Martin Liska  <mliska@suse.cz>
4905         * ipa-cp.c (class edge_clone_summary): New summary.
4906         (grow_edge_clone_vectors): Remove.
4907         (ipcp_edge_duplication_hook): Remove.
4908         (class edge_clone_summary_t): New call_summary class.
4909         (ipcp_edge_removal_hook): Remove.
4910         (edge_clone_summary_t::duplicate): New function.
4911         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4912         (create_specialized_node): Likewise.
4913         (ipcp_driver): Initialize edge_clone_summaries and do not
4914         register hooks.
4916 2018-06-08  Martin Liska  <mliska@suse.cz>
4918         * symbol-summary.h (get): New function.
4919         (call_summary::m_initialize_when_cloning): New class member.
4921 2018-06-08  Martin Liska  <mliska@suse.cz>
4923         * cgraph.c (cgraph_node::remove): Do not recycle uid.
4924         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4925         (symbol_table::allocate_cgraph_symbol): Do not set uid.
4926         * passes.c (uid_hash_t): Record removed_nodes by their uids.
4927         (remove_cgraph_node_from_order): Use the removed_nodes set.
4928         (do_per_function_toporder): Likwise.
4929         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4930         instead of summary_uid.
4931         (symtab_removal): Likewise.
4932         (symtab_duplication): Likewise.
4934 2018-06-08  Martin Liska  <mliska@suse.cz>
4936         * ipa-cp.c (ipcp_store_bits_results): Use
4937         ipcp_transformation_sum.
4938         (ipcp_store_vr_results): Likewise.
4939         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4940         to ...
4941         (ipcp_transformation_initialize): ... this.
4942         (ipa_set_node_agg_value_chain):
4943         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4944         (write_ipcp_transformation_info): Likewise.
4945         (read_ipcp_transformation_info): Likewise.
4946         (ipcp_update_bits): Likewise.
4947         (ipcp_update_vr): Likewise.
4948         (ipcp_transform_function): Likewise.
4949         * ipa-prop.h: Rename ipcp_transformation_summary to
4950         ipcp_transformation.
4951         (class ipcp_transformation_t): New function summary.
4952         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4953         (ipa_get_agg_replacements_for_node): Likewise.
4955 2018-06-08  Martin Liska  <mliska@suse.cz>
4957         * ipa-pure-const.c (struct funct_state_d): Do it class instead
4958         of struct.
4959         (class funct_state_summary_t): New function_summary class.
4960         (has_function_state): Remove.
4961         (get_function_state): Likewise.
4962         (set_function_state): Likewise.
4963         (add_new_function): Likewise.
4964         (funct_state_summary_t::insert): New function.
4965         (duplicate_node_data): Remove.
4966         (remove_node_data): Remove.
4967         (funct_state_summary_t::duplicate): New function.
4968         (register_hooks): Create new funct_state_summaries.
4969         (pure_const_generate_summary): Use it.
4970         (pure_const_write_summary): Likewise.
4971         (pure_const_read_summary): Likewise.
4972         (propagate_pure_const): Likewise.
4973         (propagate_nothrow): Likewise.
4974         (dump_malloc_lattice): Likewise.
4975         (propagate_malloc): Likewise.
4976         (execute): Do not register hooks, just remove summary
4977         instead.
4978         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4979         constructor.
4981 2018-06-08  Martin Liska  <mliska@suse.cz>
4983         * ipa-reference.c (remove_node_data): Remove.
4984         (duplicate_node_data): Likewise.
4985         (class ipa_ref_var_info_summary_t): New class.
4986         (class ipa_ref_opt_summary_t): Likewise.
4987         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4988         (get_reference_optimization_summary): Use
4989         ipa_ref_opt_sum_summaries.
4990         (set_reference_vars_info): Remove.
4991         (set_reference_optimization_summary): Likewise.
4992         (ipa_init): Create summaries.
4993         (init_function_info): Use function summary.
4994         (ipa_ref_opt_summary_t::duplicate): New function.
4995         (ipa_ref_opt_summary_t::remove): New function.
4996         (get_read_write_all_from_node): Fix GNU coding style.
4997         (propagate): Use function summary.
4998         (write_node_summary_p): Fix GNU coding style.
4999         (stream_out_bitmap): Likewise.
5000         (ipa_reference_read_optimization_summary): Use function summary.
5001         (ipa_reference_c_finalize): Do not release hooks.
5003 2018-06-08  Martin Liska  <mliska@suse.cz>
5005         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5006         (analyze_function_body): Extract multiple calls of get_create.
5007         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5008         * ipa-inline.c (recursive_inlining): Use ::get method.
5009         * ipa-inline.h (estimate_edge_growth): Likewise.
5011 2018-06-08  Martin Liska  <mliska@suse.cz>
5013         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5014         HSA_INVALID.
5015         (hsa_function_summary::hsa_function_summary): Use the new enum
5016         value.
5017         (hsa_gpu_implementation_p): Use hsa_summaries::get.
5018         * hsa-gen.c (hsa_get_host_function): Likewise.
5019         (get_brig_function_name): Likewise.
5020         * ipa-hsa.c (process_hsa_functions): Likewise.
5021         (ipa_hsa_write_summary): Likewise.
5022         * symbol-summary.h (symtab_duplication): Use ::get function/
5023         (get): New function.
5025 2018-06-08  Martin Liska  <mliska@suse.cz>
5027         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5028         of get.
5029         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5030         (hsa_register_kernel): Likewise.
5031         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5032         * hsa-gen.c (hsa_get_host_function): Likewise.
5033         (get_brig_function_name): Likewise.
5034         (generate_hsa): Likewise.
5035         (pass_gen_hsail::execute): Likewise.
5036         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5037         (devirtualization_time_bonus): Likewise.
5038         (ipcp_propagate_stage): Likewise.
5039         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5040         (edge_set_predicate): Likewise.
5041         (evaluate_conditions_for_known_args): Likewise.
5042         (evaluate_properties_for_edge): Likewise.
5043         (ipa_fn_summary::reset): Likewise.
5044         (ipa_fn_summary_t::duplicate): Likewise.
5045         (dump_ipa_call_summary): Likewise.
5046         (ipa_dump_fn_summary): Likewise.
5047         (analyze_function_body): Likewise.
5048         (compute_fn_summary): Likewise.
5049         (estimate_edge_devirt_benefit): Likewise.
5050         (estimate_edge_size_and_time): Likewise.
5051         (estimate_calls_size_and_time): Likewise.
5052         (estimate_node_size_and_time): Likewise.
5053         (inline_update_callee_summaries): Likewise.
5054         (remap_edge_change_prob): Likewise.
5055         (remap_edge_summaries): Likewise.
5056         (ipa_merge_fn_summary_after_inlining): Likewise.
5057         (ipa_update_overall_fn_summary): Likewise.
5058         (read_ipa_call_summary): Likewise.
5059         (inline_read_section): Likewise.
5060         (write_ipa_call_summary): Likewise.
5061         (ipa_fn_summary_write): Likewise.
5062         (ipa_free_fn_summary): Likewise.
5063         * ipa-hsa.c (process_hsa_functions): Likewise.
5064         (ipa_hsa_write_summary): Likewise.
5065         (ipa_hsa_read_section): Likewise.
5066         * ipa-icf.c (sem_function::merge): Likewise.
5067         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5068         (do_estimate_edge_time): Likewise.
5069         (estimate_size_after_inlining): Likewise.
5070         (estimate_growth): Likewise.
5071         (growth_likely_positive): Likewise.
5072         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5073         (inline_call): Likewise.
5074         * ipa-inline.c (caller_growth_limits): Likewise.
5075         (can_inline_edge_p): Likewise.
5076         (can_inline_edge_by_limits_p): Likewise.
5077         (compute_uninlined_call_time): Likewise.
5078         (compute_inlined_call_time): Likewise.
5079         (want_inline_small_function_p): Likewise.
5080         (edge_badness): Likewise.
5081         (update_caller_keys): Likewise.
5082         (update_callee_keys): Likewise.
5083         (recursive_inlining): Likewise.
5084         (inline_small_functions): Likewise.
5085         (inline_to_all_callers_1): Likewise.
5086         (dump_overall_stats): Likewise.
5087         (early_inline_small_functions): Likewise.
5088         (early_inliner): Likewise.
5089         * ipa-inline.h (estimate_edge_growth): Likewise.
5090         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5091         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5092         * ipa-prop.h (IPA_NODE_REF): Likewise.
5093         (IPA_EDGE_REF): Likewise.
5094         * ipa-pure-const.c (malloc_candidate_p): Likewise.
5095         (propagate_malloc): Likewise.
5096         * ipa-split.c (execute_split_functions): Likewise.
5097         * symbol-summary.h: Rename get to get_create.
5098         (get): Likewise.
5099         (get_create): Likewise.
5100         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5102 2018-06-08  Martin Liska  <mliska@suse.cz>
5104         * symbol-summary.h (release): Move definition out of class
5105         declaration.
5106         (symtab_removal): Likewise.
5107         (symtab_duplication): Likewise.
5109 2018-06-08  Martin Liska  <mliska@suse.cz>
5111         * symbol-summary.h (function_summary): Move constructor
5112         implementation out of class declaration.
5113         (release): Likewise.
5114         (symtab_insertion): Likewise.
5115         (symtab_removal): Likewise.
5116         (symtab_duplication): Likewise.
5117         (get): Likewise.
5119 2018-06-08  Martin Liska  <mliska@suse.cz>
5121         * Makefile.in: Remove support for MPX (macros, related functions,
5122         fields in cgraph_node, ...).
5123         * builtin-types.def (BT_BND): Likewise.
5124         (BT_FN_BND_CONST_PTR): Likewise.
5125         (BT_FN_CONST_PTR_BND): Likewise.
5126         (BT_FN_VOID_PTR_BND): Likewise.
5127         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5128         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5129         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5130         (expand_builtin_mempcpy_with_bounds): Likewise.
5131         (expand_builtin_memset_with_bounds): Likewise.
5132         (expand_builtin_memset_args): Likewise.
5133         (std_expand_builtin_va_start): Likewise.
5134         (expand_builtin): Likewise.
5135         (expand_builtin_with_bounds): Likewise.
5136         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5137         (DEF_LIB_BUILTIN_CHKP): Likewise.
5138         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5139         (DEF_CHKP_BUILTIN): Likewise.
5140         (BUILT_IN_MEMCPY): Likewise.
5141         (BUILT_IN_MEMMOVE): Likewise.
5142         (BUILT_IN_MEMPCPY): Likewise.
5143         (BUILT_IN_MEMSET): Likewise.
5144         (BUILT_IN_STPCPY): Likewise.
5145         (BUILT_IN_STRCAT): Likewise.
5146         (BUILT_IN_STRCHR): Likewise.
5147         (BUILT_IN_STRCPY): Likewise.
5148         (BUILT_IN_STRLEN): Likewise.
5149         (BUILT_IN_MEMCPY_CHK): Likewise.
5150         (BUILT_IN_MEMMOVE_CHK): Likewise.
5151         (BUILT_IN_MEMPCPY_CHK): Likewise.
5152         (BUILT_IN_MEMSET_CHK): Likewise.
5153         (BUILT_IN_STPCPY_CHK): Likewise.
5154         (BUILT_IN_STRCAT_CHK): Likewise.
5155         (BUILT_IN_STRCPY_CHK): Likewise.
5156         * calls.c (store_bounds): Likewise.
5157         (emit_call_1): Likewise.
5158         (special_function_p): Likewise.
5159         (maybe_warn_nonstring_arg): Likewise.
5160         (initialize_argument_information): Likewise.
5161         (finalize_must_preallocate): Likewise.
5162         (compute_argument_addresses): Likewise.
5163         (expand_call): Likewise.
5164         * cfgexpand.c (expand_call_stmt): Likewise.
5165         (expand_return): Likewise.
5166         (expand_gimple_stmt_1): Likewise.
5167         (pass_expand::execute): Likewise.
5168         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5169         (cgraph_node::remove): Likewise.
5170         (cgraph_node::dump): Likewise.
5171         (cgraph_node::verify_node): Likewise.
5172         * cgraph.h (chkp_function_instrumented_p): Likewise.
5173         (symtab_node::get_alias_target): Likewise.
5174         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5175         (cgraph_local_p): Likewise.
5176         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5177         (cgraph_edge::rebuild_references): Likewise.
5178         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5179         (walk_polymorphic_call_targets): Likewise.
5180         (cgraph_node::expand_thunk): Likewise.
5181         (symbol_table::output_weakrefs): Likewise.
5182         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5183         (ix86_handle_option): Likewise.
5184         * config/i386/constraints.md: Likewise.
5185         * config/i386/i386-builtin-types.def (BND): Likewise.
5186         (VOID): Likewise.
5187         (PVOID): Likewise.
5188         (ULONG): Likewise.
5189         * config/i386/i386-builtin.def (BDESC_END): Likewise.
5190         (BDESC_FIRST): Likewise.
5191         (BDESC): Likewise.
5192         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5193         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5194         * config/i386/i386.c (enum reg_class): Likewise.
5195         (ix86_target_string): Likewise.
5196         (ix86_option_override_internal): Likewise.
5197         (ix86_conditional_register_usage): Likewise.
5198         (ix86_valid_target_attribute_inner_p): Likewise.
5199         (ix86_set_indirect_branch_type): Likewise.
5200         (ix86_set_current_function): Likewise.
5201         (ix86_function_arg_regno_p): Likewise.
5202         (init_cumulative_args): Likewise.
5203         (ix86_function_arg_advance): Likewise.
5204         (ix86_function_arg): Likewise.
5205         (ix86_pass_by_reference): Likewise.
5206         (ix86_function_value_regno_p): Likewise.
5207         (ix86_function_value_1): Likewise.
5208         (ix86_function_value_bounds): Likewise.
5209         (ix86_return_in_memory): Likewise.
5210         (ix86_setup_incoming_vararg_bounds): Likewise.
5211         (ix86_va_start): Likewise.
5212         (indirect_thunk_need_prefix): Likewise.
5213         (print_reg): Likewise.
5214         (ix86_print_operand): Likewise.
5215         (ix86_expand_call): Likewise.
5216         (ix86_output_function_return): Likewise.
5217         (reg_encoded_number): Likewise.
5218         (BDESC_VERIFYS): Likewise.
5219         (ix86_init_mpx_builtins): Likewise.
5220         (ix86_init_builtins): Likewise.
5221         (ix86_emit_cmove): Likewise.
5222         (ix86_emit_move_max): Likewise.
5223         (ix86_expand_builtin): Likewise.
5224         (ix86_builtin_mpx_function): Likewise.
5225         (ix86_get_arg_address_for_bt): Likewise.
5226         (ix86_load_bounds): Likewise.
5227         (ix86_store_bounds): Likewise.
5228         (ix86_load_returned_bounds): Likewise.
5229         (ix86_store_returned_bounds): Likewise.
5230         (ix86_class_likely_spilled_p): Likewise.
5231         (ix86_hard_regno_mode_ok): Likewise.
5232         (x86_order_regs_for_local_alloc): Likewise.
5233         (ix86_mitigate_rop): Likewise.
5234         (ix86_bnd_prefixed_insn_p): Likewise.
5235         (ix86_mpx_bound_mode): Likewise.
5236         (ix86_make_bounds_constant): Likewise.
5237         (ix86_initialize_bounds): Likewise.
5238         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
5239         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
5240         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
5241         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
5242         (TARGET_CHKP_BOUND_MODE): Likewise.
5243         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
5244         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
5245         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
5246         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
5247         * config/i386/i386.h (TARGET_MPX): Likewise.
5248         (TARGET_MPX_P): Likewise.
5249         (VALID_BND_REG_MODE): Likewise.
5250         (FIRST_BND_REG): Likewise.
5251         (LAST_BND_REG): Likewise.
5252         (enum reg_class): Likewise.
5253         (BND_REG_P): Likewise.
5254         (BND_REGNO_P): Likewise.
5255         (BNDmode): Likewise.
5256         (ADJUST_INSN_LENGTH): Likewise.
5257         * config/i386/i386.md: Likewise.
5258         * config/i386/i386.opt: Likewise.
5259         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
5260         (defined): Likewise.
5261         (LINK_MPX): Likewise.
5262         (MPX_SPEC): Likewise.
5263         (LIBMPX_SPEC): Likewise.
5264         (LIBMPXWRAPPERS_SPEC): Likewise.
5265         (CHKP_SPEC): Likewise.
5266         * config/i386/predicates.md: Likewise.
5267         * dbxout.c (dbxout_type): Likewise.
5268         * doc/extend.texi: Likewise.
5269         * doc/invoke.texi: Likewise.
5270         * doc/md.texi: Likewise.
5271         * doc/tm.texi: Likewise.
5272         * doc/tm.texi.in: Likewise.
5273         * dwarf2out.c (is_base_type): Likewise.
5274         (gen_formal_types_die): Likewise.
5275         (gen_subprogram_die): Likewise.
5276         (gen_type_die_with_usage): Likewise.
5277         (gen_decl_die): Likewise.
5278         (dwarf2out_late_global_decl): Likewise.
5279         * expr.c (expand_assignment): Likewise.
5280         (emit_storent_insn): Likewise.
5281         (store_expr_with_bounds): Likewise.
5282         (store_expr): Likewise.
5283         (expand_expr_real_1): Likewise.
5284         * expr.h (store_expr_with_bounds): Likewise.
5285         * function.c (use_register_for_decl): Likewise.
5286         (struct bounds_parm_data): Likewise.
5287         (assign_parms_augmented_arg_list): Likewise.
5288         (assign_parm_find_entry_rtl): Likewise.
5289         (assign_parm_is_stack_parm): Likewise.
5290         (assign_parm_load_bounds): Likewise.
5291         (assign_bounds): Likewise.
5292         (assign_parms): Likewise.
5293         (expand_function_start): Likewise.
5294         * gcc.c (CHKP_SPEC): Likewise.
5295         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5296         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5297         (wrestrict_dom_walker::check_call): Likewise.
5298         * gimple.c (gimple_build_call_from_tree): Likewise.
5299         * gimple.h (enum gf_mask): Likewise.
5300         (gimple_call_with_bounds_p): Likewise.
5301         (gimple_call_set_with_bounds): Likewise.
5302         * gimplify.c (gimplify_init_constructor): Likewise.
5303         * ipa-cp.c (initialize_node_lattices): Likewise.
5304         (propagate_constants_across_call): Likewise.
5305         (find_more_scalar_values_for_callers_subset): Likewise.
5306         * ipa-hsa.c (process_hsa_functions): Likewise.
5307         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5308         * ipa-icf.c (sem_function::merge): Likewise.
5309         * ipa-inline.c (early_inliner): Likewise.
5310         * ipa-pure-const.c (warn_function_noreturn): Likewise.
5311         (warn_function_cold): Likewise.
5312         (propagate_pure_const): Likewise.
5313         * ipa-ref.h (enum GTY): Likewise.
5314         * ipa-split.c (find_retbnd): Likewise.
5315         (consider_split): Likewise.
5316         (split_function): Likewise.
5317         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5318         * ipa.c (walk_polymorphic_call_targets): Likewise.
5319         (symbol_table::remove_unreachable_nodes): Likewise.
5320         (process_references): Likewise.
5321         (cgraph_build_static_cdtor_1): Likewise.
5322         * lto-cgraph.c (lto_output_node): Likewise.
5323         (output_refs): Likewise.
5324         (compute_ltrans_boundary): Likewise.
5325         (input_overwrite_node): Likewise.
5326         (input_node): Likewise.
5327         (input_cgraph_1): Likewise.
5328         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5329         * passes.c (pass_manager::execute_early_local_passes): Likewise.
5330         (class pass_chkp_instrumentation_passes): Likewise.
5331         (make_pass_chkp_instrumentation_passes): Likewise.
5332         * passes.def: Likewise.
5333         * rtl.h (struct GTY): Likewise.
5334         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5335         * stor-layout.c (layout_type): Likewise.
5336         * symtab.c: Likewise.
5337         * target.def: Likewise.
5338         * targhooks.c (default_chkp_bound_type): Likewise.
5339         (default_chkp_bound_mode): Likewise.
5340         (default_builtin_chkp_function): Likewise.
5341         (default_chkp_function_value_bounds): Likewise.
5342         (default_chkp_make_bounds_constant): Likewise.
5343         (default_chkp_initialize_bounds): Likewise.
5344         * targhooks.h (default_chkp_bound_type): Likewise.
5345         (default_chkp_bound_mode): Likewise.
5346         (default_builtin_chkp_function): Likewise.
5347         (default_chkp_function_value_bounds): Likewise.
5348         (default_chkp_make_bounds_constant): Likewise.
5349         (default_chkp_initialize_bounds): Likewise.
5350         * toplev.c (compile_file): Likewise.
5351         (process_options): Likewise.
5352         * tree-core.h (DEF_BUILTIN): Likewise.
5353         (DEF_BUILTIN_CHKP): Likewise.
5354         * tree-inline.c (declare_return_variable): Likewise.
5355         (remap_gimple_stmt): Likewise.
5356         (copy_bb): Likewise.
5357         (initialize_inlined_parameters): Likewise.
5358         (expand_call_inline): Likewise.
5359         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5360         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5361         (make_pass_ipa_chkp_produce_thunks): Likewise.
5362         (make_pass_chkp): Likewise.
5363         (make_pass_chkp_opt): Likewise.
5364         (make_pass_chkp_instrumentation_passes): Likewise.
5365         * tree-pretty-print.c (dump_generic_node): Likewise.
5366         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5367         * tree-ssa-dce.c (propagate_necessity): Likewise.
5368         (eliminate_unnecessary_stmts): Likewise.
5369         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5370         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5371         * tree-ssa-sccvn.h: Likewise.
5372         * tree-ssa-strlen.c (get_string_length): Likewise.
5373         (valid_builtin_call): Likewise.
5374         (adjust_last_stmt): Likewise.
5375         (handle_builtin_strchr): Likewise.
5376         (handle_builtin_strcpy): Likewise.
5377         (handle_builtin_stxncpy): Likewise.
5378         (handle_builtin_memcpy): Likewise.
5379         (handle_builtin_strcat): Likewise.
5380         (strlen_check_and_optimize_stmt): Likewise.
5381         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5382         * tree-streamer-in.c: Likewise.
5383         * tree-streamer.c (record_common_node): Likewise.
5384         * tree.c (tree_code_size): Likewise.
5385         (wide_int_to_tree_1): Likewise.
5386         (type_contains_placeholder_1): Likewise.
5387         (build_common_tree_nodes): Likewise.
5388         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5389         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5390         (POINTER_BOUNDS_P): Likewise.
5391         (BOUNDED_TYPE_P): Likewise.
5392         (BOUNDED_P): Likewise.
5393         (CALL_WITH_BOUNDS_P): Likewise.
5394         (pointer_bounds_type_node): Likewise.
5395         * value-prof.c (gimple_ic): Likewise.
5396         * var-tracking.c (vt_add_function_parameters): Likewise.
5397         * varasm.c (make_decl_rtl): Likewise.
5398         (assemble_start_function): Likewise.
5399         (output_constant): Likewise.
5400         (maybe_assemble_visibility): Likewise.
5401         * varpool.c (ctor_for_folding): Likewise.
5402         * chkp-builtins.def: Remove.
5403         * ipa-chkp.c: Remove.
5404         * ipa-chkp.h: Remove.
5405         * rtl-chkp.c: Remove.
5406         * rtl-chkp.h: Remove.
5407         * tree-chkp-opt.c: Remove.
5408         * tree-chkp.c: Remove.
5409         * tree-chkp.h: Remove.
5411 2018-06-07  Carl Love  <cel@us.ibm.com>
5413         * config/rs6000/vsx.md (vextract_fp_from_shorth,
5414         vextract_fp_from_shortl): Add BE support.
5416 2018-06-07  Paul Koning  <ni1d@arrl.net>
5418         * compare-elim.c (try_merge_compare): Don't merge compare if
5419         address contains a side effect.
5420         (try_eliminate_compare): Likewise.
5422 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
5424         * config.gcc: Support "tremont".
5425         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5426         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5427         PROCESSOR_TREMONT.
5428         * config/i386/i386.c (m_TREMONT): Define.
5429         (processor_target_table): Add "tremont".
5430         (PTA_TREMONT): Define.
5431         (ix86_lea_outperforms): Add TARGET_TREMONT.
5432         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5433         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5434         and M_INTEL_GOLDMONT_PLUS.
5435         (fold_builtin_cpu): Add "tremont".
5436         (ix86_add_stmt_cost): Add TARGET_TREMONT.
5437         (ix86_option_override_internal): Add "tremont".
5438         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5439         (processor_type): Add PROCESSOR_TREMONT.
5440         * config/i386/x86-tune.def: Add m_TREMONT.
5441         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5443 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5445         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5446         symbol defined for msp430i* devices to be lower case.
5448 2018-06-07  Richard Biener  <rguenther@suse.de>
5450         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5451         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
5452         Properly wrap signed arithmetic if overflow wraps.
5454 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
5456         PR tree-optimization/69615
5457         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5458         of a cast from a same precision integral SSA_NAME in a bb dominated
5459         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
5460         cast to utype if rhs2 has already a compatible type.
5462 2018-06-07  Richard Biener  <rguenther@suse.de>
5464         PR tree-optimization/85935
5465         * graphite-scop-detection.c (find_params_in_bb): Analyze
5466         condition operands with respect to the correct loop.  Assert
5467         the analysis doesn't fail.
5469 2018-06-04  Carl Love  <cel@us.ibm.com>
5471         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5472         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
5473         as it is slightly cheaper.
5474         (first_match_or_eos_index_<mode>):
5475         Calculate index using natural element order.
5476         (first_match_index_<mode>):
5477         Calculate index using natural element order.
5478         (first_match_or_eos_index_<mode>):
5479         Calculate index using natural order.
5480         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5481         for BE and LE modes.
5482         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5483         P9V_BUILTIN_VCLZLSBB_V16QI.
5484         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5485         specific.
5487 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5489         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5490         indentation and line wrap for many prototypes.  Add missing
5491         @smallexample directives around block of prototypes for vec_xl and
5492         vec_xst.
5494 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
5496         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5497         track if we pass or return IEEE 128-bit floating point.
5498         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5499         C++ mangling that is compatible with GCC 8.1.
5500         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5501         (init_cumulative_args): Note if we pass or return IEEE 128-bit
5502         floating point types.
5503         (rs6000_function_arg_advance_1): Likewise.
5504         (rs6000_mangle_type): Optionally generate mangled names that match
5505         what GCC 8.1 generated for IEEE 128-bit floating point types.
5506         (rs6000_globalize_decl_name): If we have an external function that
5507         passes or returns IEEE 128-bit types, generate a weak reference
5508         from the mangled name used in GCC 8.1 to the current mangled
5509         name.
5510         (rs6000_init_builtins): Make __ibm128 use the long double type if
5511         long double is IBM extended double.  Make __float128 use the long
5512         double type if long double is IEEE 128-bit.
5514         PR target/85657
5515         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5516         macro for __ibm128 built-in functions.
5517         (PACK_IF): Add __ibm128 pack/unpack functions.
5518         (UNPACK_IF): Likewise.
5519         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5520         enable long double built-in functions if long double is IEEE
5521         128-bit floating point.
5522         (rs6000_invalid_builtin): Update long double built-in function
5523         error message.
5524         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5525         functions, adjust the built-in function to use the long double
5526         built-in function if __ibm128 and long double are the same type.
5527         * doc/extend.texi (PowerPC builtins): Update documention for
5528         __builtin_{,un}pack_longdouble.  Add documentation for
5529         __builtin_{,un}pack_ibm128.
5531 2018-06-06  Jim Wilson  <jimw@sifive.com>
5533         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5534         (struct machine_function): New field interrupt_mode.
5535         (riscv_handle_type_attribute): New function.  Add forward declaration.
5536         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5537         (riscv_expand_epilogue): Check interrupt_mode field.
5538         (riscv_set_current_function): Check interrupt attribute args and
5539         set interrupt_mode field.
5540         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5541         (riscv_sret, riscv_uret): New.
5542         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5543         new arguments to interrupt attribute.
5545 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
5547         PR target/63177
5548         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5549         Don't handle -mcpu=power8 if -mpower9-vector is also used.
5551 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5553         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5554         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5555         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5556         several redundant entries.
5558 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
5560         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5561         type from "rtx" to "rtx_insn *".
5562         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5563         for local "call_insn", removing cast.
5564         (ix86_expand_call): Likewise, introducing a "call_insn" local.
5566 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
5568         PR tree-optimization/86066
5569         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5570         for BIT_INSERT_EXPR stores.
5572 2018-06-06  Richard Biener  <rguenther@suse.de>
5574         PR tree-optimization/86062
5575         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5576         component refs ontop
5577         of to be offsetted base.
5579 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5581         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5582         to be static and remove check on interrupt attribute name.
5584 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5586         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5587         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5589 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
5591         PR target/79924
5592         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5593         second argument.
5594         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5595         Remove second argument, change how error is called.
5596         (aarch64_layout_arg): Remove second argument from
5597         aarch64_err_no_fpadvsimd call.
5598         (aarch64_init_cumulative_args): Ditto.
5599         (aarch64_gimplify_va_arg_expr): Ditto.
5600         * config/aarch64/aarch64.md (mov<mode>): Ditto.
5602 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
5604         * config/i386/i386.md (simple_return_indirect_internal): New expander.
5605         (*simple_return_indirect_internal<mode>): Rename from
5606         simple_return_indirect_internal.  Use W mode iterator.
5607         (rstorssp): New expander.
5608         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
5609         (clrssbsy): New expander.
5610         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
5612 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5614         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5615         __typeof__.
5616         (cmse_check_pointed_object): Likewise.
5618 2018-06-05  Martin Liska  <mliska@suse.cz>
5620         PR gcov-profile/47618
5621         * doc/invoke.texi: Document how -fprofile-dir format
5622         is extended.
5624 2018-06-05  Richard Biener  <rguenther@suse.de>
5626         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5627         removal pretend DOM info isn't available so we do not update
5628         it and only remove edges, not dominated blocks.  Actually free
5629         DOM info in case we removed something.  Remove unreachable blocks.
5630         (mfb_keep_latches): Work with either DOM info or marked backedges.
5631         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5632         first.  Mark backedges if DOM info isn't available.
5633         (Re-)compute DOM info after cleanup_control_flow_pre.
5635 2018-06-05  Richard Biener  <rguenther@suse.de>
5637         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5638         (locus_discrim_hasher::hash): Adjust.
5639         (locus_discrim_hasher::equal): Likewise.
5640         (next_discriminator_for_locus): Work on line directly.
5641         (same_line_p): Pass in expanded locus1 as well.
5642         (assign_discriminators): Avoid redundant location expansions.
5644 2018-06-05  Richard Biener  <rguenther@suse.de>
5646         PR tree-optimization/86046
5647         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5648         if required after clearing TREE_ADDRESSABLE.
5650 2018-06-05  Richard Biener  <rguenther@suse.de>
5652         PR tree-optimization/86047
5653         * tree-ssa-loop.c (for_each_index): Glob handling of all
5654         decls and constants and really handle all of them.
5656 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5658         PR target/81497
5659         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5660         qualifier_void_pointer and qualifier_const_void_pointer.
5661         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5662         (arm_init_builtins): Handle the above.
5663         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5664         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5665         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5666         void intrinsics.
5668 2018-06-05  Martin Liska  <mliska@suse.cz>
5670         * auto-profile.c (read_autofdo_file): Do not use
5671         gcov_ctr_summary struct.
5672         (afdo_callsite_hot_enough_for_early_inline): Likewise.
5673         * coverage.c (struct counts_entry): Likewise.
5674         (read_counts_file): Read just single summary entry.
5675         (get_coverage_counts): Use gcov_summary struct.
5676         * coverage.h (get_coverage_counts): Likewise.
5677         * gcov-dump.c (dump_working_sets): Likewise.
5678         (tag_summary): Dump just single summary.
5679         * gcov-io.c (gcov_write_summary): Write just histogram
5680         summary.
5681         (gcov_read_summary): Read just single summary.
5682         (compute_working_sets): Use gcov_summary struct.
5683         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5684         of GCOV_COUNTERS_SUMMABLE.
5685         (GCOV_COUNTERS_SUMMABLE): Remove.
5686         (GCOV_FIRST_VALUE_COUNTER): Replace with
5687         GCOV_COUNTER_V_INTERVAL.
5688         (struct gcov_ctr_summary): Remove.
5689         (struct gcov_summary): Directly use fields of former
5690         gcov_ctr_summary.
5691         (compute_working_sets): Use gcov_summary struct.
5692         * gcov.c (read_count_file): Do not use ctrs fields.
5693         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5694         struct.
5695         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5696         struct.
5697         * profile.c: Likewise.
5698         * profile.h: Likewise.
5700 2018-06-05  Martin Liska  <mliska@suse.cz>
5702         PR gcov-profile/84846
5703         * gcov.c (output_lines): Print working directory only
5704         in intermediate format.
5706 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
5708         * config/s390/s390-builtin-types.def: Add void function type.
5709         * config/s390/s390-builtins.def: Use the function type for the
5710         tbeginc builtin.
5712 2018-06-04  Jim Wilson  <jimw@sifive.com>
5714         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5715         to int.
5716         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5717         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
5718         handle EH_RETURN_DATA_REGNO registers properly.
5719         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5720         (riscv_expand_epilogue): Update comment.  Change argument name and
5721         type.  Update code to use new name and type.  Pass new args to
5722         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
5723         EXCEPTION_RETURN.
5724         * config/riscv/riscv.md (NORMAL_RETURN): New.
5725         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5726         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5727         (eh_return): Call gen_eh_return_internal and emit barrier.
5728         (eh_return_internal): Call riscv_expand_epilogue.
5730 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
5732         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5733         bit_insertion field and declare can_be_merged_into method.
5734         (merged_store_group::can_be_merged_into): New method.
5735         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5736         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
5737         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5739 2018-06-04  Richard Biener  <rguenther@suse.de>
5741         PR tree-optimization/85955
5742         * builtins.c (fold_builtin_sincos): Convert pointers to
5743         destination to appropriate type before dereferencing.
5745 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
5747         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5749 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
5751         * expr.c (expand_expr_real_1): Force the operand into memory if
5752         its TYPE_MODE is BLKmode and if there is no integer mode for
5753         the number of bits being extracted.
5755 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
5757         PR target/85832
5758         PR target/86036
5759         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5760         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5762 2018-06-04  Richard Biener  <rguenther@suse.de>
5764         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5765         (cleanup_tree_cfg_noloop): ... single caller.  Do
5766         start_recording_case_labels later.
5768 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
5770         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5771         to _IMMINTRIN_H_INCLUDED.
5772         * config/i386/pconfigintrin.h: Ditto.
5773         * config/i386/waitpkgintrin.h: Ditto.
5774         * config/i386/immintrin.h: Add includes for sgxintrin.h,
5775         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5776         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5777         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5778         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5779         waitpkgintrin.h and cldemoteintrin.h.
5781 2018-06-04  Richard Biener  <rguenther@suse.de>
5783         PR tree-optimization/86038
5784         * tracer.c (find_best_successor): Check probability for
5785         being initialized, bail out if not.
5787 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
5789         PR target/86003
5790         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5791         of bits to ignore when comparing architectures.
5793 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
5795         PR tree-optimization/69615
5796         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5797         maximum or minimum of the type, try to merge it also as if
5798         range1 is + [-, x - 1] or + [x + 1, -].
5800         PR c++/86025
5801         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5803 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
5805         PR tree-optimization/86034
5806         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5807         the unsigned bitfield type in a bit insertion sequence if it does not
5808         have a larger precision than the bitfield size.
5809         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5811 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
5813         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5815 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5817         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5818         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5819         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5820         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5822 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5824         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5825         Disable -fdelete-null-pointer-checks for ELF toolchain.
5827 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5828             Kito Cheng  <kito.cheng@gmail.com>
5830         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5831         (nds32le-*-*, nds32be-*-*): Integrate checking process.
5832         (nds32*-*-*): Add glibc and uclibc conditions.
5833         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5834         (TARGET_EXCEPT_UNWIND_INFO): Define.
5835         * config/nds32/elf.h: New file.
5836         * config/nds32/linux.h: New file.
5837         * config/nds32/nds32-elf.opt: New file.
5838         * config/nds32/nds32-linux.opt: New file.
5839         * config/nds32/nds32-fp-as-gp.c
5840         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5841         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5842         TARGET_LINUX_ABI.
5843         (nds32_asm_file_end): Ditto.
5844         (nds32_print_operand): Ditto.
5845         (nds32_insert_attributes): Ditto.
5846         (nds32_init_libfuncs): New function.
5847         (TARGET_HAVE_TLS): Define.
5848         (TARGET_INIT_LIBFUNCS): Define.
5849         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5850         spec content.
5851         (TARGET_ELF): Apply different mcmodel setting.
5852         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5853         been migrated into elf.h and linux.h files.
5854         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5855         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5856         (mcmodel): The content has been migrated into nds32-elf.opt and
5857         nds32-linux.opt files.
5858         * config/nds32/t-elf: New file.
5859         * config/nds32/t-linux: New file.
5861 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5862             Shiva Chen  <shiva0217@gmail.com>
5864         * config/nds32/constants.md (unspec_volatile_element): Add
5865         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5866         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5867         optimization.
5868         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5869         (make_pass_nds32_fp_as_gp): Declare.
5870         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5871         optmization pass.
5872         (nds32_asm_function_end_prologue): Remove unused asm output.
5873         (nds32_asm_function_begin_epilogue): Remove unused asm output.
5874         (nds32_asm_file_start): Output necessary fp_as_gp information.
5875         (nds32_option_override): Adjust register usage.
5876         (nds32_expand_prologue): Consider fp_as_gp situation.
5877         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5878         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5879         (epilogue): Ditto.
5880         (return): Ditto.
5881         (simple_return): Ditto.
5882         (omit_fp_begin): Output special directive for fp_as_gp.
5883         (omit_fp_end): Output special directive for fp_as_gp.
5884         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5885         mforbid-fp-as-gp): New options.
5887 2018-06-01  Mark Wielaard  <mark@klomp.org>
5889         * dwarf2out.c (dwarf2out_finish): Remove generation of
5890         DW_AT_loclists_base.
5892 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5894         * gimple-ssa-store-merging.c: Include gimple-fold.h.
5895         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5896         (struct merged_store_group): Add bit_insertion field.
5897         (dump_char_array): Use standard hexadecimal format.
5898         (merged_store_group::merged_store_group): Set bit_insertion to false.
5899         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
5900         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
5901         also print the mask in the dump file.
5902         (pass_store_merging::gate): Minor tweak.
5903         (imm_store_chain_info::coalesce_immediate): Fix wrong association
5904         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
5905         stores with INTEGER_CST stores.
5906         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5907         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5908         and use it throughout.  Generate bit insertion sequences if need be.
5909         (pass_store_merging::process_store): Remove redundant condition.
5910         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5912 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
5914         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5915         the 128-bit floating point types.  Fix function comment.
5917 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5919         * config/aarch64/aarch64-simd.md
5920         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5921         mnemonics.
5922         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5923         mnemonics.
5925 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5927         PR tree-optimization/85989
5928         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5929         variable.
5930         (backprop::intersect_uses): Check it when deciding whether this
5931         is a backedge reference.
5932         (backprop::process_block): Add each phi to m_visited_phis
5933         after visiting it, then clear it at the end.
5935 2018-06-01  Richard Biener  <rguenther@suse.de>
5937         * tree-vectorizer.h (vect_dr_stmt): New function.
5938         (vect_get_load_cost): Adjust.
5939         (vect_get_store_cost): Likewise.
5940         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5941         Use vect_dr_stmt instead of DR_SMTT.
5942         (vect_record_base_alignments): Likewise.
5943         (vect_calculate_target_alignment): Likewise.
5944         (vect_compute_data_ref_alignment): Likewise and make static.
5945         (vect_update_misalignment_for_peel): Likewise.
5946         (vect_verify_datarefs_alignment): Likewise.
5947         (vector_alignment_reachable_p): Likewise.
5948         (vect_get_data_access_cost): Likewise.  Pass down
5949         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5950         (vect_get_peeling_costs_all_drs): Likewise.
5951         (vect_peeling_hash_get_lowest_cost): Likewise.
5952         (vect_enhance_data_refs_alignment): Likewise.
5953         (vect_find_same_alignment_drs): Likewise.
5954         (vect_analyze_data_refs_alignment): Likewise.
5955         (vect_analyze_group_access_1): Likewise.
5956         (vect_analyze_group_access): Likewise.
5957         (vect_analyze_data_ref_access): Likewise.
5958         (vect_analyze_data_ref_accesses): Likewise.
5959         (vect_vfa_segment_size): Likewise.
5960         (vect_small_gap_p): Likewise.
5961         (vectorizable_with_step_bound_p): Likewise.
5962         (vect_prune_runtime_alias_test_list): Likewise.
5963         (vect_analyze_data_refs): Likewise.
5964         (vect_supportable_dr_alignment): Likewise.
5965         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5966         (vect_gen_prolog_loop_niters): Likewise.
5967         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5968         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5969         modify DR_STMT.
5970         (vect_recog_mask_conversion_pattern): Likewise.
5971         (vect_try_gather_scatter_pattern): Likewise.
5972         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5973         to vect_get_store_cost.
5974         (vect_get_store_cost): Get stmt_info instead of DR.
5975         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5976         (vect_get_load_cost): Get stmt_info instead of DR.
5978 2018-06-01  Richard Biener  <rguenther@suse.de>
5980         PR middle-end/86017
5981         * gimple-fold.c (var_decl_component_p): Also allow offsetted
5982         vars wrapped in MEM_REFs.
5984 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5986         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5987         Fix subreg tests so that we only return a choice between
5988         GENERAL_REGS and FP_REGS if the original classes included both.
5990 2018-06-01  Richard Biener  <rguenther@suse.de>
5992         PR ipa/85960
5993         * tree-ssa-structalias.c (get_function_part_constraint):
5994         Handle NULL fi->decl.
5995         (find_func_aliases_for_call): Properly handle indirect
5996         fi from direct call.
5997         (find_func_clobbers): Likewise.
5998         (ipa_pta_execute): Likewise.
5999         (create_variable_info_for): For functions that are ifunc_resolver
6000         resolve to a varinfo that contains the result of the resolver call.
6001         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6002         aliases.
6004 2018-05-31  Michael Collison  <michael.collison@arm.com>
6006         * config/aarch64/aarch64.md:
6007         (*fix_to_zero_extenddfdi2): New pattern.
6008         * gcc.target/aarch64/fix_extend1.c: New testcase.
6010 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
6012         PR middle-end/78809
6013         PR middle-end/83026
6014         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6015         and BUILT_IN_STRNCMP_EQ.
6016         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6017         BUILT_IN_STRNCMP_EQ.
6018         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6019         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6020         (gimple_fold_builtin): Likewise.
6021         * tree-ssa-strlen.c (compute_string_length): New function.
6022         (determine_min_obsize): New function.
6023         (handle_builtin_string_cmp): New function to handle calls to
6024         string compare functions.
6025         (strlen_optimize_stmt): Add handling to builtin string compare
6026         calls.
6027         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6028         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6029         * tree.c (build_common_builtin_nodes): Add new defines of
6030         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6032 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
6034         PR target/85984
6035         * bb-reorder.c (pass_partition_blocks::gate): Return false for
6036         functions with naked attribute.
6038 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6040         * config/i386/sse.md (avx_vec_concat<mode>):
6041         Substitute concat_tg_mode mode attribute with xtg_mode.
6042         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6043         (concat_tg_mode): Remove mode attribute.
6045 2018-05-31  Martin Sebor  <msebor@redhat.com>
6047         PR c/82063
6048         * calls.c (alloc_max_size): Correct a logic error/typo.
6049         Treat excessive arguments as infinite.  Warn for invalid arguments.
6050         * doc/invoke.texi (-Walloc-size-larger-than): Update.
6052 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
6054         PR target/85829
6055         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6056         and movx for Haswell.
6058 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
6059             Cesar Philippidis  <cesar@codesourcery.com>
6061         PR middle-end/85879
6062         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6063         when emitting error on private/firstprivate reductions.
6064         * omp-low.c (lower_omp_target): Avoid reference-type processing
6065         on pointers for firstprivate clause.
6067 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6069         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6070         (st1x2): Likewise.
6071         (st1x3): Likewise.
6072         * config/aarch64/aarch64-simd.md
6073         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6074         (aarch64_ld1_x3_<mode>): Likewise
6075         (aarch64_st1x2<VALLDIF:mode>): Likewise
6076         (aarch64_st1_x2_<mode>): Likewise
6077         (aarch64_st1x3<VALLDIF:mode>): Likewise
6078         (aarch64_st1_x3_<mode>): Likewise
6079         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6080         (vld1_s8_x3): Likewise.
6081         (vld1_u16_x3): Likewise.
6082         (vld1_s16_x3): Likewise.
6083         (vld1_u32_x3): Likewise.
6084         (vld1_s32_x3): Likewise.
6085         (vld1_u64_x3): Likewise.
6086         (vld1_s64_x3): Likewise.
6087         (vld1_f16_x3): Likewise.
6088         (vld1_f32_x3): Likewise.
6089         (vld1_f64_x3): Likewise.
6090         (vld1_p8_x3): Likewise.
6091         (vld1_p16_x3): Likewise.
6092         (vld1_p64_x3): Likewise.
6093         (vld1q_u8_x3): Likewise.
6094         (vld1q_s8_x3): Likewise.
6095         (vld1q_u16_x3): Likewise.
6096         (vld1q_s16_x3): Likewise.
6097         (vld1q_u32_x3): Likewise.
6098         (vld1q_s32_x3): Likewise.
6099         (vld1q_u64_x3): Likewise.
6100         (vld1q_s64_x3): Likewise.
6101         (vld1q_f16_x3): Likewise.
6102         (vld1q_f32_x3): Likewise.
6103         (vld1q_f64_x3): Likewise.
6104         (vld1q_p8_x3): Likewise.
6105         (vld1q_p16_x3): Likewise.
6106         (vld1q_p64_x3): Likewise.
6107         (vst1_s64_x2): Likewise.
6108         (vst1_u64_x2): Likewise.
6109         (vst1_f64_x2): Likewise.
6110         (vst1_s8_x2): Likewise.
6111         (vst1_p8_x2): Likewise.
6112         (vst1_s16_x2): Likewise.
6113         (vst1_p16_x2): Likewise.
6114         (vst1_s32_x2): Likewise.
6115         (vst1_u8_x2): Likewise.
6116         (vst1_u16_x2): Likewise.
6117         (vst1_u32_x2): Likewise.
6118         (vst1_f16_x2): Likewise.
6119         (vst1_f32_x2): Likewise.
6120         (vst1_p64_x2): Likewise.
6121         (vst1q_s8_x2): Likewise.
6122         (vst1q_p8_x2): Likewise.
6123         (vst1q_s16_x2): Likewise.
6124         (vst1q_p16_x2): Likewise.
6125         (vst1q_s32_x2): Likewise.
6126         (vst1q_s64_x2): Likewise.
6127         (vst1q_u8_x2): Likewise.
6128         (vst1q_u16_x2): Likewise.
6129         (vst1q_u32_x2): Likewise.
6130         (vst1q_u64_x2): Likewise.
6131         (vst1q_f16_x2): Likewise.
6132         (vst1q_f32_x2): Likewise.
6133         (vst1q_f64_x2): Likewise.
6134         (vst1q_p64_x2): Likewise.
6135         (vst1_s64_x3): Likewise.
6136         (vst1_u64_x3): Likewise.
6137         (vst1_f64_x3): Likewise.
6138         (vst1_s8_x3): Likewise.
6139         (vst1_p8_x3): Likewise.
6140         (vst1_s16_x3): Likewise.
6141         (vst1_p16_x3): Likewise.
6142         (vst1_s32_x3): Likewise.
6143         (vst1_u8_x3): Likewise.
6144         (vst1_u16_x3): Likewise.
6145         (vst1_u32_x3): Likewise.
6146         (vst1_f16_x3): Likewise.
6147         (vst1_f32_x3): Likewise.
6148         (vst1_p64_x3): Likewise.
6149         (vst1q_s8_x3): Likewise.
6150         (vst1q_p8_x3): Likewise.
6151         (vst1q_s16_x3): Likewise.
6152         (vst1q_p16_x3): Likewise.
6153         (vst1q_s32_x3): Likewise.
6154         (vst1q_s64_x3): Likewise.
6155         (vst1q_u8_x3): Likewise.
6156         (vst1q_u16_x3): Likewise.
6157         (vst1q_u32_x3): Likewise.
6158         (vst1q_u64_x3): Likewise.
6159         (vst1q_f16_x3): Likewise.
6160         (vst1q_f32_x3): Likewise.
6161         (vst1q_f64_x3): Likewise.
6162         (vst1q_p64_x3): Likewise.
6164 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6166         * config/msp430/msp430.c (msp430_output_labelref): Prepend
6167         user_label_prefix to name.
6169         * tree-core.h: Update comment about the format of NAME string
6170         passed to handler in attribute_spec.
6172         * config/msp430/msp430.md: Remove erroneous subreg expression from
6173         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6174         zero_extend{q,h}isi2.
6176 2018-05-30  Borislav Petkov  <bp@suse.de>
6178         * doc/extend.texi: Document some architecture specific
6179         constraints and sort entries.
6181 2018-05-30  Martin Sebor  <msebor@redhat.com>
6183         PR middle-end/85369
6184         * builtins.c (expand_builtin_stpcpy_1): New function.
6185         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6186         only if the former succeeds.
6188 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6190         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6191         in saphira.
6193 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6195         * doc/invoke.texi (-flinker-output): Document
6197 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6199         * passes.c (ipa_write_summaries): Only modify statements if body
6200         is in memory.
6201         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6202         incrementally linking.
6203         (ipa_passes): Likewise.
6204         * lto-cgraph.c (lto_output_node): When incrementally linking do not
6205         pass down resolution info.
6206         * common.opt (flag_incremental_link): Update info.
6207         * gcc.c (plugin specs): Turn flinker-output=* to
6208         -plugin-opt=-linker-output-known
6209         * toplev.c (compile_file): Also cut compilation when doing incremental
6210         link.
6211         * flag-types. (enum lto_partition_model): Add
6212         LTO_LINKER_OUTPUT_NOLTOREL.
6213         (invoke.texi): Add -flinker-output docs.
6214         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
6215         link same way as WPA; do not stream in dead initializers.
6217         * dwarf2out.c (dwarf2out_die_ref_for_decl,
6218         darf2out_register_external_decl): Support incremental link.
6220 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6222         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
6224 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6226         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
6227         it down to simple_object_copy_lto_debug_sections.
6228         (run_gcc): Determine incremental LTO link time and configure
6229         lto1 into non-wpa mode, disable renaming of debug sections.
6231 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6233         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6234         descriptions of various incorrectly documented functions.
6236 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6238         Revert:
6239         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6240         address check not strict.
6242 2018-05-30  Richard Biener  <rguenther@suse.de>
6244         PR tree-optimization/85964
6245         * tracer.c (better_p): Drop initialized count check, we only
6246         call the function with initialized counts now.
6247         (find_best_successor): Do find a best edge if one
6248         has uninitialized count.
6249         (find_best_predecessor): Likewise.  Do BB frequency check only
6250         if count is initialized.
6252 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
6254         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
6255         (aarch64_ldrstr_offset_compare): New.
6256         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6257         load/store orderings.
6258         (aarch64_gen_adjusted_ldpstp): Likewise.
6260 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
6262         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6263         Check for subset of GENERAL_REGS and FP_REGS.
6264         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
6265         r=w alternative.
6267 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
6269         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
6270         and wi::to_poly_offset.  Add the current offset and then check
6271         whether the sum fits, rather than using an unchecked addition of
6272         a checked term.  Check for a shwi rather than a uhwi.
6273         * expr.c (get_bit_range): Use tree_to_poly_uint64.
6274         (store_constructor): Use poly_int_tree_p.
6275         (expand_expr_real_1): Likewise.
6276         * function.c (assign_temp): Likewise.
6277         * fold-const.c (const_binop): Use poly_int_tree_p and
6278         wi::to_poly_offset.
6279         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
6280         division.
6281         * ipa-icf-gimple.c (func_checker::compare_operand): Use
6282         to_poly_offset for MEM offsets.
6283         * ipa-icf.c (sem_variable::equals): Likewise.
6284         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
6285         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
6286         wi::to_poly_offset for BIT_FIELD_REF offsets.
6287         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6288         wi::to_poly_offset.
6289         * var-tracking.c (emit_note_insn_var_location): Use
6290         tree_to_poly_uint64.
6292 2018-05-29  Jim Wilson  <jimw@sifive.com>
6294         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6296 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
6298         PR target/85950
6299         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6300         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6301         sequence.
6302         (sse4_1_round<mode>2): Use nonimmediate_operand
6303         for operand 1 predicate.
6305 2018-05-29  Martin Sebor  <msebor@redhat.com>
6306             Richard Biener  <rguenther@suse.de>
6308         PR testsuite/85888
6309         * calls.c (get_size_range): Call determine_value_range instead
6310         of get_value_range..
6311         * tree-vrp.h (determine_value_range): Declared new function.
6312         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6314 2018-05-29  Richard Biener  <rguenther@suse.de>
6316         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6317         sure to use non-pattern stmts for get_earlier_stmt arguments.
6318         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6319         called on pattern stmts.
6320         (get_later_stmt): Likewise.
6322 2018-05-29  Martin Liska  <mliska@suse.cz>
6324         PR gcov-profile/85759
6325         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6326         env variables.
6328 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
6330         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6331         VEC_UNPACK_*_EXPR.
6332         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6333         VEC_PACK_*_EXPR.
6335         PR target/85918
6336         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6337         VEC_PACK_FLOAT_EXPR): New tree codes.
6338         * tree-pretty-print.c (op_code_prio): Handle
6339         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6340         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6341         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6342         * tree-inline.c (estimate_operator_cost): Likewise.
6343         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6344         * fold-const.c (const_binop): Likewise.
6345         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6346         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6347         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6348         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6349         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6350         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6351         * expr.c (expand_expr_real_2): Likewise.
6352         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6353         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6354         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6355         optabs.
6356         * optabs.c (expand_widen_pattern_expr): For
6357         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6358         sign from result type rather than operand's type.
6359         (expand_binop_directly): For vec_packu_float_optab and
6360         vec_packs_float_optab allow result type to be different from operand's
6361         type.
6362         * optabs-tree.c (optab_for_tree_code): Handle
6363         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6364         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
6365         * tree-vect-generic.c (expand_vector_operations_1):  Handle
6366         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6367         VEC_PACK_FLOAT_EXPR.
6368         * tree-vect-stmts.c (supportable_widening_operation): Handle
6369         FIX_TRUNC_EXPR.
6370         (supportable_narrowing_operation): Handle FLOAT_EXPR.
6371         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6372         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6373         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
6374         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6375         mode attributes.
6376         (vec_pack<floatprefix>_float_<mode>): New expander.
6377         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6378         attributes.
6379         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6380         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6381         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6382         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6383         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6384         Document.
6385         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6386         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6387         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6388         VEC_PACK_FLOAT_EXPR): Document.
6390 2018-05-29  Richard Biener  <rguenther@suse.de>
6392         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6393         member.
6394         (stmt_vec_info_vec): Make pointer.
6395         (init_stmt_vec_info_vec): Remove.
6396         (free_stmt_vec_info_vec): Likewise.
6397         (set_stmt_vec_info_vec): New function.
6398         (free_stmt_vec_infos): Likewise.
6399         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6400         (set_vinfo_for_stmt): Likewise.
6401         (get_earlier_stmt): Likewise.
6402         (get_later_stmt): Likewise.
6403         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6404         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6405         (vec_info::~vec_info): Free stmt_vec_infos.
6406         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6407         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6408         (pass_slp_vectorize::execute): Likewise.
6409         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6410         (free_stmt_vec_info_vec): Likewise.
6411         (set_stmt_vec_info_vec): New function.
6412         (free_stmt_vec_infos): Likewise.
6413         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6414         the global stmt_vec_info_vec.
6415         * tree-parloops.c (gather_scalar_reductions): Use
6416         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6417         vector.
6419 2018-05-29  Richard Biener  <rguenther@suse.de>
6421         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6423 2018-05-29  Martin Liska  <mliska@suse.cz>
6424             David Malcolm  <dmalcolm@redhat.com>
6426         * vec.c (test_reverse): New.
6427         (vec_c_tests): Add new test.
6428         * vec.h (vl_ptr>::reverse): New function.
6430 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
6432         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6434         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6435         and later.
6437 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6439         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6441 2018-05-28  Richard Biener  <rguenther@suse.de>
6443         PR tree-optimization/85933
6444         * tree-vect-data-refs.c (vect_record_base_alignments): Only
6445         look at stmts marked as vectorizable.
6447 2018-05-28  Richard Biener  <rguenther@suse.de>
6449         PR tree-optimization/85934
6450         * tree-vect-generic.c (expand_vector_operations_1): Hoist
6451         vector boolean check before scalar optimization.
6453 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
6455         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6456         for armv5te.
6458 2018-05-28  Mark Wielaard  <mark@klomp.org>
6460         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6461         if it is an expression containing a minus sign.
6463 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
6465         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6467 2018-05-27  Paul Koning  <ni1d@arrl.net>
6469         * config/pdp11/pdp11.md (truncsihi2): Remove.
6471 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
6472             Chung-Ju Wu  <jasonwucj@gmail.com>
6474         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6475         implementation.
6476         (unaligned_store_dw): Ditto.
6477         * config/nds32/nds32-memory-manipulation.c
6478         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6479         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6480         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6481         (emit_setmem_word_loop): Rename to ...
6482         (emit_setmem_doubleword_loop): ... this.
6483         (nds32_gen_dup_4_byte_to_word_value): New function.
6484         (nds32_gen_dup_8_byte_to_double_word_value): New function.
6485         (nds32_expand_setmem_loop): Refine implementation.
6486         (nds32_expand_setmem_loop_v3m): Ditto.
6487         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6488         pattern.
6490 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6492         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6494 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6496         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6497         (nds32_init_machine_status): Initialize machine->attr_naked_p and
6498         machine->attr_no_prologue_p.
6499         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6500         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6501         (nds32_expand_epilogue): Consider attr_naked_p.
6502         (nds32_expand_epilogue_v3pop): Likewise.
6503         (nds32_can_use_return_insn): Likewise.
6504         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6505         attr_no_prologue_p fields.
6506         * config/nds32/nds32.opt (mret-in-naked-func): New option.
6508 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
6510         PR target/85918
6511         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6512         attributes.
6513         * config/i386/sse.md
6514         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6515         Rename to ...
6516         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6517         ... this.
6518         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6519         Rename to ...
6520         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6521         ... this.
6522         (*<floatsuffix>floatv2div2sf2): Rename to ...
6523         (*float<floatunssuffix>v2div2sf2): ... this.
6524         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6525         (float<floatunssuffix>v2div2sf2_mask): ... this.
6526         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6527         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6528         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6529         to ...
6530         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6531         ... this.
6532         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6533         Rename to ...
6534         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6535         ... this.
6536         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6537         Rename to ...
6538         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6539         ... this.
6540         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6541         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6542         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6543         gen_ufix_truncv8dfv8si2.
6544         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6545         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6546         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6547         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6548         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6549         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6550         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6551         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6553 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6555         PR target/85900
6556         PR target/85345
6557         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6559 2018-05-25  Jim Wilson  <jimw@sifive.com>
6561         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6562         * config/riscv/riscv.c (struct machine_function): Add
6563         interrupt_handler_p and attribute_checked_p fields.
6564         (riscv_attribute_table): Add interrupt.
6565         (riscv_interrupt_type_p): New.
6566         (riscv_save_reg_p): Save extra regs for interrupt handler.
6567         (riscv_use_save_libcall): Return false  for interrupt handler.
6568         (riscv_first_stack_step): Add forward declaration.
6569         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
6570         for interrupt handler with large frame.  Use it for saved reg list.
6571         (riscv_expand_prologue): Move flag_stack_usage_info support to
6572         eliminate duplication.
6573         (riscv_expand_epilogue): Generate mret for interrupt handler.
6574         (riscv_epilogue_uses): New.
6575         (riscv_can_use_return_insn): Return false for interrupt handler.
6576         (riscv_function_ok_for_sibcall): Likewise.
6577         (riscv_set_current_function): Add interrupt handler support.
6578         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6579         * config/riscv/riscv.md (UNSPECV_MRET): New.
6580         (GP_REGNUM): New.
6581         (riscv_frflags, riscv_fsflags): Use tab after opcode.
6582         (riscv_mret): New.
6583         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6585 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
6587         PR tree-optimization/85712
6588         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6589         this candidate has already been replaced in-situ by a copy.
6591 2018-05-25  Jason Merrill  <jason@redhat.com>
6593         PR c++/80485 - inline function non-zero address.
6594         * symtab.c (nonzero_address): Check DECL_COMDAT.
6596 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
6598         PR target/83628
6599         * config/alpha/alpha.md (ashlsi3): New insn pattern.
6600         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
6601         extension of SImode operation.  Use const123_operand predicate.
6602         (*saddsi_1): Remove.
6603         (*saddl_se_1): Ditto.
6604         (*ssubsi_1): Ditto.
6605         (*ssubl_se_1): Ditto.
6606         * config/alpha/predicates.md (const123_operand): New predicate.
6607         * config/alpha/constraints.md (P): Use IN_RANGE.
6609 2018-05-25  Richard Biener  <rguenther@suse.de>
6611         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6612         defaulted to true.
6613         (ref_maybe_used_by_stmt_p): Likewise.
6614         (stmt_may_clobber_ref_p): Likewise.
6615         (stmt_may_clobber_ref_p_1): Likewise.
6616         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6617         and pass it along.
6618         (ref_maybe_used_by_stmt_p): Likewise.
6619         (stmt_may_clobber_ref_p): Likewise.
6620         (stmt_may_clobber_ref_p_1): Likewise.
6621         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6622         the alias oracle to disambiguate DRs with stmts DR analysis
6623         couldn't handle.
6624         (vect_analyze_data_refs): Do not give up on not analyzable
6625         DRs for BB vectorization.  Remove code truncating the dataref
6626         vector.
6628 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
6630         PR target/85832
6631         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6632         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
6633         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6635 2018-05-25  Richard Biener  <rguenther@suse.de>
6637         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6638         function, combining stmt data ref gathering and fatal analysis
6639         parts.
6640         (vect_analyze_data_refs): Remove now redudnant code and simplify.
6641         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6642         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6643         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6644         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6646 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6648         PR tree-optimization/85720
6649         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6650         SCC if all partitions are builtins.
6651         (version_loop_by_alias_check): New parameter.  Generate cancelable
6652         runtime alias check if all partitions are builtins.
6653         (distribute_loop): Update call to above function.
6655 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6657         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6658         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6659         (parm_default_def_partition_arg): Ditto.
6660         (set_parm_default_def_partition): Ditto.
6661         (get_parm_default_def_partitions): Ditto and make it static.
6662         (get_undefined_value_partitions): Ditto and make it static.
6663         (remove_ssa_form): Refactor call to init_var_map here.
6664         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6665         computation for loop region.
6666         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6667         (register_default_def): Delete.
6668         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6669         (parm_default_def_partition_arg): Ditto.
6670         (set_parm_default_def_partition): Ditto.
6671         (get_parm_default_def_partitions): Ditto and make it static.
6672         (get_undefined_value_partitions): Ditto and make it static.
6673         (coalesce_with_default, coalesce_with_default): Update comment.
6674         (create_coalesce_list_for_region): New func factored out from
6675         create_outofssa_var_map.
6676         (populate_coalesce_list_for_outofssa): New func factored out from
6677         create_outofssa_var_map and coalesce_ssa_name.
6678         (create_outofssa_var_map): Delete.
6679         (coalesce_ssa_name): Refactor to support live range computation.
6680         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6681         (get_parm_default_def_partitions): Delete.
6682         (get_undefined_value_partitions): Ditto.
6683         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6684         computation for loop region.
6685         (new_tree_live_info, loe_visit_block): Ditto.
6686         (live_worklist, set_var_live_on_entry): Ditto.
6687         (calculate_live_on_exit, verify_live_on_entry): Ditto.
6688         * tree-ssa-live.h (struct _var_map): New fields.
6689         (init_var_map): Change decl.
6690         (region_contains_p): New.
6692 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6694         * tree-ssa-live.h (live_merge_and_clear): Delete.
6696 2018-05-25  Richard Biener  <rguenther@suse.de>
6698         PR c++/85912
6699         * tree-dump.c (dequeue_and_dump): Remove access to removed
6700         operand 2 of a SWITCH_EXPR.
6702 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6704         * doc/sourcebuild.texi (vect_double_cond_arith): Include
6705         multiplication and division.
6706         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6707         (cond_udiv@var{m}, cond_umod@var{m}): Document.
6708         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6709         (cond_udiv_optab, cond_umod_optab): New optabs.
6710         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6711         (IFN_COND_RDIV): New internal functions.
6712         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6713         TRUNC_MOD_EXPR and RDIV_EXPR.
6714         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6715         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6716         New unspecs.
6717         (SVE_INT_BINARY): Include mult.
6718         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6719         (optab, sve_int_op): Handle mult.
6720         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6721         UNSPEC_COND_DIV.
6722         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6723         for SVE_INT_BINARY_SD.
6725 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6727         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6728         (optab, sve_int_op): Handle div and udiv.
6729         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6730         for SVE_INT_BINARY_SD.
6731         (*<optab><mode>3): New insn for the same.
6733 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6735         * tree-vect-patterns.c: Include predict.h.
6736         (vect_recog_divmod_pattern): Restrict check for division support
6737         to when optimizing for size.
6739 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6741         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6742         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6743         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6744         (gimple_match_op::set_op): Likewise.
6745         (gimple_resimplify4): Declare.
6746         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6747         (expr::gen_transform): Likewise.
6748         (decision_tree::gen): Generate a simplification routine for 4 operands.
6749         * gimple-match-head.c (gimple_simplify): Add an overload for
6750         4 operands.  In the top-level function, handle up to 4 call
6751         arguments and call gimple_resimplify4.
6752         (gimple_resimplify4): New function.
6753         (build_call_internal): Pass a fourth operand.
6754         (maybe_push_to_seq): Likewise.
6755         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6756         Fold VEC_COND_EXPRs of an operation and a default value into
6757         an IFN_COND_* function if possible.
6758         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6759         New unspecs.
6760         (SVE_COND_FP_BINARY): Include them.
6761         (optab, sve_fp_op): Handle them.
6762         (SVE_INT_BINARY_REV): New code iterator.
6763         (SVE_COND_FP_BINARY_REV): New int iterator.
6764         (commutative): New int attribute.
6765         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6766         Declare.
6767         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6768         function.
6769         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6770         (*cond_<optab><mode>): New patterns for reversed operands.
6772 2018-05-25  Richard Biener  <rguenther@suse.de>
6774         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6775         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6776         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6777         (STMT_VINFO_GROUPED_ACCESS): Adjust.
6778         * tree-vect-data-refs.c (everywhere): Adjust users.
6779         * tree-vect-loop.c (everywhere): Likewise.
6780         * tree-vect-slp.c (everywhere): Likewise.
6781         * tree-vect-stmts.c (everywhere): Likewise.
6782         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6784 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6786         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6787         Rename to...
6788         (gcc_cv_as_section_exclude): ... this.
6789         Try Solaris as #exclude syntax.
6790         * configure: Regenerate.
6791         * config.in: Regenerate.
6792         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6793         SECTION_EXCLUDE.
6794         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6795         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6797         * varasm.c (default_elf_asm_named_section): Don't check if
6798         HAVE_GAS_SECTION_EXCLUDE is defined.
6800 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6802         * doc/md.texi: Update the documentation of the cond_* optabs
6803         to mention the new final operand.  Fix GET_MODE_NUNITS call.
6804         Describe the scalar case too.
6805         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6806         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6807         instead of 2.
6808         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6809         (get_conditional_internal_fn): Update comment.
6810         * tree-vect-loop.c (vectorizable_reduction): Pass the original
6811         accumulator value as a final argument to conditional functions.
6812         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6813         a define_expand and add an "else" operand.  Assert for now that
6814         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
6815         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6816         (*cond_<optab><mode>): New patterns.
6817         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6818         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6819         (UNSPEC_COND_EOR): Delete.
6820         (optab): Remove associated mappings.
6821         (SVE_INT_BINARY): New code iterator.
6822         (sve_int_op): Remove int attribute and add "minus" to the code
6823         attribute.
6824         (SVE_COND_INT_OP): Delete.
6825         (SVE_COND_FP_OP): Rename to...
6826         (SVE_COND_FP_BINARY): ...this.
6828 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6830         * optabs.c (can_reuse_operands_p): New function.
6831         (maybe_legitimize_operands): Try to reuse the results for
6832         earlier operands.
6834 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6836         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6837         Add {q} suffix to insn mnemonic.
6839 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6841         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6842         (msp430_warn_func_return): New.
6844 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
6846         * fold-const.c (tree_nonzero_bits): New function.
6847         * fold-const.h (tree_nonzero_bits): Likewise.
6848         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6849         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6851 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6853         PR target/85900
6854         PR target/85345
6855         * varasm.c (assemble_alias): Check ifunc_resolver only on
6856         FUNCTION_DECL.
6858 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6860         PR target/85903
6861         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6862         when memory input operand is handled.
6864 2018-05-24  Luis Machado  <luis.machado@linaro.org>
6866         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6867         global.
6868         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6870 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6872         * match.pd: Delay FMA folds until after vectorization.
6874 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6876         PR target/83009
6877         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6878         address check not strict.
6880 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6882         * gimple-match.h (gimple_match_op): New class.
6883         (mprts_hook): Replace parameters with a gimple_match_op *.
6884         (maybe_build_generic_op): Likewise.
6885         (gimple_simplified_result_is_gimple_val): Replace parameters with
6886         a const gimple_match_op *.
6887         (gimple_simplify): Replace code_helper * and tree * parameters with
6888         a gimple_match_op * parameter.
6889         (gimple_resimplify1): Replace code_helper *, tree and tree *
6890         parameters with a gimple_match_op * parameter.
6891         (gimple_resimplify2): Likewise.
6892         (gimple_resimplify3): Likewise.
6893         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6894         parameters with a gimple_match_op * parameter.
6895         * gimple-match-head.c (gimple_simplify): Change prototypes of
6896         auto-generated functions to take a gimple_match_op * instead of
6897         separate code_helper * and tree * parameters.  Make the same
6898         change in the top-level overload and update calls to the
6899         gimple_resimplify routines.  Update calls to the auto-generated
6900         functions and to maybe_push_res_to_seq in the publicly-facing
6901         operation-specific gimple_simplify overloads.
6902         (gimple_match_op::MAX_NUM_OPS): Define.
6903         (gimple_resimplify1): Replace rcode and ops with a single res_op
6904         parameter.  Update call to gimple_simplify.
6905         (gimple_resimplify2): Likewise.
6906         (gimple_resimplify3): Likewise.
6907         (mprts_hook): Replace parameters with a gimple_match_op *.
6908         (maybe_build_generic_op): Likewise.
6909         (build_call_internal): Replace type, nargs and ops with
6910         a gimple_match_op *.
6911         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6912         with a single gimple_match_op *.  Update calls to mprts_hook,
6913         build_call_internal and gimple_simplified_result_is_gimple_val.
6914         Factor out code that is common to the tree_code and combined_fn cases.
6915         * genmatch.c (expr::gen_transform): Replace tem_code and
6916         tem_ops with a gimple_match_op called tem_op.  Update calls
6917         to the gimple_resimplify functions and maybe_push_res_to_seq.
6918         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6919         res_ops.  Update call to the gimple_resimplify functions.
6920         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6921         (decision_tree::gen): Make the functions take a gimple_match_op *
6922         called res_op instead of separate res_code and res_ops parameters.
6923         Update call accordingly.
6924         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6925         and ops with a single res_op parameter.  Update calls to
6926         maybe_build_generic_op and maybe_push_res_to_seq.
6927         (fold_stmt_1): Update calls to gimple_simplify and
6928         replace_stmt_with_simplification.
6929         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6930         and gimple_simplified_result_is_gimple_val.
6931         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6932         gimple_simplify.
6933         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6934         with a gimple_match_op *.
6935         (vn_nary_build_or_lookup): Likewise.  Update call to
6936         vn_nary_build_or_lookup_1.
6937         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6938         gimple_match_op *.  Update calls to the gimple_resimplify routines
6939         and to gimple_simplified_result_is_gimple_val.
6940         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6941         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6942         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6943         (visit_nary_op): Likewise.
6944         (visit_reference_op_load): Likewise.
6946 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6948         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6949         modifier for printing the step amount.
6951 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
6953         PR target/78849
6954         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6955         types.
6957 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
6959         * doc/sourcebuild.texi (Endianness): New subsubsection.
6961 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6963         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6964         <prefetch_dynamic_strides>: New const bool field.
6965         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6966         prefetch_dynamic_strides.
6967         (exynosm1_prefetch_tune): Likewise.
6968         (thunderxt88_prefetch_tune): Likewise.
6969         (thunderx_prefetch_tune): Likewise.
6970         (thunderx2t99_prefetch_tune): Likewise.
6971         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6972         false.
6973         (aarch64_override_options_internal): Update to set
6974         PARAM_PREFETCH_DYNAMIC_STRIDES.
6975         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6976         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6977         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6978         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6979         prefetch-dynamic-strides setting.
6981 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6983         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6984         <minimum_stride>: New const int field.
6985         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6986         minimum_stride field defaulting to -1.
6987         (exynosm1_prefetch_tune): Likewise.
6988         (thunderxt88_prefetch_tune): Likewise.
6989         (thunderx_prefetch_tune): Likewise.
6990         (thunderx2t99_prefetch_tune): Likewise.
6991         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6992         <default_opt_level>: Set to 3.
6993         (aarch64_override_options_internal): Update to set
6994         PARAM_PREFETCH_MINIMUM_STRIDE.
6995         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6996         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6997         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6998         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6999         stride is constant and is below the minimum stride threshold.
7001 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7003         * config/arm/arm-cpus.in (mode26): Delete.
7004         (armv4): Delete mode26 reference.
7005         * config/arm/arm.c (arm_configure_build_target): Delete use of
7006         isa_bit_mode26.
7008 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
7010         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7011         New insn pattern.
7012         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7013         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
7014         for non-SSE modes.
7015         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
7016         (floatunsdidf2): Ditto.
7018 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
7020         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7021         (fixuns_trunc<mode>si2_avx512f): Ditto.
7022         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7023         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7024         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7026 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
7028         PR rtl-optimization/79985
7029         * df-scan.c (df_insn_refs_collect): Remove special case for
7030         global registers and asm statements.
7032 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
7034         * extend.texi (Global Register Variables): Rewrite the bullet list.
7035         Note that the register is available for allocation. Note that access
7036         via inline asm must use constraints. Add note about async-signal
7037         handlers. Remove paragraph about automagic register selection.
7039 2018-05-23  Richard Biener  <rguenther@suse.de>
7041         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7042         of fixed offset from memset VN.
7044 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
7046         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7047         first_interp field.
7048         (alloc_cand_and_find_basis): Initialize first_interp field.
7049         (slsr_process_mul): Modify first_interp field.
7050         (slsr_process_add): Likewise.
7051         (slsr_process_cast): Modify first_interp field for each new
7052         interpretation.
7053         (slsr_process_copy): Likewise.
7054         (dump_candidate): Dump first_interp field.
7055         (replace_mult_candidate): Process all interpretations, not just
7056         subsequent ones.
7057         (replace_rhs_if_not_dup): Likewise.
7058         (replace_one_candidate): Likewise.
7060 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
7062         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7063         Add new boolean.
7064         (aarch64_needs_frame_chain): New function.
7065         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7067 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
7069         PR target/84882
7070         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7071         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7072         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7073         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7074         as true for strict-align.
7075         (aarch64_can_inline_p): Perform checks even when callee has no
7076         attributes to check for strict alignment.
7077         * doc/extend.texi (AArch64 Function Attributes): Document
7078         no-strict-align.
7079         * doc/invoke.texi: (AArch64 Options): Likewise.
7081 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
7083         PR tree-optimization/85853
7084         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7085         the handling of the root of the node to...
7086         (vect_slp_analyze_node_operations_1): ...this new function,
7087         and run the whole thing with the child nodes' def types
7088         set according to their SLP node's def type.
7090 2018-05-23  Richard Biener  <rguenther@suse.de>
7092         PR middle-end/85874
7093         * tree-data-ref.c (create_runtime_alias_checks): Defer
7094         and ignore overflow warnings.
7096 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
7098         PR tree-optimization/85822
7099         * tree-vrp.c (is_masked_range_test): Fix handling of negative
7100         constants.
7102 2018-05-23  Richard Biener  <rguenther@suse.de>
7104         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7105         memset constants via native_interpret_expr.
7107 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
7109         PR target/85345
7110         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7111         attribute.
7112         (cgraph_node::create_alias): Likewise.
7113         (cgraph_node::get_availability): Check ifunc_resolver instead
7114         of looking up ifunc attribute.
7115         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7116         * varasm.c (do_assemble_alias): Likewise.
7117         (assemble_alias): Likewise.
7118         (default_binds_local_p_3): Likewise.
7119         * cgraph.h (cgraph_node): Add ifunc_resolver.
7120         (cgraph_node::only_called_directly_or_aliased_p): Return false
7121         for IFUNC resolver.
7122         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7123         attribute.
7124         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7125         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7126         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7127         instead of looking up ifunc attribute.
7129 2018-05-22  Luis Machado  <luis.machado@linaro.org>
7131         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7133 2018-05-22  Martin Sebor  <msebor@redhat.com>
7135         PR middle-end/85359
7136         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7137         only when expasion succeeds.
7138         (expand_builtin_strcmp): Same.
7139         (expand_builtin_strncmp): Same.
7141 2018-05-22  Martin Sebor  <msebor@redhat.com>
7143         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7145 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
7146             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7148         * config/aarch64/aarch64-ldpstp.md: Replace uses of
7149         aarch64_mem_pair_operand with memory_operand and delete operand swapping
7150         code.
7151         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7152         Add check for legitimate_address.
7153         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7154         (aarch64_swap_ldrstr_operands): New.
7155         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7156         Define prototype.
7158 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
7159             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7161         * config/aarch64/aarch64.md: New patterns to generate stp
7162         and ldp.
7163         (store_pair_sw, store_pair_dw): New patterns to generate stp for
7164         single words and double words.
7165         (load_pair_sw, load_pair_dw): Likewise.
7166         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7167         Delete.
7168         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7169         Delete.
7170         * config/aarch64/aarch64-ldpstp.md: Modify peephole
7171         for different mode ldpstp and add peephole for merged zero stores.
7172         Likewise for loads.
7173         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7174         Add size check.
7175         (aarch64_gen_store_pair): Rename calls to match new patterns.
7176         (aarch64_gen_load_pair): Rename calls to match new patterns.
7177         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7178         (load_pair<DREG:mode><DREG2:mode>): ... This.
7179         (store_pair<mode>): Rename to...
7180         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7181         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7182         New mode iterators.
7183         (V_INT_EQUIV): Handle SImode.
7184         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7185         New predicate.
7187 2018-05-22  Martin Sebor  <msebor@redhat.com>
7189         PR c/85623
7190         * calls.c (maybe_warn_nonstring_arg): Use string length to set
7191         or ajust the presumed bound on an operation to avoid unnecessary
7192         warnings.
7194 2018-05-22  Martin Sebor  <msebor@redhat.com>
7196         PR tree-optimization/85826
7197         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7198         assuming that a DECL necesarily has a constant size.
7200 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
7202         PR middle-end/85862
7203         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7205 2018-05-22  Richard Biener  <rguenther@suse.de>
7207         PR tree-optimization/85834
7208         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
7209         non-constant and non-zero memset arguments.
7211 2018-05-22  Martin Liska  <mliska@suse.cz>
7213         PR ipa/85607
7214         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
7216 2018-05-22  Richard Biener  <rguenther@suse.de>
7218         PR tree-optimization/85863
7219         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
7220         comparisons when vectype is specified.
7221         (vectorizable_condition): Do not specify vectype for
7222         vect_is_simple_cond when SLP vectorizing.
7224 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
7226         PR target/85657
7227         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
7228         define __ibm128 as long double.
7229         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
7230         as a distinct type when IEEE 128-bit support is enabled.
7231         (init_float128_ieee): Fix up conversions between IFmode and IEEE
7232         128-bit types to use the correct functions.
7233         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
7234         convert between 128-bit floating point types that have different
7235         modes but the same representation, instead of using gen_lowpart to
7236         makean alias.
7237         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
7238         KFmode.
7239         (IFKF_reg): New attributes to give the register constraints for
7240         IFmode and KFmode.
7241         (extend<mode>tf2_internal): New insns to mark an explicit
7242         conversion between 128-bit floating point types that have a
7243         different mode but share the same representation.
7245 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
7247         PR tree-optimization/85814
7248         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
7249         a null return from get_strinfo when unsharing the next
7250         strinfo in the chain.
7252 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7254         PR gcc/84923
7255         * varasm.c (weak_finish): Clean up weak_decls.
7257 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7259         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
7260         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
7261         UNSPEC_UADALP values.
7262         * config/aarch64/iterators.md (ABAL): New int iterator.
7263         (ABDL2): Likewise.
7264         (ADALP): Likewise.
7265         (sur): Add mappings for the above.
7266         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
7267         New define_insn.
7268         (aarch64_<sur>abal<mode>_4): Likewise.
7269         (aarch64_<sur>adalp<mode>_3): Likewise.
7270         (<sur>sadv16qi): New define_expand.
7272 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
7274         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
7275         (*movdf_internal): Ditto.
7276         (*rcpsf2_sse): Ditto.
7277         (*rsqrtsf2_sse): Ditto.
7278         (*sqrt<mode>2_sse): Ditto.
7280 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
7282         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
7283         eor3q<mode>4.
7284         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
7285         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
7286         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
7287         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7288         vbcaxq_s64): New.
7289         * config/aarch64/arm_neon.h: Likewise.
7290         * config/aarch64/iterators.md (VQ_I): New.
7292 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
7294         * config.gcc: Add arc/t-multilib-linux to tmake_file for
7295         arc*-*-linux*.
7296         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7297         MULTILIB_DIRNAMES
7299 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7301         * config/nds32/constraints.md (S): New constraint.
7302         * config/nds32/nds32.md (call_internal): Use constraint S.
7303         (call_value_internal): Likewise.
7304         (sibcall_internal): Likewise.
7305         (sibcall_value_internal): Likewise.
7307 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7308             Chung-Ju Wu  <jasonwucj@gmail.com>
7310         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7311         into consideration.
7313 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7314             Chung-Ju Wu  <jasonwucj@gmail.com>
7316         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7317         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7318         (nds32_rtx_costs_impl): Simplify.
7319         (nds32_address_cost_impl): Simplify.
7320         (nds32_init_rtx_costs): New function.
7321         (nds32_rtx_costs_speed_prefer): Likewise.
7322         (nds32_rtx_costs_size_prefer): Likewise.
7323         (nds32_address_cost_speed_prefer): Likewise.
7324         (nds32_address_cost_speed_fwprop): Likewise.
7325         (nds32_address_cost_size_prefer): Likewise.
7326         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7327         * config/nds32/nds32.c (nds32_option_override): Use
7328         nds32_init_rtx_costs function.
7330 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7332         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7333         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7334         (TARGET_PIPELINE_N8): Likewise.
7335         (TARGET_PIPELINE_N10): Likewise.
7336         (TARGET_PIPELINE_N13): Likewise.
7337         (TARGET_PIPELINE_GRAYWOLF): Likewise.
7339 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
7341         * config/nds32/nds32-fpu.md: Update copyright year.
7343 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7345         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7347 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7349         * config/nds32/nds32.c
7350         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7351         * config/nds32/nds32.opt (minline-asm-r15): New option.
7353 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7355         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7356         MASK_HW_ABS.
7357         * config/nds32/nds32.md (abssi2): New pattern.
7359 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
7361         * config/i386/i386.md (rex64namesuffix): New mode attribute.
7362         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7363         Merge insn pattern from sse_cvtsi2ss<round_name> and
7364         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7365         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7366         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7367         using SWI48 mode iterator.
7368         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7369         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7370         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7371         pattern from sse_cvttss2si<round_saeonly_name>
7372         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7373         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7374         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7375         using SWI48 mode iterator.
7376         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7377         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7378         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7379         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7380         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7381         using SWI48 mode iterator.
7382         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7383         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7384         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7385         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7386         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7387         SWI48 mode iterator.
7388         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7389         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7390         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7391         pattern from sse_cvttsd2si<round_saeonly_name>
7392         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7394 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7396         * config/nds32/nds32-md-auxiliary.c
7397         (nds32_valid_smw_lwm_base_p): Refine.
7398         (nds32_output_smw_single_word): Refine.
7399         (nds32_output_smw_double_word): New.
7400         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7402 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7404         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7405         (nds32_output_stack_pop): Refine.
7406         (nds32_expand_unaligned_load): Refine.
7407         (nds32_expand_unaligned_store): Refine.
7409 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7410             Chung-Ju Wu  <jasonwucj@gmail.com>
7412         * config/nds32/constants.md: Add TP_REGNUM constant.
7413         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7414         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7415         UNSPEC_ADD32.
7416         * config/nds32/nds32-doubleword.md: Consider flag_pic.
7417         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7418         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7419         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7420         and PIC code generation.
7421         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7422         code generation.
7423         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7424         optimization.
7425         * config/nds32/nds32.md: Support TLS and PIC.
7426         * config/nds32/nds32.c: Support TLS and PIC.
7427         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7428         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7429         predicate.
7431 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7433         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7434         mode with E_ prefix.
7436 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7437             Chung-Ju Wu  <jasonwucj@gmail.com>
7439         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7440         * config/nds32/nds32-md-auxiliary.c
7441         (symbolic_reference_mentioned_p): New.
7442         (nds32_legitimize_ict_address): New.
7443         (nds32_expand_ict_move): New.
7444         (nds32_indirect_call_referenced_p): New.
7445         (nds32_symbol_binds_local_p): Delete.
7446         (nds32_long_call_p): Modify.
7447         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7448         * config/nds32/nds32-protos.h
7449         (symbolic_reference_mentioned_p): Declare.
7450         (nds32_legitimize_ict_address): Declare.
7451         (nds32_expand_ict_move): Declare.
7452         (nds32_indirect_call_referenced_p): Declare.
7453         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7454         (nds32_relax_group): Use nds32_ict_const_p as condition.
7455         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7456         (nds32_asm_file_start): Output ict_model directive in asm code.
7457         (nds32_legitimate_address_p): Consider indirect call.
7458         (nds32_print_operand): Consider indirect call.
7459         (nds32_print_operand_address): Consider indirect call.
7460         (nds32_insert_attributes): Handle "indirect_call" attribute.
7461         (TARGET_LEGITIMATE_ADDRESS_P): Define.
7462         (TARGET_LEGITIMATE_CONSTANT_P): Define.
7463         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7464         (TARGET_DELEGITIMIZE_ADDRESS): Define.
7465         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7466         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7467         (TARGET_ICT_MODEL_SMALL): Define.
7468         (TARGET_ICT_MODEL_LARGE): Define.
7469         * config/nds32/nds32.md (movsi): Consider ict model.
7470         (call, call_value): Consider ict model.
7471         (sibcall, sibcall_value): Consider ict model.
7472         * config/nds32/nds32.opt (mict-model): New option.
7473         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7474         model.
7476 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
7477             Monk Chiang  <sh.chiang04@gmail.com>
7478             Jim Wilson <jimw@sifive.com>
7480         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7481         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
7482         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7483         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7484         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
7485         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7486         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7487         compute save_libcall_adjustment properly.
7488         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7489         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7490         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7491         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7492         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7493         (ABI_SPEC): Handle mabi=ilp32e.
7494         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7495         (RVE): Add RVE mask.
7496         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7497         <-march>: Add rv32e as an example.
7499 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
7501         PR c++/82899
7502         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7503         (intra_create_variable_infos): Handle C++ constructors.
7505 2018-05-18  Martin Liska  <mliska@suse.cz>
7507         * passes.def: Remove a redundant pass.
7509 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7511         PR bootstrap/85838
7512         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7514 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7516         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7517         (ARMv4): Update.
7518         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7519         (ARMv6m): Update.
7520         (armv2, armv2a, armv3, armv3m): Delete architectures.
7521         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7522         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7523         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7524         Delete cpus.
7525         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7526         (*mulsidi3adddi): Likewise.
7527         (mulsidi3): Likewise.
7528         (*mulsidi3_nov6): Likewise.
7529         (umulsidi3): Likewise.
7530         (umulsidi3_nov6): Likewise.
7531         (umaddsidi4): Likewise.
7532         (*umulsidi3adddi): Likewise.
7533         (smulsi3_highpart): Likewise.
7534         (*smulsi3_highpart_nov6): Likewise.
7535         (umulsi3_highpart): Likewise.
7536         (*umulsi3_highpart_nov6): Likewise.
7537         * config/arm/arm.h (arm_arch3m): Delete.
7538         * config/arm/arm.c (arm_arch3m): Delete.
7539         (arm_option_override_internal): Update armv3-related comment.
7540         (arm_configure_build_target): Delete use of isa_bit_mode32.
7541         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7542         (arm_rtx_costs_internal): Delete check of arm_arch3m.
7543         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7544         (mulsa3): Likewise.
7545         (mulusa3): Likewise.
7546         * config/arm/arm-protos.h (arm_arch3m): Delete.
7547         * config/arm/arm-tables.opt: Regenerate.
7548         * config/arm/arm-tune.md: Likewise.
7549         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7550         deleted architectures.
7552 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7554         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7555         (armv5t, armv5te): New features.
7556         (ARMv5, ARMv5e): Delete fgroups.
7557         (ARMv5t, ARMv5te): Adjust for above changes.
7558         (ARMv6m): Likewise.
7559         (armv5, armv5e): Delete arches.
7560         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7561         arm_arch5.
7562         (*call_reg_arm): Likewise.
7563         (*call_value_reg_armv5): Likewise.
7564         (*call_value_reg_arm): Likewise.
7565         (*call_symbol): Likewise.
7566         (*call_value_symbol): Likewise.
7567         (*sibcall_insn): Likewise.
7568         (*sibcall_value_insn): Likewise.
7569         (clzsi2): Likewise.
7570         (prefetch): Likewise.
7571         (define_split and define_peephole2 dependent on arm_arch5):
7572         Likewise.
7573         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7574         arm_arch5e.
7575         (TARGET_ARM_QBIT): Likewise.
7576         (TARGET_DSP_MULTIPLY): Likewise.
7577         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7578         (arm_arch5, arm_arch5e): Delete.
7579         (arm_arch5t, arm_arch5te): Declare.
7580         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7581         (arm_arch5t): Declare.
7582         (arm_option_reconfigure_globals): Update for the above.
7583         (arm_options_perform_arch_sanity_checks): Update comment, replace
7584         use of arm_arch5 with arm_arch5t.
7585         (use_return_insn): Likewise.
7586         (arm_emit_call_insn): Likewise.
7587         (output_return_instruction): Likewise.
7588         (arm_final_prescan_insn): Likewise.
7589         (arm_coproc_builtin_available): Likewise.
7590         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7591         arm_arch5e with arm_arch5t and arm_arch5te.
7592         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7593         (arm_arch5t, arm_arch5te): Declare.
7594         * config/arm/arm-tables.opt: Regenerate.
7595         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7596         * config/arm/t-multilib: Likewise.
7597         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7598         instead of arm_arch5.
7599         (*call_reg_thumb1): Likewise.
7600         (*call_value_reg_thumb1_v5): Likewise.
7601         (*call_value_reg_thumb1): Likewise.
7602         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7603         unreachable path.
7604         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7606 2018-05-18  Martin Liska  <mliska@suse.cz>
7608         PR gcov-profile/84846
7609         * doc/gcov.texi: Document -t option of gcov tool.
7611 2018-05-18  Martin Liska  <mliska@suse.cz>
7613         PR gcov-profile/84846
7614         * gcov.c (print_usage): Add new -t option.
7615         (process_args): Handle the option.
7616         (generate_results): Use stdout as output when requested by
7617         the option.
7619 2018-05-18  Martin Liska  <mliska@suse.cz>
7621         PR gcov-profile/84846
7622         * coverage.c (coverage_init): Write PWD to .gcno file.
7623         * doc/gcov.texi: Document how working directory is printed.
7624         * gcov-dump.c (dump_gcov_file): Print PWD.
7625         * gcov.c (output_intermediate_file): Likewise.
7626         (read_graph_file): Read PWD string.
7627         (output_lines): Print PWD.
7629 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7631         PR middle-end/85817
7632         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7633         for retval and return false if all args to phi are zero.
7635 2018-05-18  Richard Biener  <rguenther@suse.de>
7637         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7638         method.
7639         (evrp_dom_walker::before_dom_children): Call it.
7641 2018-05-18  Richard Biener  <rguenther@suse.de>
7643         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7644         results when processing array refs with variable index.
7646 2018-05-18  Toon Moene  <toon@moene.org>
7648         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7649         directly after that of -floop-interchange. Indicate that both
7650         options are enabled by default when specifying -O3.
7652 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7654         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7655         iterator.  Delete separate integer-mode vec_set<mode> expander.
7656         (aarch64_simd_vec_setv2di): Delete.
7657         (vec_setv2di): Delete.
7658         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7659         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
7660         the "w, r" alternative.
7662 2018-05-18  Martin Liska  <mliska@suse.cz>
7664         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7665         * tree-pass.h (make_pass_lower_switch_O0): New function.
7666         * tree-switch-conversion.c (node_has_low_bound): Remove.
7667         (node_has_high_bound): Likewise.
7668         (node_is_bounded): Likewise.
7669         (class pass_lower_switch): Make it a template type and create
7670         two instances.
7671         (pass_lower_switch::execute): Add template argument.
7672         (make_pass_lower_switch): New function.
7673         (make_pass_lower_switch_O0): New function.
7674         (do_jump_if_equal): Remove.
7675         (emit_case_nodes): Simplify to just handle all 3 cases and leave
7676         all the hard work to tree optimization passes.
7678 2018-05-18  Martin Liska  <mliska@suse.cz>
7680         * dbgcnt.c (limit_low): Renamed from limit.
7681         (limit_high): New variable.
7682         (dbg_cnt_is_enabled): Check for upper limit.
7683         (dbg_cnt): Adjust dumping.
7684         (dbg_cnt_set_limit_by_index): Add new argument for high
7685         value.
7686         (dbg_cnt_set_limit_by_name): Likewise.
7687         (dbg_cnt_process_single_pair): Parse new format.
7688         (dbg_cnt_process_opt): Use strtok.
7689         (dbg_cnt_list_all_counters): Remove 'value' and add
7690         'limit_high'.
7691         * doc/invoke.texi: Document changes.
7693 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
7695         * doc/sourcebuild.texi (scalar_all_fma): Document.
7696         * tree.def (FMA_EXPR): Delete.
7697         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7698         * internal-fn.c (ternary_direct): New macro.
7699         (expand_ternary_optab_fn): Likewise.
7700         (direct_ternary_optab_supported_p): Likewise.
7701         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7702         * builtins.c (fold_builtin_fma): Delete.
7703         (fold_builtin_3): Don't call it.
7704         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7705         * expr.c (expand_expr_real_2): Likewise.
7706         * fold-const.c (operand_equal_p): Likewise.
7707         (fold_ternary_loc): Likewise.
7708         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7709         * gimple.c (DEFTREECODE): Likewise.
7710         * gimplify.c (gimplify_expr): Likewise.
7711         * optabs-tree.c (optab_for_tree_code): Likewise.
7712         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7713         * tree-eh.c (operation_could_trap_p): Likewise.
7714         (stmt_could_throw_1_p): Likewise.
7715         * tree-inline.c (estimate_operator_cost): Likewise.
7716         * tree-pretty-print.c (dump_generic_node): Likewise.
7717         (op_code_prio): Likewise.
7718         * tree-ssa-loop-im.c (stmt_cost): Likewise.
7719         * tree-ssa-operands.c (get_expr_operands): Likewise.
7720         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7721         * fold-const-call.h (fold_fma): Delete.
7722         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7723         CFN_FNMA and CFN_FNMS.
7724         (fold_fma): Delete.
7725         * genmatch.c (combined_fn): New enum.
7726         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7727         (commutative_op): New function.
7728         (commutate): Use it.  Handle more than 2 operands.
7729         (dt_operand::gen_gimple_expr): Use commutative_op.
7730         (parser::parse_expr): Allow :c to be used with non-binary
7731         operators if the commutative operand is known.
7732         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7733         CFN_FMS, CFN_FNMA and CFN_FNMS.
7734         (backprop::process_assign_use): Remove FMA_EXPR handling.
7735         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7736         (gen_hsa_fma): New function.
7737         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7738         IFN_FNMA and IFN_FNMS.
7739         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7740         * gimple-fold.h (follow_all_ssa_edges): Declare.
7741         * gimple-fold.c (follow_all_ssa_edges): New function.
7742         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7743         gimple_build interface and use follow_all_ssa_edges to fold the result.
7744         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7745         instead of checking for optabs directly.
7746         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7747         rather than FMA_EXPRs.
7748         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7749         call to IFN_FMA instead of an FMA_EXPR.
7751 2018-05-17  Jim Wilson  <jimw@sifive.com>
7753         * expr.c (do_tablejump): When converting index to Pmode, if we have a
7754         sign extended promoted subreg, and the range does not have the sign bit
7755         set, then do a sign extend.
7757         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7758         test, check for sign extended subreg and/or constant operands, and
7759         do a sign extend in that case.
7761 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
7763         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7764         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7765         Add untyped.
7766         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7767         Change logics_shift_reg to logics_shift_imm.
7768         (thunderx2t99_fp_loadpair_basic): Delete.
7769         (thunderx2t99_fp_storepair_basic): Delete.
7770         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7771         (thunderx2t99_asimd_polynomial): Delete.
7772         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7773         and neon_fp_mul_d_scalar_q.
7774         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7775         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7776         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7777         (thunderx2t99_asimd_lut): Add missing tbl types.
7778         (thunderx2t99_asimd_ext): Delete.
7779         (thunderx2t99_asimd_load1_1_mult): Delete.
7780         (thunderx2t99_asimd_load1_2_mult): Delete.
7781         (thunderx2t99_asimd_load1_ldp): New.
7782         (thunderx2t99_asimd_load1): New.
7783         (thunderx2t99_asimd_load2): Add missing *load2* types.
7784         (thunderx2t99_asimd_load3): New.
7785         (thunderx2t99_asimd_load4): New.
7786         (thunderx2t99_asimd_store1_1_mult): Delete.
7787         (thunderx2t99_asimd_store1_2_mult): Delete.
7788         (thunderx2t99_asimd_store2_mult): Delete.
7789         (thunderx2t99_asimd_store2_onelane): Delete.
7790         (thunderx2t99_asimd_store_stp): New.
7791         (thunderx2t99_asimd_store1): New.
7792         (thunderx2t99_asimd_store2): New.
7793         (thunderx2t99_asimd_store3): New.
7794         (thunderx2t99_asimd_store4): New.
7796 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
7798         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7799         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
7801 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
7802             Segher Boessenkool  <segher@kernel.crashing.org>
7804         PR target/85698
7805         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7806         operand.
7808 2018-05-17  Richard Biener  <rguenther@suse.de>
7810         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7811         for pruning loop and prune defs feeding only already visited PHIs.
7813 2018-05-17  Richard Biener  <rguenther@suse.de>
7815         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7817 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
7818             Richard Biener  <rguenther@suse.de>
7820         PR tree-optimization/85793
7821         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7822         for VMAT_ELEMENTWISE.
7824 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7826         * internal-fn.h (lookup_internal_fn): Declare
7827         * internal-fn.c (lookup_internal_fn): New function.
7828         * gimple.c (gimple_build_call_from_tree): Handle calls to
7829         internal functions.
7830         * gimple-pretty-print.c (dump_gimple_call): Print "." before
7831         internal function names.
7832         * tree-pretty-print.c (dump_generic_node): Likewise.
7833         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7835 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7837         * gimple-fold.h (gimple_build): Make the function forms take
7838         combined_fn rather than built_in_function.
7839         (gimple_simplify): Likewise.
7840         * gimple-match-head.c (gimple_simplify): Likewise.
7841         * gimple-fold.c (gimple_build): Likewise.
7842         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7843         rather than gimple_build_call_internal.
7844         (get_initial_defs_for_reduction): Likewise.
7845         (vect_create_epilog_for_reduction): Likewise.
7846         (vectorizable_live_operation): Likewise.
7848 2018-05-17  Martin Liska  <mliska@suse.cz>
7850         * gimple-ssa-sprintf.c (format_directive): Do not use
7851         space in between 'G_' and '('.
7853 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
7855         PR target/85323
7856         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7857         even if the mask is not all ones.
7859         PR target/85323
7860         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7861         vector.
7862         (ix86_gimple_fold_builtin): Likewise.
7864         PR target/85323
7865         * config/i386/i386.c: Include tree-vector-builder.h.
7866         (ix86_vector_shift_count): New function.
7867         (ix86_fold_builtin): Fold shift builtins by scalar count.
7868         (ix86_gimple_fold_builtin): Likewise.
7870         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7871         _mm512_setzero): New intrinsics.
7873 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
7874             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7876         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7877         code generation for cases where splatting a value is not useful.
7878         * simplify-rtx.c (simplify_ternary_operation): Simplify
7879         vec_merge across a vec_duplicate and a paradoxical subreg forming
7880         a vector mode to a vec_concat.
7882 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
7884         * config.gcc: Support "goldmont-plus".
7885         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7886         "goldmont-plus".
7887         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7888         PROCESSOR_GOLDMONT_PLUS.
7889         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7890         (processor_target_table): Add "goldmont-plus".
7891         (PTA_GOLDMONT_PLUS): Define.
7892         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7893         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7894         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7895         (fold_builtin_cpu): Add "goldmont-plus".
7896         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7897         (ix86_option_override_internal): Add "goldmont-plus".
7898         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7899         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7900         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7901         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7903 2018-05-17  Richard Biener  <rguenther@suse.de>
7905         PR tree-optimization/85757
7906         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7907         remove defs that only feed that PHI from further processing.
7909 2018-05-16  Jim Wilson  <jimw@sifive.com>
7911         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7912         asterisk to name.
7913         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7915 2018-05-16  Mark Wielaard  <mark@klomp.org>
7917         * dwarf2out.c (count_index_strings): New function.
7918         (output_indirect_strings): Call count_index_strings and generate
7919         header for dwarf_version >= 5.
7921 2018-05-16  Mark Wielaard  <mark@klomp.org>
7923         * dwarf2out.c (dwarf_FORM): New function.
7924         (set_indirect_string): Use dwarf_FORM.
7925         (reset_indirect_string): Likewise.
7926         (size_of_die): Likewise.
7927         (value_format): Likewise.
7928         (output_die): Likewise.
7929         (add_skeleton_AT_string): Likewise.
7930         (output_macinfo_op): Likewise.
7931         (index_string): Likewise.
7932         (output_index_string_offset): Likewise.
7933         (output_index_string): Likewise.
7934         (count_index_strings): Likewise.
7936 2018-05-16  Carl Love  <cel@us.ibm.com>
7938         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7939         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7941 2018-05-16  Martin Jambor  <mjambor@suse.cz>
7943         * ipa-prop.c (ipa_free_all_edge_args): Remove.
7944         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7946 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
7948         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7949         (fnma<mode>4): Likewise.
7950         (fms<mode>4): Likewise.
7951         (fnms<mode>4): Likewise.
7952         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7953         (aarch64_fnma<mode>4): Likewise.
7954         (aarch64_fms<mode>4): Likewise.
7955         (aarch64_fnms<mode>4): Likewise.
7956         (aarch64_fnmadd<mode>4): Likewise.
7958 2018-05-16  Jason Merrill  <jason@redhat.com>
7960         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
7962 2018-05-16  Richard Biener  <rguenther@suse.de>
7964         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7965         (dump_stmt_cost): Declare.
7966         (add_stmt_cost): Dump cost we add.
7967         (add_stmt_costs): New function.
7968         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7969         No longer exported.
7970         (vect_analyze_stmt): Adjust prototype.
7971         (vectorizable_condition): Likewise.
7972         (vectorizable_live_operation): Likewise.
7973         (vectorizable_reduction): Likewise.
7974         (vectorizable_induction): Likewise.
7975         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7976         cost vector to pass to vectorizable_ and record afterwards.
7977         (vect_model_reduction_cost): Take cost vector argument and adjust.
7978         (vect_model_induction_cost): Likewise.
7979         (vectorizable_reduction): Likewise.
7980         (vectorizable_induction): Likewise.
7981         (vectorizable_live_operation): Likewise.
7982         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7983         SLP_TREE_NUMBER_OF_VEC_STMTS.
7984         (vect_analyze_slp_cost_1): Remove.
7985         (vect_analyze_slp_cost): Likewise.
7986         (vect_slp_analyze_node_operations): Take visited args and
7987         a target cost vector.  Avoid processing already visited stmt sets.
7988         (vect_slp_analyze_operations): Use a local cost vector to gather
7989         costs and register those of non-discarded instances.
7990         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7991         (vect_schedule_slp_instance): Remove copying of
7992         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
7993         zero.
7994         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7995         adding cost.  Record cost entry location.
7996         (vect_prologue_cost_for_slp_op): Function to compute cost of
7997         a constant or invariant generated for SLP vect in the prologue,
7998         split out from vect_analyze_slp_cost_1.
7999         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
8000         (vect_model_promotion_demotion_cost): Likewise.
8001         (vect_model_store_cost): Likewise, make static.
8002         (vect_model_load_cost): Likewise.
8003         (vectorizable_bswap): Add cost vector arg and adjust.
8004         (vectorizable_call): Likewise.
8005         (vectorizable_simd_clone_call): Likewise.
8006         (vectorizable_conversion): Likewise.
8007         (vectorizable_assignment): Likewise.
8008         (vectorizable_shift): Likewise.
8009         (vectorizable_operation): Likewise.
8010         (vectorizable_store): Likewise.
8011         (vectorizable_load): Likewise.
8012         (vectorizable_condition): Likewise.
8013         (vectorizable_comparison): Likewise.
8014         (can_vectorize_live_stmts): Likewise.
8015         (vect_analyze_stmt): Likewise.
8016         (vect_transform_stmt): Adjust calls to vectorizable_*.
8017         * tree-vectorizer.c: Include gimple-pretty-print.h.
8018         (dump_stmt_cost): New function.
8020 2018-05-16  Richard Biener  <rguenther@suse.de>
8022         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8023         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8024         * tree-ssa-dse.c: Include tree-ssa-loop.h.
8025         (check_name): New callback.
8026         (dse_classify_store): Track cycles via a visited bitmap of PHI
8027         defs and simplify handling of in-loop and across loop dead stores
8028         and properly fail for loop-variant refs.  Handle byte-tracking with
8029         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8030         limiting the walk.
8032 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
8034         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8035         (vect_get_mask_type_for_stmt): Likewise.
8036         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8037         split out from...
8038         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
8039         to determine the statement's vector type and the vector type that
8040         should be used for calculating nunits.  Deal with cases in which
8041         the type has to be deferred.
8042         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8043         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8044         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8045         (vect_determine_vf_for_stmt): New functions, split out from...
8046         (vect_determine_vectorization_factor): ...here.
8047         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8048         (vect_get_mask_type_for_stmt): New functions, split out from
8049         vect_determine_vectorization_factor.
8051 2018-05-16  Richard Biener  <rguenther@suse.de>
8053         * tree-cfg.c (verify_gimple_assign_ternary): Properly
8054         verify the [VEC_]COND_EXPR embedded comparison.
8056 2018-05-15  Martin Sebor  <msebor@redhat.com>
8058         PR tree-optimization/85753
8059         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8060         RECORD_TYPE in addition to ARRAY_TYPE.
8062 2018-05-15  Martin Sebor  <msebor@redhat.com>
8064         PR middle-end/85643
8065         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8067 2018-05-15  Richard Biener  <rguenther@suse.de>
8069         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8070         add by_clobber_p one.  Change algorithm to collect all defs
8071         representing uses we need to walk and try reducing them to
8072         a single one before failing.
8073         (dse_dom_walker::dse_optimize_stmt): Adjust.
8075 2018-05-13  Mark Wielaard  <mark@klomp.org>
8077         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8078         (size_of_loc_descr): Likewise.
8079         (output_loc_operands): Likewise.
8080         (output_loc_operands_raw): Likewise.
8081         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8082         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8083         (hash_loc_operands): Likewise.
8084         (compare_loc_operands): Likewise.
8086 2018-05-14  Mark Wielaard  <mark@klomp.org>
8088         * dwarf2out.c (count_index_addrs): New function.
8089         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8091 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8093         PR tree-optimization/83648
8094         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8095         return value as malloc candidate.
8097 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8099         PR ipa/85734
8100         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8101         param as true in call to suggest_attribute.
8103 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
8105         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8106         -mreadonly-in-sdata.
8108 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8110         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8111         New pattern.
8112         (aarch64_crypto_aesd_fused): Likewise.
8114 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
8116         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8117         (movsi_aarch64): Likewise.
8118         (load_pairsi): Likewise.
8119         (load_pairdi): Likewise.
8120         (store_pairsi): Likewise.
8121         (store_pairdi): Likewise.
8122         (load_pairsf): Likewise.
8123         (load_pairdf): Likewise.
8124         (store_pairsf): Likewise.
8125         (store_pairdf): Likewise.
8126         (zero_extend): Likewise.
8127         (trunc): Swap alternatives.
8128         (fcvt_target): Add '?' to prefer w over r.
8130 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
8132         PR target/85756
8133         * config/i386/i386.md: Disallow non-commutative arithmetics in
8134         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8135         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
8136         in the peephole2 before it.
8138 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
8140         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8141         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8142         (ix86_handle_option): Handle -mcldemote.
8143         * config.gcc: New header.
8144         * config/i386/cldemoteintrin.h: New file.
8145         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8146         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8147         -mcldemote.
8148         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8149         OPTION_MASK_ISA_CLDEMOTE.
8150         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8151         (ix86_valid_target_attribute_inner_p): Ditto.
8152         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8153         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8154         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8155         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8156         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8157         (cldemote): New.
8158         * config/i386/i386.opt: Add -mcldemote.
8159         * config/i386/x86intrin.h: New header.
8160         * doc/invoke.texi: Add -mcldemote.
8162 2018-05-14  Richard Biener  <rguenther@suse.de>
8164         * doc/match-and-simplify.texi: Adjust :s documentation.
8166 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
8168         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8169         intended memcpy size.
8170         (REORDER_45): Likewise.
8172 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
8174         * sort.cc: New file.
8175         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8176         * vec.c (qsort_chk): Use gcc_qsort.
8177         * Makefile.in (OBJS-libcommon): Add sort.o.
8178         (build/sort.o): New target.  Use it...
8179         (BUILD_RTL): ... here, and...
8180         (build/gencfn-macros): ... here, and...
8181         (build/genmatch): ... here.
8183 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8184             Chung-Ju Wu  <jasonwucj@gmail.com>
8186         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8187         * config/nds32/nds32-graywolf.md: New file.
8188         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8189         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8190         pipeline.
8191         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8192         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8193         * config/nds32/nds32.md (pipeline_model): Add graywolf.
8194         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8195         * config/nds32/pipelines.md: Include n15 settings.
8197 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8198             Chung-Ju Wu  <jasonwucj@gmail.com>
8200         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8201         * config/nds32/nds32-n13.md: New file.
8202         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8203         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8204         pipeline.
8205         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8206         * config/nds32/nds32.md (pipeline_model): Add n13.
8207         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
8208         * config/nds32/pipelines.md: Include n13 settings.
8210 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8211             Chung-Ju Wu  <jasonwucj@gmail.com>
8213         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
8214         * config/nds32/nds32-n10.md: New file.
8215         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
8216         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
8217         pipeline.
8218         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
8219         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
8220         * config/nds32/nds32.md (pipeline_model): Add n10.
8221         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
8222         * config/nds32/pipelines.md: Include n10 settings.
8224 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
8225             Kito Cheng  <kito.cheng@gmail.com>
8226             Chung-Ju Wu  <jasonwucj@gmail.com>
8228         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
8229         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8230         Add enum values for DSP extension instructions.
8231         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
8232         New constraints.
8233         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
8234         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
8235         New code iterators.
8236         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
8237         * config/nds32/nds32-dspext.md: New file for DSP implementation.
8238         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
8239         * config/nds32/nds32-intrinsic.md: Likewise.
8240         * config/nds32/nds32_intrinsic.h: Likewise.
8241         * config/nds32/nds32-md-auxiliary.c: Likewise.
8242         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
8243         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
8244         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
8245         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
8246         * config/nds32/nds32-protos.h: New declarations for DSP extension.
8247         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
8248         TYPE_DMAC in switch statement.
8249         * config/nds32/nds32.c: New checking and implementation for DSP
8250         extension instructions.
8251         * config/nds32/nds32.h: Likewise.
8252         * config/nds32/nds32.md: Likewise.
8253         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
8254         * config/nds32/predicates.md: Implement new predicates for DSP
8255         extension.
8257 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
8259         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
8260         Reformat alternatives and attributes so it is easier to identify
8261         which constraints/attributes go with which instruction.
8262         (mov<mode>_hardfloat32, FMOVE64): Likewise.
8263         (mov<mode>_softfloat32, FMOVE64): Likewise.
8264         (mov<mode>_hardfloat64, FMOVE64): Likewise.
8265         (mov<mode>_softfloat64, FMOVE64): Likewise.
8267 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8269         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8270         subsection.
8271         (Basic PowerPC Built-in Functions): The new name of the
8272         subsection previously known as "PowerPC Built-in Functions".
8273         (Basic PowerPC Built-in Functions Available on all Configurations):
8274         New subsubsection.
8275         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
8276         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
8277         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
8278         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
8280 2018-05-11  Martin Jambor  <mjambor@suse.cz>
8282         PR ipa/85655
8283         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
8284         single const.
8286 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8288         PR target/85733
8289         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8291 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
8293         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8294         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8295         (ix86_handle_option): Handle -mwaitpkg.
8296         * config.gcc: New header.
8297         * config/i386/cpuid.h (bit_WAITPKG): New bit.
8298         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8299         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8300         function type.
8301         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8302         OPTION_MASK_ISA_WAITPKG.
8303         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8304         (ix86_option_override_internal): Add PTA_WAITPKG.
8305         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8306         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8307         IX86_BUILTIN_TPAUSE.
8308         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8309         __builtin_ia32_umwait and __builtin_ia32_tpause.
8310         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8311         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8312         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8313         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8314         UNSPECV_TPAUSE): New.
8315         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8316         * config/i386/i386.opt: Add -mwaitpkg.
8317         * config/i386/waitpkgintrin.h: New file.
8318         * config/i386/x86intrin.h: New header.
8319         * doc/invoke.texi: Add -mwaitpkg.
8321 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8323         PR target/85606
8324         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8325         equivalent.
8326         (cortex-m0): Use armv6s-m isa.
8327         (cortex-m0plus): Likewise.
8328         (cortex-m1): Likewise.
8329         (cortex-m0.small-multiply): Likewise.
8330         (cortex-m0plus.small-multiply): Likewise.
8331         (cortex-m1.small-multiply): Likewise.
8333 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
8334             Jakub Jelinek  <jakub@redhat.com>
8336         PR tree-optimization/85692
8337         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8338         source permute as well.
8340 2018-05-11  Martin Liska  <mliska@suse.cz>
8342         PR sanitizer/85556
8343         * doc/extend.texi: Document LLVM style format for no_sanitize
8344         attribute.
8346 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
8348         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8349         mode_supports_vsx_dform_quad to mode_supports_dq_form.
8350         (mode_supports_vsx_dform_quad): Likewise.
8351         (mode_supports_vmx_dform): Move these functions to be next to the
8352         other mode_supports functions.
8353         (mode_supports_dq_form): Likewise.
8354         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8355         mode_supports_dq_form.
8356         (reg_offset_addressing_ok_p): Likewise.
8357         (offsettable_ok_by_alignment): Likewise.
8358         (rs6000_legitimate_offset_address_p): Likewise.
8359         (legitimate_lo_sum_address_p): Likewise.
8360         (rs6000_legitimize_address): Likewise.
8361         (rs6000_legitimize_reload_address): Likewise.
8362         (rs6000_secondary_reload_inner): Likewise.
8363         (rs6000_preferred_reload_class): Likewise.
8364         (rs6000_output_move_128bit): Likewise.
8366 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8368         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8369         Generate SImode target register for null target.
8370         <case IX86_BUILTIN_XGETBV>: Ditto.
8371         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8372         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8374 2018-05-10  Carl Love  <cel@us.ibm.com>
8376         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8377         dcbtt and dcbtstt if operands[2] is 0.
8379 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8381         PR target/85693
8382         * config/i386/sse.md (usadv64qi): New expander.
8384 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
8386         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8387         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8388         -maltivec=be support.
8389         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8390         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8391         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8392         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8393         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8394         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8395         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8396         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8397         altivec_vsumsws): Adjust.
8398         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8399         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8400         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8401         support.
8402         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8403         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8404         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8405         (altivec_lve<VI_char>x): Delete expand.
8406         (*altivec_lve<VI_char>x_internal): Rename to...
8407         (altivec_lve<VI_char>x): ... this.
8408         (altivec_lvxl_<mode>): Delete expand.
8409         (*altivec_lvxl_<mode>_internal): Rename to ...
8410         (altivec_lvxl_<mode>): ... this.
8411         (altivec_stvxl_<mode>): Delete expand.
8412         (*altivec_stvxl_<mode>_internal): Rename to ...
8413         (altivec_stvxl_<mode>): ... this.
8414         (altivec_stve<VI_char>x): Delete expand.
8415         (*altivec_stve<VI_char>x_internal): Rename to ...
8416         (altivec_stve<VI_char>x): ... this.
8417         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8418         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8419         reduc_plus_scal_<mode>): Adjust.
8420         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8421         comment.
8422         (rs6000_cpu_cpp_builtins): Adjust.
8423         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8424         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8425         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8426         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8427         -maltivec=be support.
8428         (rs6000_split_vec_extract_var): Adjust.
8429         (rs6000_split_v4si_init): Adjust.
8430         (swap_selector_for_mode): Delete.
8431         (altivec_expand_lvx_be, altivec_expand_stvx_be,
8432         altivec_expand_stvex_be): Delete.
8433         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8434         -maltivec=be support.
8435         (rs6000_gimple_fold_builtin): Ditto.
8436         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8437         Adjust.
8438         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8439         (TARGET_DIRECT_MOVE_64BIT): Adjust.
8440         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8441         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8442         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8443         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8444         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8445         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8446         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8447         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8448         anonymous split): Adjust.
8449         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8450         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8452 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
8454         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8455         when --with-gxx-include-dir is also specified.
8456         * configure: Regenerate.
8458 2018-05-09  Jim Wilson  <jimw@sifive.com>
8460         PR target/84797
8461         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8462         * config/riscv/t-withmultilib: New.
8463         * config/riscv/withmultilib.h: New.
8464         * doc/install.texi: Document RISC-V --with-multilib-list support.
8466 2018-05-09  Richard Biener  <rguenther@suse.de>
8468         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8469         vector.
8470         (vect_bb_vectorization_profitable_p): Adjust.  Compute
8471         actual scalar cost using the cost vector and the add_stmt_cost
8472         machinery.
8474 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8476         PR rtl-optimization/85645
8477         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8478         in the REG_CFA_REGISTER note for LR, don't leave it empty.
8480 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8482         PR rtl-optimization/85645
8483         * shrink-wrap.c (spread_components): Return a boolean saying if
8484         anything was changed.
8485         (try_shrink_wrapping_separate): Iterate spread_components until
8486         nothing changes anymore.
8488 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8490         PR rtl-optimization/85645
8491         * regrename.c (build_def_use): Also kill the chains that include the
8492         destination of a REG_CFA_REGISTER note.
8494 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8496         PR rtl-optimization/85645
8497         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8498         insn that has a REG_CFA_REGISTER note.
8500 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
8502         * cfgexpand.c (expand_clobber): New function.
8503         (expand_gimple_stmt_1): Use it.
8504         * tree-vect-stmts.c (vect_clobber_variable): New function,
8505         split out from...
8506         (vectorizable_simd_clone_call): ...here.
8507         (vectorizable_store): Emit a clobber either side of an
8508         IFN_STORE_LANES sequence.
8509         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8511 2018-05-09  Tom de Vries  <tom@codesourcery.com>
8513         PR target/85626
8514         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8515         (define_insn "trap_if_false"): Add exit after trap.
8517 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
8519         PR rtl-optimization/85638
8520         * bb-reorder.c: Include common/common-target.h.
8521         (create_forwarder_block): New function extracted from...
8522         (fix_up_crossing_landing_pad): ...here.  Rename into...
8523         (dw2_fix_up_crossing_landing_pad): ...this.
8524         (sjlj_fix_up_crossing_landing_pad): New function.
8525         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8526         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8527         from both partitions and exit the loop after one iteration.
8529 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8531         Revert:
8532         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8533         subsection.
8534         (Basic PowerPC Built-in Functions): The new name of the
8535         subsection previously known as "PowerPC Built-in Functions".
8536         (Basic PowerPC Built-in Functions Available on all Configurations):
8537         New subsubsection.
8538         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8539         subsubsection.
8540         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8541         subsubsection.
8542         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8543         subsubsection.
8544         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8545         subsubsection.
8547 2018-05-08  Jim Wilson  <jimw@sifive.com>
8549         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8550         (LD_EMUL_SUFFIX): New.
8551         (LINK_SPEC): Use it.
8553 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8555         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8556         subsection.
8557         (Basic PowerPC Built-in Functions): The new name of the
8558         subsection previously known as "PowerPC Built-in Functions".
8559         (Basic PowerPC Built-in Functions Available on all Configurations):
8560         New subsubsection.
8561         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8562         subsubsection.
8563         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8564         subsubsection.
8565         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8566         subsubsection.
8567         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8568         subsubsection.
8570 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
8572         PR target/85683
8573         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8574         after cmpelim optimization.
8576 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
8578         * config.gcc: Support "goldmont".
8579         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8580         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8581         PROCESSOR_GOLDMONT.
8582         * config/i386/i386.c (m_GOLDMONT): Define.
8583         (processor_target_table): Add "goldmont".
8584         (PTA_GOLDMONT): Define.
8585         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8586         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8587         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8588         (fold_builtin_cpu): Add "goldmont".
8589         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8590         (ix86_option_override_internal): Add "goldmont".
8591         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8592         (processor_type): Add PROCESSOR_GOLDMONT.
8593         * config/i386/i386.md: Add CPU "glm".
8594         * config/i386/glm.md: New file.
8595         * config/i386/x86-tune.def: Add m_GOLDMONT.
8596         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8598 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
8600         PR target/85572
8601         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8602         E_V4DImode.
8603         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8604         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
8605         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
8607         PR target/85317
8608         * config/i386/i386.c (ix86_fold_builtin): Handle
8609         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8611         PR target/85480
8612         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8613         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8615 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
8617         PR target/85658
8618         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8619         (check_arch): Likewise.
8620         (check_fpu): Return the result rather than printing it.
8621         (end arch): Fix operator precedence.
8622         (end cpu): Likewise.
8623         (END): Print the result from check_fpu.
8625 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
8626             Alan Hayward  <alan.hayward@arm.com>
8627             David Sherwood  <david.sherwood@arm.com>
8629         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8630         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8631         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8632         (*fcmuo<mode>_and): New patterns.
8634 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
8636         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8637         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8638         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8639         (cmp_op, sve_imm_con): New code attributes.
8640         (SVE_COND_INT_CMP, imm_con): Delete.
8641         (cmp_op): Remove above unspecs from int attribute.
8642         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8643         to...
8644         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
8645         comparison-specific unspecs.
8646         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8647         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8648         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8649         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8650         (*vec_fcm<cmp_op><mode>): Rename to...
8651         (*fcm<cmp_op><mode>): ...this and adjust likewise.
8652         (*vec_fcmuo<mode>): Rename to...
8653         (*fcmuo<mode>): ...this and adjust likewise.
8654         (*pred_fcm<cmp_op><mode>): New pattern.
8655         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8656         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8657         functions.
8658         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8659         and UNORDERED.
8660         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8661         (aarch64_emit_sve_predicated_cond): New function.
8662         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8663         (aarch64_emit_unspec_cond_or): Replace with...
8664         (aarch64_emit_sve_or_conds): ...this new function.  Use
8665         aarch64_emit_sve_ptrue_op for the individual comparisons and
8666         aarch64_emit_binop to OR them together.
8667         (aarch64_emit_inverted_unspec_cond): Replace with...
8668         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
8669         aarch64_emit_sve_ptrue_op for the comparison and
8670         aarch64_emit_unop to invert the result.
8671         (aarch64_expand_sve_vec_cmp_float): Update after the above
8672         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
8674 2018-05-07  Nathan Sidwell  <nathan@acm.org>
8676         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8677         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8678         (Backwards Compatibility): Likewise.
8680 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8682         PR bootstrap/85681
8683         Revert:
8684         2018-05-07  Luis Machado  <luis.machado@linaro.org>
8686         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8687         <prefetch_dynamic_strides>: New const bool field.
8688         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8689         prefetch_dynamic_strides.
8690         (exynosm1_prefetch_tune): Likewise.
8691         (thunderxt88_prefetch_tune): Likewise.
8692         (thunderx_prefetch_tune): Likewise.
8693         (thunderx2t99_prefetch_tune): Likewise.
8694         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8695         to false.
8696         (aarch64_override_options_internal): Update to set
8697         PARAM_PREFETCH_DYNAMIC_STRIDES.
8698         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8699         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8700         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8701         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8702         prefetch-dynamic-strides setting.
8704         2018-05-07  Luis Machado  <luis.machado@linaro.org>
8706         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8707         <minimum_stride>: New const int field.
8708         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8709         minimum_stride field.
8710         (exynosm1_prefetch_tune): Likewise.
8711         (thunderxt88_prefetch_tune): Likewise.
8712         (thunderx_prefetch_tune): Likewise.
8713         (thunderx2t99_prefetch_tune): Likewise.
8714         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8715         (aarch64_override_options_internal): Update to set
8716         PARAM_PREFETCH_MINIMUM_STRIDE.
8717         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8718         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8719         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8720         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8721         stride is constant and is below the minimum stride threshold.
8723 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8725         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8726         to 512.
8728 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8730         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8731         <prefetch_dynamic_strides>: New const bool field.
8732         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8733         prefetch_dynamic_strides.
8734         (exynosm1_prefetch_tune): Likewise.
8735         (thunderxt88_prefetch_tune): Likewise.
8736         (thunderx_prefetch_tune): Likewise.
8737         (thunderx2t99_prefetch_tune): Likewise.
8738         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8739         to false.
8740         (aarch64_override_options_internal): Update to set
8741         PARAM_PREFETCH_DYNAMIC_STRIDES.
8742         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8743         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8744         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8745         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8746         prefetch-dynamic-strides setting.
8748 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8750         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8751         <minimum_stride>: New const int field.
8752         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8753         minimum_stride field.
8754         (exynosm1_prefetch_tune): Likewise.
8755         (thunderxt88_prefetch_tune): Likewise.
8756         (thunderx_prefetch_tune): Likewise.
8757         (thunderx2t99_prefetch_tune): Likewise.
8758         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8759         (aarch64_override_options_internal): Update to set
8760         PARAM_PREFETCH_MINIMUM_STRIDE.
8761         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8762         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8763         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8764         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8765         stride is constant and is below the minimum stride threshold.
8767 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
8769         PR c++/85659
8770         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8771         the type is addressable.  Don't force op into register if it has
8772         BLKmode.
8774 2018-05-05  Roland McGrath  <mcgrathr@google.com>
8776         PR other/77609
8777         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8778         any section for which we don't know a specific type it should have,
8779         regardless of name.  Previously this was done only for the exact
8780         names ".init_array", ".fini_array", and ".preinit_array".
8781         (default_elf_asm_named_section): Add comment about
8782         relationship with default_section_type_flags and SECTION_NOTYPE.
8783         (get_section): Don't consider it a type conflict if one side has
8784         SECTION_NOTYPE and the other doesn't, as long as neither has the
8785         SECTION_BSS et al used in the default_section_type_flags logic.
8787 2018-05-05  Tom de Vries  <tom@codesourcery.com>
8789         PR target/85653
8790         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8791         (workaround_barsyncs): New function.
8792         (nvptx_reorg): Use workaround_barsyncs.
8793         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8794         (define_expand "nvptx_membar_cta"): New define_expand.
8795         (define_insn "*nvptx_membar_cta"): New insn.
8797 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
8799         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8800         To improve optimization opportunities.
8801         * builtin-types.def: The new needed builtin types for the above.
8803 2018-05-04  Richard Biener  <rguenther@suse.de>
8805         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8806         * gimple-ssa-store-merging.c
8807         (imm_store_chain_info::output_merged_store): Remove redundant create,
8808         release split_store vector contents on failure.
8809         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8810         scalar stmt vector on cache hit.
8812 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
8814         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8815         Xilinx FP support.
8816         * config.gcc (powerpc-xilinx-eabi*): Remove.
8817         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8818         support.
8819         (fusion_addis_mem_combo_load): Ditto.
8820         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8821         FP support.
8822         (rs6000_cpu_cpp_builtins): Ditto.
8823         * config/rs6000/rs6000-linux.c
8824         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8825         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8826         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8827         support.
8828         (rs6000_setup_reg_addr_masks): Ditto.
8829         (rs6000_init_hard_regno_mode_ok): Ditto.
8830         (rs6000_option_override_internal): Ditto.
8831         (legitimate_lo_sum_address_p): Ditto.
8832         (rs6000_legitimize_address): Ditto.
8833         (rs6000_legitimize_reload_address): Ditto.
8834         (rs6000_legitimate_address_p): Ditto.
8835         (abi_v4_pass_in_fpr): Ditto.
8836         (setup_incoming_varargs): Ditto.
8837         (rs6000_gimplify_va_arg): Ditto.
8838         (rs6000_split_multireg_move): Ditto.
8839         (rs6000_savres_strategy): Ditto.
8840         (rs6000_emit_prologue_components): Ditto.
8841         (rs6000_emit_epilogue_components): Ditto.
8842         (rs6000_emit_prologue): Ditto.
8843         (rs6000_emit_epilogue): Ditto.
8844         (rs6000_elf_file_end): Ditto.
8845         (rs6000_function_value): Ditto.
8846         (rs6000_libcall_value): Ditto.
8847         * config/rs6000/rs6000.h: Ditto.
8848         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8849         (TARGET_MINMAX): ... this.  New.
8850         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8851         * config/rs6000/rs6000.md: Remove Xilinx FP support.
8852         (*movsi_internal1_single): Delete.
8853         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8854         mfpu=, mxilinx-fpu): Delete.
8855         * config/rs6000/singlefp.h: Delete.
8856         * config/rs6000/sysv4.h: Remove Xilinx FP support.
8857         * config/rs6000/t-rs6000: Ditto.
8858         * config/rs6000/t-xilinx: Delete.
8859         * config/rs6000/titan.md: Adjust for fp_type removal.
8860         * config/rs6000/vsx.md: Remove Xilinx FP support.
8861         (VStype_simple): Delete.
8862         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8863         * config/rs6000/xfpu.h: Delete.
8864         * config/rs6000/xfpu.md: Delete.
8865         * config/rs6000/xilinx.h: Delete.
8866         * config/rs6000/xilinx.opt: Delete.
8867         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8868         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8870 2018-05-04  Tom de Vries  <tom@codesourcery.com>
8872         PR libgomp/85639
8873         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8874         if ignore == 0.
8876 2018-05-04  Richard Biener  <rguenther@suse.de>
8878         PR middle-end/85627
8879         * tree-complex.c (update_complex_assignment): We are always in SSA form.
8880         (expand_complex_div_wide): Likewise.
8881         (expand_complex_operations_1): Likewise.
8882         (expand_complex_libcall): Preserve EH info of the original stmt.
8883         (tree_lower_complex): Handle removed blocks.
8884         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8885         on complex multiplication and division libcall builtins.
8887 2018-05-04  Richard Biener  <rguenther@suse.de>
8889         PR middle-end/85574
8890         * fold-const.c (negate_expr_p): Restrict negation of operand
8891         zero of a division to when we know that can happen without
8892         overflow.
8893         (fold_negate_expr_1): Likewise.
8895 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
8897         PR libstdc++/85466
8898         * real.h (real_nextafter): Declare.
8899         * real.c (real_nextafter): New function.
8900         * fold-const-call.c (fold_const_nextafter): New function.
8901         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8902         CASE_CFN_NEXTTOWARD.
8903         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8904         even when arg1_mode is different from arg0_mode.
8906 2018-05-03  Nathan Sidwell  <nathan@acm.org>
8908         * doc/extend.texi (Deprecated Features): Remove
8909         -ffriend-injection.
8910         (Backwards Compatibility): Likewise.
8911         * doc/invoke.texi (C++ Language Options): Likewise.
8912         (C++ Dialect Options): Likewise.
8914 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
8916         PR target/85530
8917         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8918         _mm512_mask_mullox_epi64): New intrinsics.
8920 2018-05-03  Tom de Vries  <tom@codesourcery.com>
8922         PR testsuite/85106
8923         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8924         dump files): Add offload-tree.
8926 2018-05-03  Richard Biener  <rguenther@suse.de>
8928         PR tree-optimization/85615
8929         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8930         to loops not nested in BBs loop father to avoid creating multi-entry
8931         loops.
8933 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8935         PR tree-optimization/70291
8936         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8937         arguments.  Change return type to tree.  Emit libcall as a new
8938         statement rather than replacing existing one when inplace_p is true.
8939         (expand_complex_multiplication_components): New function.
8940         (expand_complex_multiplication): Expand floating-point complex
8941         multiplication using the above.
8942         (expand_complex_division): Rename inner_type parameter to type.
8943         Update expand_complex_libcall call-site.
8944         (expand_complex_operations_1): Update expand_complex_multiplication
8945         and expand_complex_division call-sites.
8947 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
8949         PR target/85582
8950         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8951         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8952         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8953         the highest significant bit of the shift count mask is clear.  In
8954         check whether and[sq]i3 is needed verify that all significant bits
8955         of the shift count other than the highest are set.
8957 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8959         PR libgomp/82428
8960         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8961         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8962         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8963         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8964         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8965         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8966         __builtin_goacc_parlevel_size.
8968 2018-05-02  Richard Biener  <rguenther@suse.de>
8970         PR tree-optimization/85597
8971         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8972         do not use split vect_get_vec_defs call but call vect_get_slp_defs
8973         directly.
8975 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8977         PR testsuite/85106
8978         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8979         dump files): Add ltrans-tree.
8981 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8983         PR testsuite/85106
8984         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8985         dump files): Add wpa-ipa.
8987 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
8989         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
8990         powerpc*-*-linux*paired* target.
8991         * config/rs6000/750cl.h: Delete.
8992         * config/rs6000/paired.h: Delete.
8993         * config/rs6000/paired.md: Delete.
8994         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8995         float support.
8996         * config/rs6000/rs6000-builtin.def: Remove paired float support.
8997         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8998         comment.  Remove paired float support.
8999         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9000         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9001         VECTOR_PAIRED.
9002         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9003         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9004         declarations.
9005         * config/rs6000/rs6000.c: Remove paired float support.
9006         (paired_expand_vector_init, paired_expand_vector_move,
9007         paired_emit_vector_compare, paired_emit_vector_cond_expr,
9008         (paired_expand_lv_builtin, paired_expand_stv_builtin,
9009         paired_expand_builtin, paired_expand_predicate_builtin,
9010         paired_init_builtins): Delete.
9011         * config/rs6000/rs6000.h: Remove paired float support.
9012         * config/rs6000/rs6000.md: Remove paired float support.
9013         (move_from_CR_ov_bit): Delete.
9014         * config/rs6000/rs6000.opt (mpaired): Delete.
9015         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9016         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9018 2018-05-02  Richard Biener  <rguenther@suse.de>
9020         PR middle-end/85567
9021         * gimplify.c (gimplify_save_expr): When in SSA form allow
9022         SAVE_EXPRs to compute to SSA vars.
9024 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
9026         PR target/85582
9027         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9028         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9029         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9030         clobber operands[2], instead use a new pseudo.  Formatting fixes.
9032 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
9034         PR tree-optimization/85586
9035         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9036         exit early for statements in the same group if the accesses are
9037         not strided.
9039 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9041         PR lto/85451
9042         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9043         error message.
9045 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
9047         PR tree-optimization/85143
9048         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9050 2018-05-01  Tom de Vries  <tom@codesourcery.com>
9052         PR lto/85451
9053         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9054         not found" error message.
9056 2018-05-01  Tom de Vries  <tom@codesourcery.com>
9058         PR other/83786
9059         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9060         * vec.c (test_ordered_remove_if): New function.
9061         (vec_c_tests): Call test_ordered_remove_if.
9062         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9063         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9064         * tree-vect-patterns.c (vect_pattern_recog_1): Use
9065         VEC_ORDERED_REMOVE_IF.
9067 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9069         PR tree-optimization/82665
9070         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9071         pointer subtraction where arguments come from a memchr call.
9073 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
9075         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9076         --push-state --as-needed and --pop-state instead of --as-needed and
9077         --no-as-needed if ld supports it.
9078         * configure: Regenerated.
9080         PR web/85578
9081         * doc/install.texi2html: Replace _002d with - and _002a with * in
9082         generated html files using sed.
9084 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9086         PR c++/85523
9087         * gcc-rich-location.c (blank_line_before_p): New function.
9088         (use_new_line): New function.
9089         (gcc_rich_location::add_fixit_insert_formatted): New function.
9090         * gcc-rich-location.h
9091         (gcc_rich_location::add_fixit_insert_formatted): New function.
9093 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9095         * selftest.c (assert_streq): Rename "expected" and "actual" to
9096         "val1" and "val2".  Extend NULL-handling to cover both inputs
9097         symmetrically, while still requiring both to be non-NULL for a pass.
9098         * selftest.h (assert_streq): Rename "expected" and "actual" to
9099         "val1" and "val2".
9100         (ASSERT_EQ): Likewise.
9101         (ASSERT_EQ_AT): Likewise.
9102         (ASSERT_KNOWN_EQ): Likewise.
9103         (ASSERT_KNOWN_EQ_AT): Likewise.
9104         (ASSERT_NE): Likewise.
9105         (ASSERT_MAYBE_NE): Likewise.
9106         (ASSERT_MAYBE_NE_AT): Likewise.
9107         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
9108         the assertion to pass.
9109         (ASSERT_STREQ_AT): Likewise.
9111 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
9113         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9114         interaction with -pie.
9116 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9118         * selftest.h: Fix alphabetization of per-source-file selftest
9119         declarations.
9121 2018-04-30  Jason Merrill  <jason@redhat.com>
9123         PR c++/61982 - dead stores to destroyed objects.
9124         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9125         of clobber.
9127 2018-04-30  Jason Merrill  <jason@redhat.com>
9129         * tree.c (build_clobber): New.
9130         * tree.h: Declare it.
9131         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9133 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9135         * diagnostic-show-locus.c (layout::layout): Update for
9136         location_get_source_line returning a char_span.
9137         (struct char_span): Move to input.h.
9138         (struct correction): Update for fields in char_span becoming
9139         private.
9140         (struct source_line): Update for location_get_source_line
9141         returning a char_span.
9142         (layout::print_line): Likewise.
9143         * edit-context.c (edited_file::print_content): Likewise.
9144         (edited_file::print_diff_hunk): Likewise.
9145         (edited_file::print_run_of_changed_lines): Likewise.
9146         (edited_file::get_num_lines): Likewise.
9147         (edited_line::edited_line): Likewise.
9148         * final.c (asm_show_source): Likewise.
9149         * input.c (location_get_source_line): Convert return type
9150         from const char * to char_span, losing the final "line_len"
9151         param.
9152         (dump_location_info): Update for the above.
9153         (get_substring_ranges_for_loc): Likewise.  Use a char_span
9154         when handling the literal within the line.
9155         (test_reading_source_line): Update for location_get_source_line
9156         returning a char_span.
9157         * input.h (class char_span): Move here from
9158         diagnostic-show-locus.c, converting from a struct to a class.
9159         Make data members private.
9160         (char_span::operator bool): New.
9161         (char_span::length): New.
9162         (char_span::get_buffer): New.
9163         (char_span::operator[]): New.
9164         (char_span::subspan): Make const.
9165         (char_span::xstrdup): New.
9166         (location_get_source_line): Convert return type from const char *
9167         to char_span, losing the final "line_size" param.
9169 2018-04-30  Jan Hubicka  <jh@suse.cz>
9171         * lto-wrapper.c (ltrans_priorities): New static var.
9172         (cmp_priority): New.
9173         (run_gcc): Read priorities and if doing parallel build order
9174         the Makefile by them.
9176 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9178         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9180 2018-04-30  Richard Biener  <rguenther@suse.de>
9182         * tree-cfg.c (verify_address): Remove base argument, add
9183         flag whether to check TREE_ADDRESSABLE and do that.
9184         (verify_expr): Remove.
9185         (verify_types_in_gimple_reference): Add pieces from verify_expr.
9186         (verify_gimple_assign_single): Likewise.
9187         (verify_gimple_switch): Likewise.
9188         (verify_expr_location_1): Dereference tp once.  Add (disabled)
9189         piece from verify_expr.
9190         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9192 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9194         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9196 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9198         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9199         (small_data_pattern): Likewise.
9200         (arc_rewrite_small_data): Likewise.
9201         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9202         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9203         (get_symbol_alignment): New function.
9204         (legitimate_small_data_address_p): Likewise.
9205         (legitimate_scaled_address): Update, call
9206         legitimate_small_data_address_p.
9207         (output_sdata): New static variable.
9208         (arc_print_operand): Update how we handle small data operands.
9209         (arc_print_operand_address): Likewise.
9210         (arc_legitimate_address_p): Update, use
9211         legitimate_small_data_address_p.
9212         (arc_rewrite_small_data_p): Remove.
9213         (arc_rewrite_small_data_1): Likewise.
9214         (arc_rewrite_small_data): Likewise.
9215         (small_data_pattern): Likewise.
9216         (compact_sda_memory_operand): Update to use
9217         legitimate_small_data_address_p and get_symbol_alignment.
9218         (prepare_move_operands): Don't rewite sdata pattern.
9219         (prepare_extend_operands): Remove.
9220         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
9221         pattern.
9222         (zero_extendqisi2): Likewise.
9223         (zero_extendhisi2): Likewise.
9224         (extendqihi2): Likewise.
9225         (extendqisi2): Likewise.
9226         (extendhisi2): Likewise.
9227         (addsi3): Likewise.
9228         (subsi3): Likewise.
9229         (andsi3): Likewise.
9230         * config/arc/constraints.md (Usd): Change it to memory constraint.
9232 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9234         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
9235         as source of std instructions.
9236         * config/arc/arc.md (movsi_insn): Update pattern predicate to
9237         allow 6-bit constants as source for store instructions.
9238         (movdi_insn): Update instruction pattern to allow 6-bit constants
9239         as source for store instructions.
9241 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
9243         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
9245 2018-04-30  Nathan Sidwell  <nathan@acm.org>
9246             Sandra Loosemore <sandra@codesourcery.com>
9248         * dumpfile.c (dump_open): Allow '-' for stdout.
9249         * doc/invoke.texi (Developer Options): Document dump filename
9250         determination early.  Document stdin/stdout selection.
9252 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
9254         Microblaze Target: PIC data text relative
9256         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
9257         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
9258         Add declaration.
9259         * config/microblaze/microblaze.h (microblaze_constant_address_p):
9260         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
9261         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
9262         New addressing mode for data-text relative position indepenedent code.
9263         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
9264         'ADDRESS_SYMBOLIC_TXT_REL'.
9265         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
9266         (microblaze_legitimate_pic_operand): Exclude function calls from
9267         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
9268         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
9269         addresses cases.
9270         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9271         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9272         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
9273         for 'address + offset'.
9274         (microblaze_expand_prologue): Add new function prologue call for
9275         'r20' assignation.
9276         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
9277         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
9278         table in case of TARGET_PIC_DATA_TEXT_REL.
9279         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
9280         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
9281         Add new macros 'UNSPEC_TEXT',
9282         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
9283         + exclude function calls from 'UNSPEC_PLT' in case of data text
9284         relative mode.
9285         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9286         new target hook for generating address diff vector tables in case of
9287         flag_pic.
9288         * doc/tm.texi : Regenerate.
9289         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9290         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9291         of addr diff vector generation.
9292         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9293         target hook definition.
9294         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9295         Add default function for generate_pic_addr_diff_vec -> flag_pic.
9296         * doc/invoke.texi (Add new pic option): Add new microblaze pic
9297         option for data text relative.
9299 2018-04-30  Richard Biener  <rguenther@suse.de>
9301         * tree-chrec.h (evolution_function_is_constant_p): Remove
9302         redundant check.
9303         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9305 2018-04-30  Richard Biener  <rguenther@suse.de>
9307         PR bootstrap/85571
9308         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9310 2018-04-30  Richard Biener  <rguenther@suse.de>
9312         PR tree-optimization/28364
9313         PR tree-optimization/85275
9314         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9315         copying first exit test.
9317 2018-04-28  Mark Wielaard  <mark@klomp.org>
9319         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9320         dwarf_version >= 5.
9321         (dwarf_AT): Handle DW_AT_addr_base.
9322         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9324 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
9326         PR target/84431
9327         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9328         (*ashl<dwi>3_doubleword_mask_1): Ditto.
9329         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9330         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9332 2018-04-28  Richard Biener  <rguenther@suse.de>
9334         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9335         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9336         to reflect use.  Only add interesting stmts.
9338 2018-04-27  Martin Jambor  <mjambor@suse.cz>
9340         PR ipa/85549
9341         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9342         the jump function allows for passing through aggregate values.
9344 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
9346         * input.h (in_system_header_at): Convert from macro to inline
9347         function.
9348         (from_macro_expansion_at): Likewise.
9349         (from_macro_definition_at): Likewise.
9351 2018-04-27  Jeff Law  <law@redhat.com>
9353         * config.gcc: Mark tile* targets as deprecated/obsolete.
9355 2018-04-27  Richard Biener  <rguenther@suse.de>
9357         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9358         fix for ILP32.
9360 2018-04-27  Richard Biener  <rguenther@suse.de>
9362         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9364 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
9366         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9367         with Yd constraint. Set "preferred_for_speed" attribute from
9368         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9369         with Yd constraint.
9370         (*movdi_internal): Ditto.
9371         (movti_interunit splitters): Remove
9372         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9373         (movdi_interunit splitters): Ditto.
9374         * config/i386/constraints.md (Ye): Remove.
9375         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9377 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9379         PR target/85512
9380         * config/aarch64/constraints.md (Usg): Limit to 31.
9381         (Usj): Limit to 63.
9383 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
9385         PR tree-optimization/85529
9386         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9387         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9388         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9389         zero extension or masking of the MSB bit.
9390         (optimize_range_tests): Add FIRST_BB argument, pass it through
9391         to optimize_range_tests_var_bound.
9392         (maybe_optimize_range_tests, reassociate_bb): Adjust
9393         optimize_range_tests callers.
9395 2018-04-26  Richard Biener  <rguenther@suse.de>
9396             Jakub Jelinek  <jakub@redhat.com>
9398         * cgraph.h (symbol_table): Just declare debug method here.
9399         * symtab.c (symbol_table::debug): Define.
9401 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
9403         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9405 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
9407         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9408         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9409         (*movdi_internal): Substitute Yi and Yj constraint with x
9410         and Ym and Yn constraint with y constraint.  Update "isa"
9411         attribute and set "preferred_for_speed" attribute from
9412         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9413         (*movsi_internal): Ditto.
9414         (*movdf_internal): Ditto.
9415         (*movsf_internal): Ditto.
9416         (*zero_extendsidi2): Ditto.
9417         * config/i386/sse.md (vec_set<mode>_0): Ditto.
9418         (sse2_loadld): Ditto.
9419         (*vec_extract<ssevecmodelower>_0): Ditto.
9420         (*vec_extractv4si_0_zext_sse4): Ditto.
9421         (vec_concatv2di): Ditto.
9422         (*vec_dup<mode>): Ditto.
9423         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9424         * config/i386/constraints.md (Yi): Remove.
9425         (Yj): Remove.
9426         (Ym): Remove.
9427         (Yn): Remove.
9429 2018-04-26  Nathan Sidwell  <nathan@acm.org>
9431         * dumpfile.c (dump_open): New.
9432         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9433         (dump_finish): Detect stdio/stderr by value not name.
9435 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
9437         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9439 2018-04-26  Tom de Vries  <tom@codesourcery.com>
9441         PR target/84952
9442         * config/nvptx/nvptx.c (verify_neutering_jumps)
9443         (verify_neutering_labels): New function
9444         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9446 2018-04-26  Tom de Vries  <tom@codesourcery.com>
9448         PR target/84025
9449         * config/nvptx/nvptx.c (needs_neutering_p): New function.
9450         (nvptx_single): Use needs_neutering_p to skip over insns that do not
9451         need neutering.
9453 2018-04-26  Richard Biener <rguenther@suse.de>
9454             Tom de Vries  <tom@codesourcery.com>
9456         PR lto/85422
9457         * lto-streamer-out.c (output_function): Fixup loops if required to match
9458         discovery done in the reader.
9460 2018-04-26  Richard Biener  <rguenther@suse.de>
9462         PR tree-optimization/85116
9463         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9464         have a loop exit from the single latch predecessor.  Remove
9465         case of header with just condition.
9466         (ch_base::copy_headers): Exclude infinite loops from any
9467         processing.
9468         (pass_ch::execute): Record exits.
9470 2018-04-26  Richard Biener  <rguenther@suse.de>
9472         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9473         prologue cost vector and pass it to vect_get_load_cost.
9474         (vect_get_peeling_costs_all_drs): Likewise.
9475         (vect_peeling_hash_get_lowest_cost): Likewise.
9476         (vect_enhance_data_refs_alignment): Likewise.
9478 2018-04-26  Richard Biener  <rguenther@suse.de>
9480         PR middle-end/85450
9481         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9482         checking of integer<->pointer conversions.
9483         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9484         sign-/zero-extending pointer types.
9485         (expand_omp_for_static_chunk): Likewise.
9487 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
9488             Jean Lee  <xiaoyur347@gmail.com>
9490         * config/mips/mips.c (mips_asan_shadow_offset): New function.
9491         (TARGET_ASAN_SHADOW_OFFSET): Define.
9492         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9493         true for -fsanitize=address.
9495 2018-04-25  Mark Wielaard  <mark@klomp.org>
9497         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9498         shorter ones.
9500 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
9502         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9503         than "alu", remove explicit "memory" and "imm_disp" attributes.
9504         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9506         PR middle-end/85414
9507         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9508         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9509         gen_lowpart_no_emit.
9511 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
9513         PR target/85473
9514         * config/i386/i386.c (ix86_expand_builtin): Change memory
9515         operand to XI, extend p0 to Pmode.
9516         * config/i386/i386.md: Change unspec volatile and operand
9517         1 mode to XI, change operand 0 mode to P.
9519 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9521         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9522         GET_MODE_MASK before any checking.
9523         (nds32_can_use_bset_p): Likewise.
9524         (nds32_can_use_btgl_p): Likewise.
9526 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9528         * config/nds32/nds32-doubleword.md: New define_split pattern for
9529         illegal register number.
9531 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9533         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9535 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9537         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9539 2018-04-25  Richard Biener  <rguenther@suse.de>
9541         * lto-streamer.h (LTO_major_version): Bump to 8.
9543 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
9545         * BASE-VER: Set to 9.0.0.
9547 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
9549         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9550         in __abskf2 and __powikf2.
9552 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9554         PR target/85512
9555         * config/aarch64/constraints.md (Usg, Usj): New constraints.
9556         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9557         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9558         Use the above on operand 2.  Reindent.
9559         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9561 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
9563         PR target/85485
9564         * common/config/i386/i386-common.c (ix86_handle_option): Don't
9565         handle OPT_mcet.
9566         * config/i386/i386.opt (mcet): Removed.
9567         * doc/install.texi: Remove -mcet documentation.
9568         * doc/invoke.texi: Likewise.
9570 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
9572         PR target/85485
9573         * doc/install.texi: Remove -mcet from bootstrap-cet.
9575 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9577         PR target/85511
9578         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9579         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9580         if TARGET_64BIT.
9582         PR target/85503
9583         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9584         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9585         containing a CONST_VECTOR.
9587 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
9589         * doc/install.texi: Update newlib dependency for nvptx.
9591 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9593         PR target/85508
9594         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9595         instead of INTVAL when shifting x left.
9597 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
9599         PR tree-optimization/85478
9600         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9601         vect_grouped_store_supported for single element vectors.
9603 2018-04-24  Richard Biener  <rguenther@suse.de>
9605         PR target/85491
9606         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9607         load cost increase to the case of non-constant step.
9609 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9611         PR target/84828
9612         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9613         destination if any_malformed_asm.
9615 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
9617         PR middle-end/85496
9618         * expr.c (store_field): In the bitfield case, if the value comes from
9619         a function call and is returned in registers by means of a PARALLEL,
9620         do not change the mode of the temporary unless BLKmode and VOIDmode.
9622 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
9624         PR rtl-optimization/85423
9625         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9626         dependencies to debug insns when the previous insn is non-debug.
9628 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
9630         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9631         enums into a single definition.
9632         (fls): Fix predicates and printing.
9633         (seti): Likewise.
9635 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
9637         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9638         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9639         and short u6 immediate.
9640         (check_if_valid_sleep_operand): Remove.
9641         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9643 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9645         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9646         flag_always_save_lp condition.
9647         * config/nds32/nds32.opt (malways-save-lp): New option.
9649 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9651         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9652         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9653         * config/nds32/nds32.h
9654         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9655         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9657 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9659         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9660         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9662 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9663             Chung-Ju Wu  <jasonwucj@gmail.com>
9665         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9666         Declare.
9667         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9668         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9670 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9672         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9674 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9676         * config/nds32/nds32-protos.h (nds32_data_alignment,
9677         nds32_local_alignment): Declare.
9678         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9679         nds32_local_alignment): New functions.
9680         (TARGET_CONSTANT_ALIGNMENT): Define.
9681         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9683 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9685         * config/nds32/nds32.c
9686         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9687         (TARGET_MODES_TIEABLE_P): Likewise.
9689 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9691         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9692         level Ofast and Og.
9694 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
9695             Chung-Ju Wu  <jasonwucj@gmail.com>
9697         * config/nds32/constants.md (unspec_volatile_element): Add enum values
9698         for unaligned access.
9699         * config/nds32/nds32-intrinsic.c: Implementation of expanding
9700         unaligned access.
9701         * config/nds32/nds32-intrinsic.md: Likewise.
9702         * config/nds32/nds32_intrinsic.h: Likewise.
9703         * config/nds32/nds32.h (nds32_builtins): Likewise.
9704         * config/nds32/nds32.opt (munaligned-access): New option.
9705         * config/nds32/nds32.c (nds32_asm_file_start): Display
9706         flag_unaligned_access status.
9708 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
9710         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9711         -mno-relax is present.
9712         * config/riscv/linux.h (LINK_SPEC): Ditto.
9714 2018-04-20  Martin Sebor  <msebor@redhat.com>
9716         PR c/85365
9717         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9718         for null pointers.
9719         (gimple_fold_builtin_stxcpy_chk): Same.
9720         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9722 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
9724         PR target/85456
9725         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9726         __powikf2 when long double is IEEE 128-bit.
9728 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
9730         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9731         step to make sure stack always aligned.
9733 2018-04-20  Carl Love  <cel@us.ibm.com>
9735         PR target/83402
9736         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9737         size check for arg0.
9739 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9740             Tom de Vries  <tom@codesourcery.com>
9742         PR target/85445
9743         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9744         Emit insns for calls too.
9745         (nvptx_find_par): Always look for worker-level predecessor insn.
9746         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
9747         calls.
9748         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9749         (nvptx_process_pars): Propagate frames for calls.
9751 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
9753         PR target/85469
9754         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9755         Removed.
9756         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9757         (ix86_handle_option): Don't handle OPT_mibt.
9758         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9759         __SHSTK__.
9760         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9761         has_ibt and ibt.
9762         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9763         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9764         (ix86_target_macros): Define __CET__ with flag_cf_protection
9765         for -fcf-protection.
9766         * config/i386/i386.c (isa2_opts): Remove -mibt.
9767         * config/i386/i386.h (TARGET_IBT): Removed.
9768         (TARGET_IBT_P): Likewise.
9769         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9770         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9771         * config/i386/i386.opt (mcet): Update help message.
9772         (mshstk): Likewise.
9773         (mibt): Removed.
9774         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
9775         -mcet as an alias for -mshstk.
9777 2018-04-20  Richard Biener <rguenther@suse.de>
9779         PR middle-end/85475
9780         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9781         complexity by forcing a single use of the multiply operand.
9783 2018-04-20  Martin Jambor  <mjambor@suse.cz>
9785         ipa/85449
9786         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9787         recursion dependency to only apply to non-clones.
9789 2018-04-20  Martin Jambor  <mjambor@suse.cz>
9791         ipa/85447
9792         * ipa-cp.c (create_specialized_node): Check that clones of
9793         self-recursive edges exist during IPA-CP.
9795 2018-04-19  Toon Moene  <toon@moene.org>
9797         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9798         by -O3.
9800 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
9802         PR tree-optimization/85467
9803         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9804         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
9805         VECTOR_CST element to type.
9807 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9809         PR target/85397
9810         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9811         * config/i386/i386.md (builtin_setjmp_setup): Removed.
9812         (builtin_longjmp): Likewise.
9813         (save_stack_nonlocal): New pattern.
9814         (restore_stack_nonlocal): Likewise.
9816 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9818         PR target/85404
9819         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9820         Replace ASM_OUTPUT_LABEL with fprintf.
9822 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9824         PR target/85417
9825         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9826         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9827         * config/i386/i386-c.c (ix86_target_macros_internal): Also
9828         define __IBT__ and __SHSTK__ for -fcf-protection.
9829         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9830         TARGET_IBT.
9831         (ix86_trampoline_init): Likewise.
9832         (x86_output_mi_thunk): Likewise.
9833         (ix86_notrack_prefixed_insn_p): Likewise.
9834         (ix86_option_override_internal): Don't disallow -fcf-protection.
9835         * config/i386/i386.md (rdssp<mode>): Also enable for
9836         -fcf-protection.
9837         (incssp<mode>): Likewise.
9838         (nop_endbr): Likewise.
9839         * config/i386/i386.opt (mcet): Change help message to built-in
9840         functions only.
9841         (mibt): Likewise.
9842         (mshstk): Likewise.
9843         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9844         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
9845         enable CET built-in functions.
9847 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
9849         * common/config/i386/i386-common.c
9850         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9851         OPTION_MASK_ISA_MOVDIRI_UNSET,
9852         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9853         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9854         * config.gcc (movdirintrin.h): New header.
9855         * config/i386/cpuid.h (bit_MOVDIRI,
9856         bit_MOVDIR64B): New bits.
9857         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9858         and -mmvodir64b.
9859         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9860         (VOID, PVOID, PCVOID)): New function types.
9861         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9862         __builtin_ia32_directstoreu_u64,
9863         __builtin_ia32_movdir64b): New builtins.
9864         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9865         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9866         and -mmovdiri.
9867         (ix86_valid_target_attribute_inner_p): Ditto.
9868         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9869         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9870         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9871         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9872         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9873         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9874         (movdiri<mode>, movdir64b_<mode>): New.
9875         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9876         * config/i386/immintrin.h: Include movdirintrin.h.
9877         * config/i386/movdirintrin.h: New file.
9878         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9880 2018-04-19  Richard Biener  <rguenther@suse.de>
9882         PR middle-end/85455
9883         * cfg.c (clear_bb_flags): When loop state says we have
9884         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9886 2018-04-19  Richard Biener  <rguenther@suse.de>
9888         PR tree-optimization/84737
9889         * tree-vect-data-refs.c (vect_copy_ref_info): New function
9890         copying restrict info.
9891         (vect_setup_realignment): Use it.
9892         * tree-vectorizer.h (vect_copy_ref_info): Declare.
9893         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9894         the first DR to all generated stores.
9895         (vectorizable_load): Likewise for loads.
9897 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
9899         PR tree-optimization/85446
9900         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9901         the integral and pointer types to have the same precision.
9903         * doc/install.texi: Document --disable-cet being the default and
9904         --enable-cet=auto.
9906 2018-04-18  Martin Liska  <mliska@suse.cz>
9908         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9909         style.
9911 2018-04-18  Martin Liska  <mliska@suse.cz>
9913         Revert
9914         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
9916         PR ipa/83983
9917         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9918         arguments if they are comparable.
9920 2018-04-18  Martin Liska  <mliska@suse.cz>
9922         Revert
9923         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9925         PR lto/84805
9926         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9927         incomplete types.
9929 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
9931         PR target/85388
9932         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9933         ENDBR after calling __morestack.
9935 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
9937         PR jit/85384
9938         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9939         by using gcc_base_ver to generate a gcc_driver_version, and use
9940         it when generating GCC_DRIVER_NAME.
9941         * configure: Regenerate.
9943 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
9945         PR target/81084
9946         * config.gcc: Obsolete powerpc*-*-*spe*.
9948 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9950         PR debug/84637
9951         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9952         (stabstr_D): Change type of unum from unsigned int to
9953         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
9954         type.
9956 2018-04-17  Jim Wilson  <jimw@sifive.com>
9958         PR 84856
9959         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9960         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9961         Set arg_pointer_offset after using pretend_args_size.
9963 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9965         PR rtl-optimization/85431
9966         * dse.c (record_store): Ignore zero width stores.
9968         PR sanitizer/85230
9969         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
9970         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9971         __builtin_stack_restore rather than after it.
9972         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9973         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9974         argument instead of virtual_dynamic_stack_rtx.
9976 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9978         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9979         New prototype.
9980         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9981         Add note to error message to explain internal mapping of overloaded
9982         built-in function name to non-overloaded built-in function name.
9983         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9984         function.
9986 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9988         PR target/85424
9989         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9990         where the inputs overlap with the output.
9992 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9994         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9995         (=v, v) alternative and explicit "memory" attribute.
9996         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
9997         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9998         attributes.
9999         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10000         "sselog1" type instead of "sselog".
10001         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10002         "sselog".  Remove explicit "memory" attribute.
10003         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10004         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10005         attributes.
10006         (vec_extract_hi_v32hi): Merge all alternatives into one, use
10007         "sselog1" type instead of "sselog".  Remove explicit "memory"
10008         attribute.
10009         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10010         use "sselog1" type instead of "sselog".  Remove explicit "memory"
10011         attribute.
10012         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10013         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10014         attributes.
10015         (vec_extract_hi_v64qi): Merge all alternatives into one, use
10016         "sselog1" type instead of "sselog".  Remove explicit "memory"
10017         attribute.
10018         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10019         use "sselog1" type instead of "sselog".  Remove explicit "memory"
10020         attribute.
10022         PR target/85430
10023         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10025         PR middle-end/85414
10026         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10027         on a SUBREG.
10029 2018-04-17  Martin Jambor  <mjambor@suse.cz>
10031         PR ipa/85421
10032         * ipa-cp.c (create_specialized_node): Call
10033         expand_all_artificial_thunks if necessary.
10035 2018-04-17  Martin Liska  <mliska@suse.cz>
10037         PR lto/85405
10038         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10039         in message, remote space in between '_G' and '('.
10041 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10043         PR target/85281
10044         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10045         avx512f_vmcmp<mode>3<round_saeonly_name>,
10046         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10047         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10048         avx512f_rndscale<mode><round_saeonly_name>,
10049         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10050         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10051         Use %<iptr>2 instead of %2 for -masm=intel.
10052         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10053         avx512f_vcvttss2usi<round_saeonly_name>,
10054         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10055         -masm=intel.
10056         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10057         avx512f_vcvttsd2usi<round_saeonly_name>,
10058         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10059         Use %q1 instead of %1 for -masm=intel.
10060         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10061         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10062         of %3 for -masm=intel.
10063         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10064         -masm=intel.
10065         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10066         -masm=intel.
10067         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10068         -masm=intel.
10069         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10070         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10071         %g1.
10072         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10073         -masm=intel.
10074         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10075         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10076         %g1 and one with %0 and %1.
10077         (avx512er_vmrcp28<mode><round_saeonly_name>,
10078         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10079         %1 for -masm=intel.
10080         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10081         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10082         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10083         of %0 and %{%4%} for -masm=intel.
10084         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10085         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10086         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10087         order of %0 and %{%5%}%{z%} for -masm=intel.
10089 2018-04-17  Jan Hubicka  <jh@suse.cz>
10091         PR lto/85405
10092         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10094 2018-04-17  Martin Liska  <mliska@suse.cz>
10096         PR ipa/85329
10097         * multiple_target.c (create_dispatcher_calls): Set apostrophes
10098         for target_clone error message.  Make default implementation
10099         clone to be a local declaration.
10100         (separate_attrs): Add new argument and check for an empty
10101         string.
10102         (expand_target_clones): Handle it.
10103         (ipa_target_clone): Make redirection just for target_clones
10104         functions.
10106 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
10107             Tom de Vries  <tom@codesourcery.com>
10109         PR middle-end/84955
10110         * omp-expand.c (expand_oacc_for): Add dummy false branch for
10111         tiled basic blocks without omp continue statements.
10113 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
10115         PR target/83660
10116         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10117         vec_extract expression as having side effects to make sure it gets
10118         a cleanup point.
10120 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
10122         PR target/85403
10123         * config/i386/i386.c (get_builtin_code_for_version): Check
10124         error_mark_node.
10126 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
10128         PR target/84331
10129         * config.gcc: Support "skylake".
10130         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10131         PROCESSOR_SKYLAKE.
10132         * config/i386/i386.c (m_SKYLAKE): Define.
10133         (processor_target_table): Add "skylake".
10134         (ix86_option_override_internal): Add "skylake".
10135         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10136         PROCESSOR_CANNONLAKE.
10137         (get_builtin_code_for_version): Fix priority for
10138         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10139         PROCESSOR_SKYLAKE-AVX512.
10140         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10141         (processor_type): Add PROCESSOR_SKYLAKE.
10143 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
10144             Jason Merrill  <jason@redhat.com>
10146         PR c++/85112
10147         * convert.c (convert_to_integer_1): Use direct recursion for
10148         enumeral types and types with a precision less than the number
10149         of bits in their mode.
10151 2018-04-16  Julia Koval  <julia.koval@intel.com>
10153         PR target/84413
10154         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10155         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10157 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
10159         PR target/85293
10160         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10161         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10162         and -mno-direct-move.
10164 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
10166         PR target/83402
10167         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10168         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10169         Ensure negative shifts result in {0}.
10171 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
10173         PR rtl-optimization/79916
10174         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10175         regs (if any) to define how to gnerate SD moves when LRA is in
10176         progress.
10178 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
10180         PR rtl-optimization/85393
10181         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10182         * except.c (expand_dw2_landing_pad_for_region): Make static.
10183         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10184         a label and unconditional jump to old_bb, rather than
10185         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10186         basic block.
10188         PR rtl-optimization/85376
10189         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10190         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10191         instead of a specific value.
10193 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
10194             Bin Cheng  <bin.cheng@arm.com>
10196         PR tree-optimization/82965
10197         PR tree-optimization/83991
10198         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10199         by_profile_only parameter.
10200         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10201         information if the loop was predicted to iterate too many times.
10202         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10204 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
10206         PR lto/71991
10207         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
10208         always inline.
10210 2018-04-13  Martin Liska  <mliska@suse.cz>
10211             Jakub Jelinek  <jakub@redhat.com>
10213         PR middle-end/81657
10214         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
10215         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
10216         * builtins.c (expand_builtin_memory_copy_args): Use
10217         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
10218         handle dest_addr == pc_rtx.
10220 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
10222         PR target/85291
10223         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
10224         asked to not generate direct moves.
10225         (fix_trunc<mode>si2_stfiwx): Similar.
10226         (fix_trunc<mode>si2_internal): Similar.
10228 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10230         PR debug/83157
10231         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
10232         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
10233         lookup if dest in some wider mode is known to be const0_rtx and
10234         if so, record permanent equivalence for it to be ZERO_EXTEND of
10235         the narrower mode destination.
10237 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
10239         * lto-streamer-out.c (output_function): Revert 259346.
10240         * omp-expand.c (expand_oacc_for): Likewise.
10242 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
10244         PR rtl-optimization/85354
10245         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
10246         * sel-sched.c (sel_global_init): ... here.
10248 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
10250         PR target/85238
10251         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
10252         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10253         mode for PE-COFF targets.
10254         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
10255         (i386_pe_asm_lto_end): Likewise.
10256         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
10257         (TARGET_ASM_LTO_END): Likewise.
10258         * config/i386/winnt.c (saved_debug_info_level): New static variable.
10259         (i386_pe_asm_lto_start): New function.
10260         (i386_pe_asm_lto_end): Likewise.
10262 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
10263             Richard Biener  <rguenther@suse.de>
10265         PR middle-end/84955
10266         * lto-streamer-out.c (output_function): Fix CFG loop state before
10267         streaming out.
10268         * omp-expand.c (expand_oacc_for): Handle calls to internal
10269         functions like regular functions.
10271 2018-04-12  Richard Biener  <rguenther@suse.de>
10273         PR lto/85371
10274         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
10275         for the early LTO debug to properly generate references to it
10276         during DIE emission.  Do not re-use that for the skeleton for
10277         split-dwarf.
10278         (dwarf2out_early_finish): Likewise.
10280 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10282         PR target/85328
10283         * config/i386/sse.md
10284         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
10285         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
10286         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
10287         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10288         and output is a reg, avoid creating invalid lowpart subreg, but
10289         instead split into a 512-bit move.  Don't split if not AVX512VL,
10290         input is xmm16+ reg and output is a mem.
10291         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10292         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10293         xmm16+ reg and output is a mem.
10295 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10297         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10298         also for flag_dwarf2_cfi_asm.
10300 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10302         PR rtl-optimization/85342
10303         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10304         a bool scalar var inside of the loop instead.  Don't try to update
10305         recog_data.operand after failed apply_change_group.
10307 2018-04-12  Tom de Vries  <tom@codesourcery.com>
10309         PR target/85296
10310         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10311         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
10312         array with flexible array member as array without given dimension.
10313         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10314         argument for undefined param to true.
10316 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
10318         PR target/85321
10319         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10320         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10321         from PowerPC section.
10322         * config/rs6000/sysv4.opt (mcall-): Improve help text.
10323         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10324         help text that is too long.
10325         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10326         help text that is too long.
10327         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10328         help text that is too long.
10330 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
10332         * config/alpha/alpha.md (stack_probe_internal): Rename
10333         from "probe_stack".  Update all callers.
10335 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10337         PR rtl-optimization/84566
10338         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10339         sched_macro_fuse_insns.
10341 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10343         PR target/84301
10344         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10345         (compute_block_dependences): ... from here.
10347 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10349         PR tree-optimization/85331
10350         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10351         from int to HOST_WIDE_INT.
10353 2018-04-11  Martin Jambor  <mjambor@suse.cz>
10355         PR ipa/84149
10356         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10357         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10358         not the same as the source val.
10359         (cgraph_edge_brings_value_p): New parameter.
10360         (gather_edges_for_value): Pass destination value to
10361         cgraph_edge_brings_value_p.
10362         (perhaps_add_new_callers): Likewise.
10363         (get_info_about_necessary_edges): Likewise and exclude values brought
10364         only by self-recursive edges.
10365         (create_specialized_node): Redirect only clones of self-calling edges.
10366         (+self_recursive_pass_through_p): New function.
10367         (find_more_scalar_values_for_callers_subset): Use it.
10368         (find_aggregate_values_for_callers_subset): Likewise.
10369         (known_aggs_to_agg_replacement_list): Removed.
10370         (decide_whether_version_node): Re-calculate known constants for all
10371         remaining context clones.
10373 2018-04-11  Richard Biener  <rguenther@suse.de>
10375         PR lto/85339
10376         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10377         from early DWARF output.
10378         (dwarf2out_early_finish): Output line info unconditionally into
10379         early DWARF and add reference to it.
10381 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10383         PR target/85281
10384         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10385         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10386         other than V2DFmode using iptr mode attribute.
10387         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10389 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10391         PR rtl-optimization/84659
10392         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10394 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10396         PR debug/85302
10397         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10398         SIZEP is NULL.
10399         (output_loc_list): Pass address of a dummy size variable even in the
10400         locview handling loop.
10401         (index_location_lists): Add comment on why skip_loc_list_entry can't
10402         call size_of_locs.
10404 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10406         PR target/85261
10407         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10408         into register.
10410 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
10412         PR target/85321
10413         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10414         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10415         and -mstring-compare-inline-limit.
10417 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10419         PR target/85287
10420         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10421         for stack clash protection in a register whenever we need it to be in
10422         a register.
10424 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10426         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10427         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10429 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10431         PR target/85321
10432         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10433         the help text.
10434         (mlong-double-): Ditto.
10435         * config/rs6000/sysv4.opt (msdata=): Ditto.
10436         (mtls-size=): Ditto.
10438 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10440         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10441         erroneous entries for
10442         "vector int vec_ldl (int, long int *)", and
10443         "vector unsigned int vec_ldl (int, unsigned long int *)".
10444         Add comments and entries for
10445         "vector bool char vec_ldl (int, bool char *)",
10446         "vector bool short vec_ldl (int, bool short *)",
10447         "vector bool int vec_ldl (int, bool int *)",
10448         "vector bool long long vec_ldl (int, bool long long *)",
10449         "vector pixel vec_ldl (int, pixel *)",
10450         "vector long long vec_ldl (int, long long *)",
10451         "vector unsigned long long vec_ldl (int, unsigned long long *)".
10452         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10453         type tree bool_long_long_type_node and correct definition of
10454         bool_V2DI_type_node to make reference to this new type tree.
10455         (rs6000_mangle_type): Replace erroneous reference to
10456         bool_long_type_node with bool_long_long_type_node.
10457         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10458         comments to emphasize sign distinctions for char and int types and
10459         replace RS6000_BTI_bool_long constant with
10460         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
10461         use of RS6000_BTI_pixel.
10462         (bool_long_type_node): Remove this macro definition.
10463         (bool_long_long_type_node): New macro definition
10465 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
10467         PR rtl-optimization/85300
10468         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10469         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10470         simplify_unary_operation fails.
10472 2018-04-10  Martin Liska  <mliska@suse.cz>
10474         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10475         cgraph_edge and ipa_ref.
10477 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
10479         PR target/85177
10480         PR target/85255
10481         * config/i386/sse.md
10482         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10483         computation of the VEC_MERGE selector from mask.
10484         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10485         Fix decoding of the VEC_MERGE selector into mask.
10487 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
10489         PR tree-optimization/85286
10490         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10492 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
10494         * final.c (final_1): Set insn_last_address as well as
10495         insn_current_address.
10497 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10499         PR target/85173
10500         * explow.c (emit_stack_probe): Call validize_mem on memory location
10501         before passing it to gen_probe_stack.  Create address operand and
10502         legitimize it for the probe_stack_address case.
10504 2018-04-09  Jan Hubicka  <jh@suse.cz>
10506         PR lto/85078
10507         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10508         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10509         * tree.c (free_lang_data_in_type): Fix handling of binfos;
10510         walk basetypes.
10511         (free_lang_data): Rebuild type inheritance graph.
10513 2018-04-09  Martin Sebor  <msebor@redhat.com>
10515         * invoke.texi (-finline-small-functions): Mention other optimization
10516         options.
10517         (-findirect-inlining, -fpartial-inlining): Same.
10518         (-finline-functions-called-once): Same.
10519         (-freorder-blocks-and-partition): Same.
10521 2018-04-09  Jan Hubicka  <jh@suse.cz>
10523         PR rtl/84058
10524         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10525         jumps; choose last target that matches the criteria (i.e.
10526         no partition changes for non-crossing jumps).
10527         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10528         support for redirecting crossing jumps to non-crossing.
10530 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
10532         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10533         also for naked functions.
10535 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
10537         * config/arc/arc.md (add_shift): New pattern.
10538         (add_shift2): Likewise.
10539         (sub_shift): Likewise.
10540         (sub_shift_cmp0_noout): Likewise.
10541         (compare_si_ashiftsi): Likewise.
10542         (xbfu_cmp0_noout): New combine pattern.
10543         (xbfu_cmp0"): Likewise.
10544         (movsi_set_cc_insn): Place the predicable variant first.
10545         (commutative_binary_cmp0_noout): Remove clobber.
10546         (commutative_binary_cmp0): New pattern.
10547         (noncommutative_binary_cmp0): Likewise.
10548         (noncommutative_binary_cmp0_noout): Likewise.
10549         (noncommutative_binary_comparison_result_used): Removed.
10550         (rsub_cmp0): New pattern.
10551         (rsub_cmp0_noout): Likewise.
10552         (extzvsi): Changed, keep only meaningful variants.
10553         (SQH, SEZ): New iterators.
10554         (SQH_postfix): New mode attribute.
10555         (SEZ_prefix): New code attribute.
10556         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10557         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10558         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10559         of numerical value.
10560         (noncommutative_operator): Check the availability of barrel
10561         shifter option.
10563 2018-04-09  Richard Biener  <rguenther@suse.de>
10565         PR tree-optimization/85284
10566         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10567         Only use the niter constraining form of simple_iv when the exit
10568         is always executed.
10570 2018-04-09  Tom de Vries  <tom@codesourcery.com>
10572         PR target/84041
10573         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10574         (define_expand "*memory_barrier"): New define_expand.
10575         (define_insn "memory_barrier"): New insn.
10577 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10579         PR rtl-optimization/80463
10580         PR rtl-optimization/83972
10581         PR rtl-optimization/83480
10583         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10584         correct producer for the insn.
10585         (tidy_control_flow): Fixup seqnos in case of debug insns.
10587 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10589         PR rtl-optimization/83913
10591         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10592         different sched-times when merging exprs.
10594 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10596         PR rtl-optimization/83962
10598         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10599         tidy_fallthru_edge and tidy_control_flow.
10601 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10603         PR rtl-optimization/83530
10605         * sel-sched.c (force_next_insn): New global variable.
10606         (remove_insn_for_debug): When force_next_insn is true, also leave only
10607         next insn in the ready list.
10608         (sel_sched_region): When the region wasn't scheduled, make another pass
10609         over it with force_next_insn set to 1.
10611 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
10613         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10614         into tm_file.
10615         * config/nds32/constants.md (unspec_volatile_element): Add enum values
10616         for interrupt control.
10617         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10618         functions for interrupt control.
10619         * config/nds32/nds32-intrinsic.md: Likewise.
10620         * config/nds32/nds32_intrinsic.h: Likewise.
10621         * config/nds32/nds32.h (nds32_builtins): Likewise.
10623 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
10625         * config/nds32/nds32.c (nds32_init_machine_status,
10626         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10627         strict_aligned_p field.
10628         (nds32_expand_to_rtl_hook): New function.
10629         (TARGET_EXPAND_TO_RTL_HOOK): Define.
10630         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10632 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10633             Chung-Ju Wu  <jasonwucj@gmail.com>
10635         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10636         * config/nds32/nds32-n7.md: New file.
10637         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10638         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10639         pipeline.
10640         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10641         * config/nds32/nds32.md (pipeline_model): Add n7.
10642         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10643         * config/nds32/pipelines.md: Include n7 settings.
10645 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10646             Chung-Ju Wu  <jasonwucj@gmail.com>
10648         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10649         * config/nds32/nds32-e8.md: New file.
10650         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10651         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10652         pipeline.
10653         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10654         * config/nds32/nds32.md (pipeline_model): Add e8.
10655         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10656         * config/nds32/pipelines.md: Include e8 settings.
10658 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10659             Chung-Ju Wu  <jasonwucj@gmail.com>
10661         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10662         * config/nds32/nds32-n8.md: New file.
10663         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10664         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10665         pipeline.
10666         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10667         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10668         * config/nds32/nds32.md (pipeline_model): Add n8.
10669         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10670         * config/nds32/pipelines.md: Include n8 settings.
10672 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10673             Chung-Ju Wu  <jasonwucj@gmail.com>
10675         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10676         * config/nds32/nds32-n9-2r1w.md: New file.
10677         * config/nds32/nds32-n9-3r2w.md: New file.
10678         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10679         nds32_register_ports): New or modify for cpu n9.
10680         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10681         pipeline.
10682         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10683         * config/nds32/nds32-utils.c: New file.
10684         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10685         TARGET_MUL_SLOW): Define.
10686         * config/nds32/nds32.md (pipeline_model): New attribute.
10687         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10688         New options that support cpu n9.
10689         * config/nds32/pipelines.md: Include n9 settings.
10690         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10692 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
10694         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10695         information if necessary.
10696         (output_cond_branch_compare_zero): Likewise.
10697         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10698         (nds32_target_alignment): Refine for alignment.
10699         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10700         (FUNCTION_BOUNDARY): Modify.
10701         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10702         align case.
10703         * config/nds32/nds32.opt (malways-align, malign-functions): New.
10705 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
10707         * config/nds32/constants.md (unspec_volatile_element): Add values for
10708         TLB operation and data prefetch.
10709         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10710         functions for TLB operation and data prefetch.
10711         * config/nds32/nds32-intrinsic.md: Likewise.
10712         * config/nds32/nds32_intrinsic.h: Likewise.
10713         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10714         (nds32_print_operand): Likewise.
10715         * config/nds32/nds32.h (nds32_builtins): Likewise.
10717 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
10718         Andrew Pinski <pinsika@gcc.gnu.org>
10720         PR middle-end/82976
10721         * match.pd: Use constant_boolean_node of correct type instead of
10722         boolean_true_node or boolean_false_node for simplifying
10723         pointer comparisons to zero.
10725 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
10727         PR tree-optimization/80021
10728         * tree.c (verify_type_variant): Make error call in verify_variant_match
10729         translatable and remove final full stop.
10731 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10733         * config/nds32/constants.md (unspec_volatile_element): Add
10734         UNSPEC_VOLATILE_EH_RETURN.
10735         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10736         nds32_output_stack_pop): Support dwarf exception handling process.
10737         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10738         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10739         exception handling process.
10740         (nds32_compute_stack_frame): Likewise.
10741         (nds32_return_addr_rtx): Likewise.
10742         (nds32_initial_elimination_offset): Likewise.
10743         (nds32_expand_prologue): Likewise.
10744         (nds32_expand_epilogue): Likewise.
10745         (nds32_dynamic_chain_address): New function.
10746         * config/nds32/nds32.h (machine_function): Add fields for dwarf
10747         exception handling.
10748         (DYNAMIC_CHAIN_ADDRESS): Define.
10749         (EH_RETURN_DATA_REGNO): Define.
10750         (EH_RETURN_STACKADJ_RTX): Define.
10751         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10752         patterns for dwarf exception handling.
10754 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10756         * config/nds32/nds32.h: Clean up obsolete macros.
10758 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10760         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10761         Add enum values for particular instructions.
10762         * config/nds32/nds32-intrinsic.c: Implementation of expanding
10763         particular intrinsic functions.
10764         * config/nds32/nds32-intrinsic.md: Likewise.
10765         * config/nds32/nds32_intrinsic.h: Likewise.
10766         * config/nds32/nds32.h (nds32_builtins): Likewise.
10767         * config/nds32/nds32.md (type): Add pbsad and pbsada.
10768         (btst, ave): New patterns for particular instructions.
10770 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10772         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10773         Add enum values for atomic load/store and memory sync.
10774         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10775         and memory sync.
10776         * config/nds32/nds32-intrinsic.md: Likewise.
10777         * config/nds32/nds32_intrinsic.h: Likewise.
10778         * config/nds32/nds32.h (nds32_builtins): Likewise.
10780 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
10782         PR tree-optimization/85257
10783         * fold-const.c (native_encode_vector): If not all elts could fit
10784         and off is -1, return 0 rather than offset.
10785         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10786         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10787         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
10788         adjust buffer in native_interpret_expr call.
10790 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10792         * config/nds32/constants.md (unspec_volatile_element): Add cache
10793         control enum values.
10794         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10795         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10796         * config/nds32/nds32.c (nds32_cctl_names): New.
10797         (nds32_print_operand): Handle cache control register names.
10798         * config/nds32/nds32.h (nds32_builtins): New enum values.
10799         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10800         macros.
10801         * config/nds32/nds32.md (type): Add mmu.
10802         * config/nds32/pipelines.md (simple_insn): Add mmu.
10804 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10806         * config/nds32/nds32.md (type): Remove call.
10807         * config/nds32/pipelines.md (simple_insn): Likewise.
10809 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10811         * config/nds32/constants.md (unspec_volatile_element): Add
10812         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10813         UNSPEC_VOLATILE_FMFCFG.
10814         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10815         description for fmfcfg and fmfcsr.
10816         (bdesc_1arg): Add fmtcsr.
10817         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10818         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10819         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10820         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10821         unspec_fmfcfg): New patterns.
10822         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10823         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10824         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10825         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10826         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10827         __nds32__fmfcfg): Define.
10829 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10831         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10832         intrinsic register names.
10833         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10834         intrinsic register enum values and macros.
10836 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10838         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10839         for load/store addressing form.
10840         (nds32_print_operand_address): Likewise.
10842 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
10844         PR target/85196
10845         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10846         based on LABEL_REF.  Remove useless assertion.
10847         (pic_address_needs_scratch): Fix formatting.
10848         (sparc_legitimize_pic_address): Minor tweaks.
10849         (sparc_delegitimize_address): Adjust assertion accordingly.
10850         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10851         into symbolic_operand.
10852         (movsi_high_pic_label_ref): Likewise.
10853         (movsi_lo_sum_pic_label_ref): Likewise.
10854         (movdi_pic_label_ref): Likewise.
10855         (movdi_high_pic_label_ref): Likewise.
10856         (movdi_lo_sum_pic_label_ref): Likewise.
10858 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
10860         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10861         custom LIB_SPEC setup.
10863 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
10864             Kito Cheng  <kito.cheng@gmail.com>
10866         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10867         * config/riscv/freebsd.h: New.
10869 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10871         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10872         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10873         file.
10875 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10876             Kito Cheng  <kito.cheng@gmail.com>
10878         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10879         nds32_output_call, nds32_symbol_binds_local_p): New functions.
10880         * config/nds32/nds32-protos.h (nds32_output_call,
10881         nds32_output_return): Declare.
10882         * config/nds32/nds32.md: Refine all the call and return patterns.
10884 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10886         PR debug/85252
10887         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10888         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10890         PR rtl-optimization/84872
10891         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10892         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10893         EDGE_CROSSING edge.
10895 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
10897         * expr.c (copy_blkmode_to_reg): Revert 254862.
10898         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10900 2018-04-06  Richard Biener  <rguenther@suse.de>
10902         PR middle-end/85244
10903         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10904         after seeing a component reference with an adjacent field.  Treat
10905         refs to arrays at struct end of external decls similar to
10906         refs to unconstrained commons.
10908 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10910         PR sanitizer/85213
10911         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10912         look through SAVE_EXPRs with non-side-effects argument.  Adjust
10913         recursive calls.
10914         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10915         save_p here.
10917 2018-04-06  Richard Biener  <rguenther@suse.de>
10919         PR middle-end/85180
10920         * alias.c (find_base_term): New wrapper around find_base_term
10921         unwinding CSELIB_VAL_PTR changes.
10922         (find_base_term): Do not restore CSELIB_VAL_PTR during the
10923         recursion.
10925 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10927         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10928         instructions.
10929         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10930         constant definitions.
10931         ("nop"): lr 0,0 -> nopr r0
10932         ("nop_lr0", "nop_lr1"): New insn definitions.
10934 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10936         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10937         NDS32_V3PUSH_AVAILABLE_P macro.
10939 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
10940             Chung-Ju Wu  <jasonwucj@gmail.com>
10942         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10943         (nds32*-*-*): Add float and fpu_config into supported_defaults.
10944         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10945         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10946         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10947         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10948         * config/nds32/constraints.md: New constraints and checking for hard
10949         float configuration.
10950         * config/nds32/iterators.md: New mode iterator and attribute for hard
10951         float configuration.
10952         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10953         patterns.
10954         * config/nds32/nds32-fpu.md: New file.
10955         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10956         deal with hard float code generation.
10957         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10958         ARCH_V3S.
10959         (abi_type, float_reg_number): New enum type.
10960         * config/nds32/nds32-predicates.c: New predicates for hard float.
10961         * config/nds32/nds32-protos.h: Declare functions for hard float.
10962         * config/nds32/nds32.c: Implementation for hard float configuration.
10963         * config/nds32/nds32.h: Definitions for hard float configuration.
10964         * config/nds32/nds32.md: Include hard float machine description and
10965         modify patterns for hard float configuration.
10966         * config/nds32/nds32.opt: New options for hard float configuration.
10967         * config/nds32/predicates.md: New predicates for hard float
10968         configuration.
10970 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
10972         * common/config/nds32/nds32-common.c
10973         (nds32_option_optimization_table): Enable -mreleax-hint by default.
10975 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
10977         PR middle-end/85195
10978         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10979         CONSTRUCTOR_ELT (ctor, ...)->value.
10981 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
10983         PR target/85193
10984         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10986 2018-04-05  Tom de Vries  <tom@codesourcery.com>
10988         PR target/85204
10989         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10990         cond jump.
10992 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
10993             Kito Cheng  <kito.cheng@gmail.com>
10995         * config/nds32/constraints.md (U33): Fine-tune checking condition.
10996         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10997         * config/nds32/nds32.h (nds32_16bit_address_type): Add
10998         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11000 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
11001             Kito Cheng  <kito.cheng@gmail.com>
11003         * config/nds32/constraints.md (Ufe): New memory constraint.
11004         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11005         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11006         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11007         operands.
11008         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11009         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11011 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11013         * config/nds32/nds32.md: Use optimize_size in the condition for
11014         alu-shift instructions.
11016 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11018         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11020 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11022         * config/nds32/nds32.md (negsi2): Refine pattern.
11024 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
11025             Chung-Ju Wu  <jasonwucj@gmail.com>
11027         * config/nds32/iterators.md (shift_rotate): New code iterator.
11028         (shift): New code attribute.
11029         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11030         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11031         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11032         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11033         bit-wise operations.
11034         (andsi3, *andsi3): Ditto.
11035         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11036         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11037         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11038         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11039         nds32_ior_operand, nds32_xor_operand): New predicates.
11041 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11043         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11044         (addsi3, subsi3): ... this.
11046 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11048         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11050 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11052         * config/nds32/nds32.md: Adjust indention.
11054 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
11056         * config/nds32/nds32.md (feature): New attribute.
11058 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11060         * config/nds32/nds32.md (subtype): New attribute.
11062 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11064         PR target/85203
11065         * config/arm/arm-builtins.c (arm_expand_builtin): Change
11066         expansion to perform a bitwise AND of the argument followed by a
11067         boolean negation of the result.
11069 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
11071         PR rtl-optimization/84878
11072         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11073         the basic block.  Assert the use reference is not artificial and that
11074         it has an associated insn.
11076 2018-04-04  Michael Matz  <matz@suse.de>
11078         * builtins.c (compute_objsize): Pass correct operand
11079         to array_at_struct_end_p.
11081 2018-04-04  Richard Biener  <rguenther@suse.de>
11083         PR lto/85176
11084         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11085         from contexts for DINFO_LEVEL_TERSE and below.
11087 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11089         * config/nds32/nds32-doubleword.md (move_<mode>): Require
11090         resiter_operand condition.
11091         * config/nds32/nds32.md (*move<mode>): Ditto.
11093 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11094             Monk Chiang  <sh.chiang04@gmail.com>
11096         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11098 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11100         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11102 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11103             Kito Cheng  <kito.cheng@gmail.com>
11105         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11106         nds32_cond_code_str, output_cond_branch,
11107         output_cond_branch_compare_zero, nds32_expand_cbranch,
11108         nds32_expand_cstore, nds32_expand_movcc,
11109         nds32_output_cbranchsi4_equality_zero,
11110         nds32_output_cbranchsi4_equality_reg,
11111         nds32_output_cbranchsi4_equality_reg_or_const_int,
11112         nds32_output_cbranchsi4_greater_less_zero: New functions.
11113         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11114         nds32_expand_cstore, nds32_expand_movcc,
11115         nds32_output_cbranchsi4_equality_zero,
11116         nds32_output_cbranchsi4_equality_reg,
11117         nds32_output_cbranchsi4_equality_reg_or_const_int,
11118         nds32_output_cbranchsi4_greater_less_zero): Declare.
11119         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11120         nds32_rimm11s_operand): New predicates.
11121         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11122         * config/nds32/nds32.md: Rewrite all the branch and conditional move
11123         patterns.
11125 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11127         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11128         * config/nds32/nds32.md: Ditto.
11129         * config/nds32/pipelines.md: Ditto.
11131 2018-04-04  Richard Biener  <rguenther@suse.de>
11133         PR tree-optimization/85168
11134         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11135         propagating abnormals.
11137 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11139         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11141 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11142             Kito Cheng  <kito.cheng@gmail.com>
11144         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11145         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11146         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11147         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11148         * config/nds32/nds32.md (sibcall_internal): New.
11149         (sibcall_register): Remove.
11150         (sibcall_immediate): Remove.
11151         (sibcall_value_internal): New.
11152         (sibcall_value_register): Remove.
11153         (sibcall_value_immediate): Remove.
11154         * config/nds32/predicates.md (nds32_general_register_operand): New.
11155         (nds32_call_address_operand): New.
11157 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
11159         PR rtl-optimization/85167
11160         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11161         bb_defs if *split_p, instead preinitialize it to NULL.
11163         PR tree-optimization/85156
11164         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11165         evaluating the argument multiple times.
11167 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
11169         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11170         than vector.
11171         (_mm_cvtpd_ps): Likewise.
11172         (_mm_cvttpd_epi32): Likewise.
11173         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11174         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11175         vector, pixel, and bool following altivec.h include.
11177 2018-04-03  Martin Sebor  <msebor@redhat.com>
11179         * doc/extend.texi (Common Function Attributes): Clarify.
11180         (const attribute): Likewise.
11181         (pure attribute): Likewise.
11183 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
11185         PR target/85169
11186         * config/i386/i386.c (ix86_expand_vector_set): Use
11187         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
11189 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
11191         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11192         instructions when changing rounding bits to preserve precision bits
11193         in the x87 control word.
11195 2018-04-03  Martin Liska  <mliska@suse.cz>
11197         PR tree-optimization/82491
11198         * rtl.h (strip_offset_and_add): Replace += suboffset with
11199         poly_uint64 () + suboffset.
11201 2018-03-29  Martin Liska  <mliska@suse.cz>
11202             Martin Jambor  <mjambor@suse.cz>
11204         PR ipa/84947
11205         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11206         param_type is not an integral or pointer type.
11208 2018-04-03  Richard Biener  <rguenther@suse.de>
11210         * sese.h (recompute_all_dominators): Remove.
11212 2018-04-02  Martin Sebor  <msebor@redhat.com>
11214         * doc/invoke.texi (-Wrestrict): Fix typos.
11216 2018-04-02  Jim Wilson  <jimw@sifive.com>
11218         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
11219         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
11220         (<optab>di3, <optab>si3_extend): Likewise.
11221         (<optab>si3_mask, <optab>si3_mask_1): New.
11222         (<optab>di3_mask, <optab>di3_mask_1): New.
11223         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
11224         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
11225         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
11227 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
11229         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
11230         example.
11232 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
11234         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
11235         (nds32_canonicalize_comparison): New function.
11237 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11238             Kito Cheng  <kito.cheng@gmail.com>
11239             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
11241         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
11242         * config/nds32/constants.md (unspec_volatile_element): Add
11243         UNSPEC_VOLATILE_RELAX_GROUP.
11244         * config/nds32/nds32-relax-opt.c: New file.
11245         * config/nds32/nds32-predicates.c
11246         (nds32_symbol_load_store_p): New function.
11247         * config/nds32/nds32-protos.h
11248         (nds32_symbol_load_store_p): Declare function.
11249         (make_pass_nds32_relax_opt): Declare new rtl pass function.
11250         * config/nds32/nds32.c
11251         (nds32_register_pass): New function to register pass.
11252         (nds32_register_passes): New function to register passes.
11253         * config/nds32/nds32.md (relax_group): New pattern.
11254         * config/nds32/nds32.opt (mrelax-hint): New option.
11255         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
11257 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
11259         * config/nds32/t-nds32: Modify files dependency.
11261 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11263         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
11264         (PROFILE_HOOK): Define its implementation.
11266 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11268         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
11269         type and 32-bit size.
11271 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
11273         PR middle-end/85090
11274         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
11275         (V_128_256): New mode iterator.
11276         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
11277         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
11278         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
11279         of V.
11280         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
11281         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
11283 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
11285         PR target/83315
11286         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
11287         NaN inputs correctly.
11289 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
11291         PR target/80546
11292         * config/rs6000/vsx.md (??r): New mode attribute.
11293         (*vsx_mov<mode>_64bit): Use it.
11294         (*vsx_mov<mode>_32bit): Likewise.
11296 2018-03-30  Martin Sebor  <msebor@redhat.com>
11298         PR tree-optimization/84818
11299         * builtins.c (check_access): Use warning_n.
11301 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11303         PR target/83822
11304         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11305         condition.
11306         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11307         condition.
11309 2018-03-30  Julia Koval  <julia.koval@intel.com>
11311         PR target/84413
11312         * x86-tune.def (movx, partial_reg_dependency): Enable for
11313         m_SKYLAKE_AVX512.
11315 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
11317         PR inline-asm/84985
11318         * lra-constraints.c (process_alt_operands): Move setting
11319         this_alternative_matches below.
11321 2018-03-29  Martin Liska  <mliska@suse.cz>
11323         PR lto/84995.
11324         * doc/invoke.texi: Document how LTO works with debug info.
11325         Describe auto-load support of binutils.  Mention 'x86-64'
11326         as valid option value of -march option.
11328 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
11330         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11332         PR c/85094
11333         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11334         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11335         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11336         checking.
11338 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11340         PR target/84912
11341         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11342         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11343         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11344         for RS6000_BTM_POWERPC64.
11345         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11346         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11347         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11348         definition.
11349         (DIVDE): Use it.
11350         (DIVDEU): Likewise.
11352 2018-03-28 Carl Love  <cel@us.ibm.com>
11354         Revert
11355         2017-09-27  Carl Love  <cel@us.ibm.com>
11357         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11358         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11359         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11360         fctiw instruction.
11362 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11364         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11365         instead of __vector bool.
11366         (_mm_max_pu8): Likewise.
11367         (_mm_min_pi16): Likewise.
11369 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11371         PR target/84912
11372         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11373         (DIVWEUO): Likewise.
11374         (DIVDEO): Likewise.
11375         (DIVDEUO): Likewise.
11376         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11377         DIVWEUO and DIVDEUO.
11378         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11379         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11380         (div_extend): Likewise.
11381         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11382         builtin function.
11383         (__builtin_divweuo): Likewise.
11384         (__builtin_divdeo): Likewise.
11385         (__builtin_divdeuo): Likewise.
11387 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11389         PR target/85095
11390         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11391         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11393         PR tree-optimization/82004
11394         * gimple-match-head.c (optimize_pow_to_exp): New function.
11395         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11396         Don't fold to exp if optimize_pow_to_exp is false.
11398 2018-03-28  Martin Liska  <mliska@suse.cz>
11400         PR other/84819
11401         * calls.c (initialize_argument_information): Fix trailing space.
11402         * common.opt: Fix typo and provide better explanation for
11403         -fsanitize-coverage option.
11404         * config/i386/i386.opt: Fix typo.
11406 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11407             Martin Liska  <mliska@suse.cz>
11409         PR sanitizer/85081
11410         * gimplify.c (asan_poison_variable): Don't do the check for
11411         gimplify_omp_ctxp here.
11412         (gimplify_decl_expr): Do it here.
11413         (gimplify_target_expr): Likewise.
11415 2018-03-28  Martin Liska  <mliska@suse.cz>
11417         PR target/84988
11418         * config/i386/i386.c (ix86_function_arg_advance): Do not call
11419         chkp_type_bounds_count if MPX is not enabled.
11421 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11423         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11425 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
11427         PR target/84914
11428         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11429         function to create the function decl for complex long double
11430         multiply and divide for -mabi=ieeelongdouble.
11431         (init_float128_ieee): Call it.
11433 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
11435         PR target/85044
11436         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11437         -fcf-protection=branch -mibt.
11438         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11440 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11442         PR target/81863
11443         * config/arm/arm.c (arm_valid_symbolic_address): Handle
11444         arm_word_relocations.
11446 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
11448         PR target/85056
11449         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11450         extern array declarations.
11452 2018-03-27  Richard Biener  <rguenther@suse.de>
11454         PR middle-end/84067
11455         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11456         explicit single_use checks.
11458 2018-03-27  Richard Biener  <rguenther@suse.de>
11460         PR tree-optimization/85082
11461         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11462         Valueize the VUSE.
11464 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11466         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11467         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11468         Turn on fasynchronous-unwind-tables and funwind-tables.
11470 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
11472         PR target/85073
11473         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11474         (*bmi_blsr_<mode>_ccz): Ditto.
11476 2018-03-26  Tom de Vries  <tom@codesourcery.com>
11478         PR tree-optimization/85063
11479         * omp-general.c (offloading_function_p): New function.  Factor out
11480         of ...
11481         * omp-offload.c (pass_omp_target_link::gate): ... here.
11482         * omp-general.h (offloading_function_p): Declare.
11483         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11484         with attribute omp declare target for offloading functions.
11486 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
11488         PR tree-optimization/84005
11489         * tree-data-ref.h (get_base_for_alignment): Declare.
11490         * tree-data-ref.c (get_base_for_alignment_1): New function.
11491         (get_base_for_alignment): Likewise.
11492         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11493         get_base_for_alignment to find a suitable base object, instead
11494         of always using drb->base_address.
11496 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
11498         PR inline-asm/85022
11499         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11500         known size by default.
11502 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
11504         PR inline-asm/85030
11505         * lra-constraints.c (process_alt_operands): Don't match BLKmode
11506         and non BLKmode operands.
11508 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11510         PR target/85026
11511         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11512         Clean up attributes.
11514 2018-03-23  Richard Biener  <rguenther@suse.de>
11516         PR debug/85020
11517         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11518         we are going to emit early debug for LTO.
11520 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
11522         PR inline-asm/85034
11523         * function.c (match_asm_constraints_1): Don't optimize if input
11524         doesn't satisfy general_operand predicate for output's mode.
11526         PR inline-asm/85022
11527         * alias.c (write_dependence_p): Don't require for x_canonicalized
11528         non-VOIDmode if x has VOIDmode.
11530         PR sanitizer/85029
11531         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11532         just don't try to optimize it rather than assert it never happens.
11534 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11536         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11537         macro expansions for definition of ST_INTERNAL_<mode> and
11538         LD_INTERNAL_<mode> builtins.
11539         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11540         Remove prototype.
11541         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11542         function.
11543         (altivec_expand_st_builtin): Likewise.
11544         (altivec_expand_builtin): Remove calls to deleted functions.
11545         (rs6000_address_for_altivec): Delete this function.
11546         * config/rs6000/vector.md: Remove expands for
11547         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11549 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
11551         PR target/84826
11552         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11553         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11554         re-computing once computed.
11555         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11556         (arm_init_machine_status): Initialize
11557         machine->static_chain_stack_bytes.
11559 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11561         PR target/84760
11562         * doc/extend.texi: Add four new prototypes for vec_ld.
11563         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11564         definitions for more logical presentation.
11565         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11566         entries for V1TI variants of __builtin_altivec_ld builtin.
11567         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11568         handling of V1TI variant of LVX icode pattern.
11569         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11570         (rs6000_gimple_fold_builtin): Likewise.
11571         (altivec_init_builtins): Add code to define
11572         __builtin_altivec_lvx_v1ti function.
11574 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
11576         PR inline-asm/84941
11577         * function.c (match_asm_constraints_1): Don't do the optimization
11578         if input isn't a REG, SUBREG, MEM or constant.
11580 2018-03-22  Tom de Vries  <tom@codesourcery.com>
11582         PR tree-optimization/84956
11583         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11584         bb_has_abnormal_pred.
11586 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
11588         PR sanitizer/85018
11589         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11590         DECL_INITIAL (decl) to decl at the end.
11591         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11592         adjust the comment.
11594 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
11596         * doc/extend.texi (__builtin_tgmath): Document when complex
11597         integer types are treated as _Complex _Float64.
11599 2018-03-21  Tom de Vries  <tom@codesourcery.com>
11601         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11603 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11605         PR tree-optimization/84960
11606         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11607         if it is ENTRY block, move them into single succ of ENTRY in that case.
11609 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
11611         PR tree-optimization/84811
11612         * poly-int.h (poly_span_traits): Remove the T3 parameter and
11613         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11614         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11615         (known_subrange_p): Update accordingly.  Cast each value involved
11616         in the size comparison, rather than casting the result of the
11617         subtraction.
11619 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11621         PR tree-optimization/84982
11622         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11623         by flipping the least significant bit rather than all bits from
11624         bitpos to bitpos + bitsize - 1.
11626 2018-03-21  Nathan Sidwell  <nathan@acm.org>
11628         * doc/extend.texi (Deprecated Features): Remove mention of
11629         long-deleted deprecations.
11631 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11633         PR jit/84288
11634         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11635         * configure: Regenerate.
11637 2018-03-21  Tom de Vries  <tom@codesourcery.com>
11639         PR tree-optimization/83126
11640         * tree-parloops.c (num_phis): New function.
11641         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11643 2018-03-21  Nathan Sidwell  <nathan@acm.org>
11645         * doc/extend.texi (Deprecated Features): Update deprecated flags,
11646         mention anon-struct/union members and trailing attributes.
11648 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
11650         PR tree-optimization/84969
11651         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11652         builtin memset partitions if they set different rhs values.
11654 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11656         PR rtl-optimization/84989
11657         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11658         VEC_DUPLICATE with scalar result mode.
11660 2018-03-21  Martin Liska  <mliska@suse.cz>
11662         PR ipa/84963
11663         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11664         not intended return statement.
11666 2018-03-21  Martin Liska  <mliska@suse.cz>
11668         PR target/84988
11669         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11670         (chkp_find_bound_slots_1): Limit number of iterations.
11672 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
11674         PR target/84838
11675         * Minor grammar fixes for x86 options.
11677 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11679         PR debug/84875
11680         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11681         holding REG_CFA_RESTORE notes, instead turn them into a USE.
11683 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
11685         PR target/83789
11686         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11687         (altivec_lvx_<mode>_1op): Likewise.
11688         (altivec_stvx_<mode>_2op): Likewise.
11689         (altivec_stvx_<mode>_1op): Likewise.
11690         (altivec_lvx_<VM2:mode>): New define_expand.
11691         (altivec_stvx_<VM2:mode>): Likewise.
11692         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11693         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11694         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11695         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11696         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11697         (rs6000_gen_lvx): Likewise.
11698         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11699         (altivec_expand_stv_builtin): Likewise.
11700         (altivec_expand_builtin): Likewise.
11701         * config/rs6000/vector.md: Likewise.
11703 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11705         PR target/82518
11706         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11707         BYTES_BIG_ENDIAN.
11709 2018-03-20  Richard Biener  <rguenther@suse.de>
11711         PR target/84986
11712         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11713         sign-conversions as zero, fall back to standard scalar_stmt
11714         cost for the rest.
11716 2018-03-20  Martin Liska  <mliska@suse.cz>
11718         PR ipa/84825
11719         * predict.c (rebuild_frequencies): Handle case when we have
11720         PROFILE_ABSENT, but flag_guess_branch_prob is false.
11722 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11724         PR target/84990
11725         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11726         flag_section_anchors.
11727         * varasm.c (use_blocks_for_decl_p): Remove hack for
11728         dw2_force_const_mem.
11730         PR target/84845
11731         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11732         to ...
11733         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
11734         be created, use lowpart_subreg of operands[0] rather than operands[0]
11735         itself.
11736         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11737         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11738         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11739         and n constraint instead of aarch64_shift_imm_di and Usd.
11740         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11741         (*aarch64_<optab>_reg_minus<mode>3): ... this.
11743 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
11745         PR target/82989
11746         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11747         to favor GPR over NEON registers.
11748         (<shift>di3_neon): Likewise.
11750 2018-03-20  Tom de Vries  <tom@codesourcery.com>
11752         PR target/84952
11753         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11754         (nvptx_process_pars): Emit bar.sync asap and alap.
11756 2018-03-20  Tom de Vries  <tom@codesourcery.com>
11758         PR target/84954
11759         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11760         seen_label if seen_label is already set.
11762 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11764         PR target/84945
11765         * config/i386/i386.c (fold_builtin_cpu): For features above 31
11766         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11767         Use 1U instead of 1.  Formatting fixes.
11769         PR c/84953
11770         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11771         instead of TREE_TYPE (s1) for the return value.
11773 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
11775         PR tree-optimization/84946
11776         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11777         bitsize + bitsize in poly_uint64 rather than poly_int64.
11779         PR sanitizer/78651
11780         * dwarf2asm.c: Include fold-const.c.
11781         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11782         of decl rather than decl itself.
11784         PR rtl-optimization/84643
11785         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11787 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
11789         PR sanitizer/78651
11790         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11791         calling assemble_variable.
11793 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
11795         PR target/81647
11796         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11797         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11799 2018-03-19  Jim Wilson  <jimw@sifive.com>
11801         PR bootstrap/84856
11802         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11803         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11804         (riscv_first_stack_step): Likewise.
11805         (riscv_option_override): Use STACK_BOUNDARY instead of
11806         MIN_STACK_BOUNDARY.
11807         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11808         MIN_STACK_BOUNDARY.
11809         (BIGGEST_ALIGNMENT): Set to 128.
11810         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11811         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11812         STACK_BOUNDARY.
11814 2018-03-19  Richard Biener  <rguenther@suse.de>
11816         PR tree-optimization/84933
11817         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11818         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11820 2018-03-19  Richard Biener  <rguenther@suse.de>
11822         PR tree-optimization/84859
11823         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11824         (cond_if_else_store_replacement): Perform sinking operation on
11825         single-store BBs regardless of MAX_STORES_TO_SINK setting.
11826         Generalize what a BB with a single eligible store is.
11828 2018-03-19  Richard Biener  <rguenther@suse.de>
11830         PR tree-optimization/84929
11831         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11832         chrec_is_positive against non-chrec arg.
11834 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
11836         PR target/84711
11837         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11839 2018-03-18  Martin Liska  <mliska@suse.cz>
11841         PR rtl-optimization/84635
11842         * regrename.c (build_def_use): Use matches_mode only when
11843         matches >= 0.
11845 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
11847         PR tree-optimization/84913
11848         * tree-vect-loop.c (vectorizable_reduction): Don't try to
11849         vectorize chains of COND_EXPRs.
11851 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11853         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11855 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11857         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11859 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11861         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11863 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11864             Kito Cheng  <kito.cheng@gmail.com>
11866         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11867         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11868         (nds32_adjust_reg_alloc_order): New function.
11869         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11871 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
11873         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11874         nds32_print_operand, nds32_print_operand_address): Use
11875         HOST_WIDE_INT_PRINT_DEC instead.
11877 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11879         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11881 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
11883         PR target/84902
11884         * config/i386/i386.c (initial_ix86_tune_features,
11885         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11886         unsigned long long.
11887         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11888         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11889         rather than 1u << ix86_tune.  Formatting fix.
11890         (ix86_option_override_internal): Change ix86_arch_mask from
11891         unsigned int to unsigned HOST_WIDE_INT, initialize to
11892         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11893         (ix86_function_specific_restore): Likewise.
11895 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11897         PR target/84899
11898         * postreload.c (reload_combine_recognize_pattern): Perform
11899         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11900         truncate_int_for_mode the result for the destination's mode.
11902         PR c/84909
11903         * hsa-gen.c (mem_type_for_type): Fix comment typo.
11904         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11905         Likewise.
11906         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11907         Likewise.
11909 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
11911         PR target/84876
11912         * lra-assigns.c (lra_split_hard_reg_for): Don't use
11913         regno_allocno_class_array and sorted_pseudos.
11914         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11915         insns where regno is used.
11917 2018-03-16  Martin Liska  <mliska@suse.cz>
11919         PR ipa/84833
11920         * multiple_target.c (create_dispatcher_calls): Redirect
11921         reference in the symbol table.
11923 2018-03-16  Martin Liska  <mliska@suse.cz>
11925         PR ipa/84722
11926         * multiple_target.c (create_dispatcher_calls): Redirect also
11927         an alias.
11929 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11931         PR c++/79937
11932         PR c++/82410
11933         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11934         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11935         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11937 2018-03-16  Julia Koval  <julia.koval@intel.com>
11939         * doc/invoke.texi (Skylake Server): Add CLWB.
11940         Cannonlake): Remove CLWB.
11942 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11944         PR tree-optimization/84841
11945         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11946         1 << 3.
11947         (FLOAT_ONE_CONST_TYPE): Define.
11948         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11949         (sort_by_operand_rank): Put entries with higher constant_type last
11950         rather than first to match comments.
11952 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
11954         * config/nios2/nios2.md (movsi_internal): Fix thinko in
11955         split predicate.
11957 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
11959         PR c++/79085
11960         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11961         check and use address of target always.
11963 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
11965         PR target/84574
11966         * config/i386/i386.c (indirect_thunk_needed): Update comments.
11967         (indirect_thunk_bnd_needed): Likewise.
11968         (indirect_thunks_used): Likewise.
11969         (indirect_thunks_bnd_used): Likewise.
11970         (indirect_return_needed): New.
11971         (indirect_return_bnd_needed): Likewise.
11972         (output_indirect_thunk_function): Add a bool argument for
11973         function return.
11974         (output_indirect_thunk_function): Don't generate alias for
11975         function return thunk.
11976         (ix86_code_end): Call output_indirect_thunk_function to generate
11977         function return thunks.
11978         (ix86_output_function_return): Set indirect_return_bnd_needed
11979         and indirect_return_needed instead of indirect_thunk_bnd_needed
11980         and indirect_thunk_needed.
11982 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
11984         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11985         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11986         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11988 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
11989             Paul Hua <paul.hua.gm@gmail.com>
11991         PR c/84852
11992         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11994 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
11996         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11997         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11998         resp. SFmode cases.
12000 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
12002         PR target/84711
12003         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12004         instead of GET_MODE_SIZE when comparing Units.
12006 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12008         PR target/68256
12009         * varasm.c (hash_section): Return an unchangeble hash value
12010         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12011         Return !aarch64_can_use_per_function_literal_pools_p ().
12013 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
12015         PR target/84860
12016         * optabs.c (emit_conditional_move): Pass address of cmode's copy
12017         rather than address of cmode as last argument to prepare_cmp_insn.
12019 2018-03-15  Julia Koval  <julia.koval@intel.com>
12021         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12022         F_AVX512VNNI, F_AVX512BITALG): New.
12024 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
12026         PR target/83451
12027         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
12028         insn for floating-point loads and stores.
12030 2018-03-14  Carl Love  <cel@us.ibm.com>
12032         * config/rs6000/rs6000-c.c: Add macro definitions for
12033         ALTIVEC_BUILTIN_VEC_PERMXOR.
12034         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12035         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12036         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12037         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12038         UNSPEC_VPERMXOR.
12039         * config/doc/extend.texi: Add prototypes for vec_permxor.
12041 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
12043         PR c/84852
12044         * diagnostic-show-locus.c (class layout_point): Convert m_line
12045         from int to linenum_type.
12046         (line_span::comparator): Use linenum "compare" function when
12047         comparing line numbers.
12048         (test_line_span): New function.
12049         (layout_range::contains_point): Convert param "row" from int to
12050         linenum_type.
12051         (layout_range::intersects_line_p): Likewise.
12052         (layout::will_show_line_p): Likewise.
12053         (layout::print_source_line): Likewise.
12054         (layout::should_print_annotation_line_p): Likewise.
12055         (layout::print_annotation_line): Likewise.
12056         (layout::print_leading_fixits): Likewise.
12057         (layout::annotation_line_showed_range_p): Likewise.
12058         (struct line_corrections): Likewise for field m_row.
12059         (line_corrections::line_corrections): Likewise for param "row".
12060         (layout::print_trailing_fixits): Likewise.
12061         (layout::get_state_at_point): Likewise.
12062         (layout::get_x_bound_for_row): Likewise.
12063         (layout::print_line): Likewise.
12064         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12065         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12066         * input.c (selftest::test_linenum_comparisons): New function.
12067         (selftest::input_c_tests): Call it.
12068         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12069         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12070         * selftest.h (ASSERT_GT): New macro.
12071         (ASSERT_GT_AT): New macro.
12072         (ASSERT_LT): New macro.
12073         (ASSERT_LT_AT): New macro.
12075 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
12077         PR rtl-optimization/84780
12078         * combine.c (distribute_links): Don't make a link based on pc_rtx.
12080 2018-03-14  Martin Liska  <mliska@suse.cz>
12082         * tree.c (record_node_allocation_statistics): Use
12083         get_stats_node_kind.
12084         (get_stats_node_kind): New function extracted from
12085         record_node_allocation_statistics.
12086         (free_node): Use get_stats_node_kind.
12088 2018-03-14  Richard Biener  <rguenther@suse.de>
12090         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12091         that the value-set of ANTIC_IN doesn't grow.
12093         Revert
12094         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12095         member.
12096         (BB_VISITED_WITH_VISITED_SUCCS): New define.
12097         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12099 2018-03-14  Julia Koval  <julia.koval@intel.com>
12101         * config.gcc (icelake-client, icelake-server): New.
12102         (icelake): Remove.
12103         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12104         (initial_ix86_arch_features): Ditto.
12105         (PTA_SKYLAKE): Add SGX.
12106         (PTA_ICELAKE): Remove.
12107         (PTA_ICELAKE_CLIENT): New.
12108         (PTA_ICELAKE_SERVER): New.
12109         (ix86_option_override_internal): Split up icelake on icelake client and
12110         icelake server.
12111         (get_builtin_code_for_version): Ditto.
12112         (fold_builtin_cpu): Ditto.
12113         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12114         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12115         * config/i386/i386.h (processor_type): Ditto.
12116         * doc/invoke.texi: Ditto.
12118 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
12120         PR sanitizer/83392
12121         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12122         INTEGER_CST offset, add it together with bitpos / 8 and
12123         sign extend based on POINTER_SIZE.
12125         PR target/84844
12126         Revert
12127         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
12129         PR target/78090
12130         * config/i386/constraints.md (Yc): New register constraint.
12131         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12132         Use Yc constraint for alternative 2 of operand 0.  Remove
12133         preferred_for_speed attribute.
12135 2018-03-14  Richard Biener  <rguenther@suse.de>
12137         PR tree-optimization/84830
12138         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12139         with the old one to avoid oscillations.
12141 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
12143         PR target/83712
12144         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12145         pseudos.
12146         (assign_by_spills): Return a flag of reload assignment failure.
12147         Do not process the reload assignment failures.  Do not spill other
12148         reload pseudos if they has the same reg class.  Update n if
12149         necessary.
12150         (lra_assign): Add a return arg.  Set up from the result of
12151         assign_by_spills call.
12152         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12153         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12154         usage_insns if it is not NULL.
12155         (spill_hard_reg_in_range): New function.
12156         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12157         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12158         function prototypes.
12159         (lra_assign): Change prototype.
12160         * lra.c (lra): Add code to deal with fails by splitting hard reg
12161         live ranges.
12163 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
12165         * config/riscv/riscv.opt (mrelax): New option.
12166         * config/riscv/riscv.c (riscv_file_start): Emit ".option
12167         "norelax" when riscv_mrelax is disabled.
12168         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12170 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12172         PR target/84743
12173         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12174         reassociation for int modes.
12176 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12178         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12179         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12180         for big-endian.
12181         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12182         * config/aarch64/aarch64-sve.md
12183         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12184         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12185         (*extend<mode><Vwide>2): Rename to...
12186         (aarch64_sve_extend<mode><Vwide>2): ...this.
12187         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12188         renaming the old pattern to...
12189         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
12190         unsigned packs.
12191         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12192         define_expand, renaming the old pattern to...
12193         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12194         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12195         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12196         account when deciding which SVE instruction the optab should use.
12197         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12199 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12201         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12202         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12203         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12204         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12205         (tlsdesc_small_<mode>): Turn a define_expand and use
12206         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
12207         (tlsdesc_small_advsimd_<mode>): ...this.
12208         (tlsdesc_small_sve_<mode>): New pattern.
12210 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12212         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
12213         (UNSPEC_UMUL_HIGHPART): New constants.
12214         (MUL_HIGHPART): New int iteraor.
12215         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
12216         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
12217         define_expand.
12218         (*<su>mul<mode>3_highpart): New define_insn.
12220 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12222         PR lto/84805
12223         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12224         incomplete types.
12226 2018-03-13  Martin Liska  <mliska@suse.cz>
12228         PR ipa/84658.
12229         * (sem_item_optimizer::sem_item_optimizer): Initialize new
12230         vector.
12231         (sem_item_optimizer::~sem_item_optimizer): Release it.
12232         (sem_item_optimizer::merge_classes): Register variable aliases.
12233         (sem_item_optimizer::fixup_pt_set): New function.
12234         (sem_item_optimizer::fixup_points_to_sets): Likewise.
12235         * ipa-icf.h: Declare new variables and functions.
12237 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
12239         PR middle-end/84834
12240         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
12241         integer_pow2p@2 and test integer_pow2p in condition.
12242         (A < 0 ? C : 0): Similarly for @1.
12244         PR middle-end/84831
12245         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
12246         characters starting at p contain '\0' character, don't look beyond
12247         that.
12249         PR target/84827
12250         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
12251         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
12253         PR target/84828
12254         * reg-stack.c (change_stack): Change update_end var from int to
12255         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
12256         also call set_block_for_insn on the newly added insns and rescan.
12258         PR target/84786
12259         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
12260         on the last operand.
12262         PR c++/84704
12263         * tree.c (stabilize_reference_1): Return save_expr (e) for
12264         STATEMENT_LIST even if it doesn't have side-effects.
12266 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
12268         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
12270 2018-03-12  Renlin Li  <renlin.li@arm.com>
12272         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
12273         aarch64_output_scalar_simd_mov_immediate.
12275 2018-03-12  Martin Sebor  <msebor@redhat.com>
12277         PR tree-optimization/83456
12278         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
12279         for perfectly overlapping calls to memcpy.
12280         (gimple_fold_builtin_memory_chk): Same.
12281         (gimple_fold_builtin_strcpy): Handle no-warning.
12282         (gimple_fold_builtin_stxcpy_chk): Same.
12283         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
12285 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
12287         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12288         parameter.  Use it for SFmode.
12289         (rs6000_function_arg_advance_1): Adjust.
12290         (rs6000_function_arg): Adjust.
12291         (rs6000_gimplify_va_arg): Pass false for that new parameter.
12293 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
12295         PR rtl-optimization/84169
12296         PR rtl-optimization/84780
12297         * combine.c (can_combine_p): Check for a 2-insn combination whether
12298         the destination register is used between the two insns, too.
12300 2018-03-12  Richard Biener  <rguenther@suse.de>
12302         PR tree-optimization/84803
12303         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12304         for refs DR analysis didn't process.
12306 2018-03-12  Richard Biener  <rguenther@suse.de>
12308         PR tree-optimization/84777
12309         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12310         force-vectorize loops ignore whether we are optimizing for size.
12312 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12314         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12315         (TARGET_MD_ASM_ADJUST): Define.
12317 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
12318             Kito Cheng  <kito.cheng@gmail.com>
12319             Chung-Ju Wu  <jasonwucj@gmail.com>
12321         * config/nds32/nds32.c (nds32_compute_stack_frame,
12322         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12323         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12324         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12325         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12326         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12327         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12328         * config/nds32/nds32.md (prologue, epilogue): Use macro
12329         NDS32_V3PUSH_AVAILABLE_P to do checking.
12331 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
12333         PR debug/58150
12334         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12335         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12336         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
12337         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
12338         addition of most attributes on !orig_type_die or the attribute not
12339         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12341 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12342             Chung-Ju Wu  <jasonwucj@gmail.com>
12344         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12345         __NDS32_VH__ macro.
12346         * config/nds32/nds32.opt (mvh): New option.
12348 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12349             Chung-Ju Wu  <jasonwucj@gmail.com>
12351         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12352         function.
12353         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12354         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12355         definition.
12357 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12358             Chung-Ju Wu  <jasonwucj@gmail.com>
12360         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12361         function.
12362         * config/nds32/nds32-multiple.md (strlensi): New pattern.
12363         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12365 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
12366             Kito Cheng  <kito.cheng@gmail.com>
12367             Chung-Ju Wu  <jasonwucj@gmail.com>
12369         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12370         UNSPEC_FFMISM and UNSPEC_FLMISM.
12371         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12372         for ffb, ffmism and flmism.
12373         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12374         (unspec_ffmism): Ditto.
12375         (unspec_flmism): Ditto.
12376         (nds32_expand_builtin_impl): Check if string extension is available.
12377         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12378         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12380 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
12382         Reverting patch:
12383         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12385         PR target/83712
12386         * lra-assigns.c (assign_by_spills): Return a flag of reload
12387         assignment failure.  Do not process the reload assignment
12388         failures.  Do not spill other reload pseudos if they has the same
12389         reg class.
12390         (lra_assign): Add a return arg.  Set up from the result of
12391         assign_by_spills call.
12392         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12393         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12394         usage_insns if it is not NULL.
12395         (spill_hard_reg_in_range): New function.
12396         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12397         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12398         function prototypes.
12399         (lra_assign): Change prototype.
12400         * lra.c (lra): Add code to deal with fails by splitting hard reg
12401         live ranges.
12403 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
12405         PR target/84807
12406         * config/i386/i386.opt: Replace Enforcment with Enforcement.
12408 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
12410         PR debug/84620
12411         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12412         (dw_val_node): Add val_symbolic_view.
12413         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12414         (symview_upper_bound): New.
12415         (new_line_info_table): Initialize symviews_since_reset.
12416         (dwarf2out_source_line): Count symviews_since_reset and set
12417         symview_upper_bound.
12418         (dw_val_equal_p): Handle symview.
12419         (add_AT_symview): New.
12420         (print_dw_val): Handle symview.
12421         (attr_checksum, attr_checksum_ordered): Likewise.
12422         (same_dw_val_p, size_of_die): Likewise.
12423         (value_format, output_die): Likewise.
12424         (add_high_low_attributes): Use add_AT_symview for entry_view.
12425         (dwarf2out_finish): Reset symview_upper_bound, clear
12426         zero_view_p.
12428 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
12430         PR target/83969
12431         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12432         Add strict argument and use it.
12433         (rs6000_split_multireg_move): Update for new strict argument.
12434         (mem_operand_gpr): Disallow all non-offsettable addresses.
12435         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12437 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
12439         PR target/84772
12440         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12441         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12442         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12444         PR c++/84767
12445         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12446         decl, use remap_type if we want to use the type.
12448 2018-03-09  Martin Sebor  <msebor@redhat.com>
12450         PR tree-optimization/84526
12451         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12452         Remove dead code.
12453         (builtin_access::generic_overlap): Be prepared to handle non-array
12454         base objects.
12456 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
12458         PR rtl-optimization/84682
12459         * lra-constraints.c (process_address_1): Check is_address flag
12460         for address constraints.
12461         (process_alt_operands): Likewise.
12462         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12463         preprocess_constraints.
12464         * recog.h (preprocess_constraints): Add oploc parameter.
12465         Adjust callers.
12466         * recog.c (preprocess_constraints): Test address_operand for
12467         CT_ADDRESS constraints.
12469 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12471         PR target/83712
12472         * lra-assigns.c (assign_by_spills): Return a flag of reload
12473         assignment failure.  Do not process the reload assignment
12474         failures.  Do not spill other reload pseudos if they has the same
12475         reg class.
12476         (lra_assign): Add a return arg.  Set up from the result of
12477         assign_by_spills call.
12478         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12479         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12480         usage_insns if it is not NULL.
12481         (spill_hard_reg_in_range): New function.
12482         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12483         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12484         function prototypes.
12485         (lra_assign): Change prototype.
12486         * lra.c (lra): Add code to deal with fails by splitting hard reg
12487         live ranges.
12489 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12491         PR target/83193
12492         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12493         Accept complain bool parameter.  Only emit errors if it is true.
12494         (arm_parse_cpu_option_name): Likewise.
12495         (arm_target_thumb_only): Adjust callers of the above.
12496         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12497         prototype to take a default true bool parameter.
12498         (arm_parse_arch_option_name): Likewise.
12500 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
12501             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
12503         PR jit/64089
12504         PR jit/84288
12505         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12506         * configure: Regenerate.
12507         * configure.ac ("linker --version-script option"): New.
12508         ("linker soname option"): New.
12510 2018-03-09  Richard Biener  <rguenther@suse.de>
12512         PR tree-optimization/84775
12513         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12514         immediate uses of predicate stmts and mark them modified.
12516         Revert
12517         PR tree-optimization/84178
12518         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12519         to caller.
12520         (version_loop_for_if_conversion): Delay update_ssa call.
12521         (tree_if_conversion): Delay update_ssa until after predicate
12522         insertion.
12524 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
12526         PR target/84763
12527         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12528         when the function accesses prior frames.
12530 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
12532         PR debug/84456
12533         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12534         gen_llsym, otherwise call maybe_gen_llsym.
12536         PR inline-asm/84742
12537         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12538         has ',' character inside of it.
12540 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12542         PR target/84748
12543         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12544         as clobbering CC_REGNUM.
12546 2018-03-08  Richard Biener  <rguenther@suse.de>
12548         PR middle-end/84552
12549         * tree-scalar-evolution.c: Include tree-into-ssa.h.
12550         (follow_copies_to_constant): Do not follow SSA names registered
12551         for update.
12553 2018-03-08  Richard Biener  <rguenther@suse.de>
12555         PR tree-optimization/84178
12556         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12557         to caller.
12558         (version_loop_for_if_conversion): Delay update_ssa call.
12559         (tree_if_conversion): Delay update_ssa until after predicate
12560         insertion.
12562 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
12564         PR tree-optimization/84178
12565         * tree-if-conv.c (release_bb_predicate): Remove the
12566         the assertion that the stmts have NULL use_ops.
12567         Discard the statements, asserting that they haven't
12568         yet been added to a BB.
12570 2018-03-08  Richard Biener  <rguenther@suse.de>
12572         PR tree-optimization/84746
12573         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12574         (phi_translate): Pass in destination ANTIC_OUT set.
12575         (phi_translate_1): Likewise.  For a simplified result lookup
12576         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12577         (phi_translate_set): Adjust.
12578         (do_pre_regular_insertion): Likewise.
12579         (do_pre_partial_partial_insertion): Likewise.
12581 2018-03-08  Martin Liska  <mliska@suse.cz>
12583         PR gcov-profile/84735
12584         * doc/gcov.texi: Document usage of profile files.
12585         * gcov-io.h: Document changes in the format.
12587 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
12589         PR debug/84404
12590         PR debug/84408
12591         * dwarf2out.c (struct dw_line_info_table): Update comments for
12592         view == -1.
12593         (FORCE_RESET_NEXT_VIEW): New.
12594         (FORCE_RESETTING_VIEW_P): New.
12595         (RESETTING_VIEW_P): Check for -1 too.
12596         (ZERO_VIEW_P): Likewise.
12597         (new_line_info_table): Force-reset next view.
12598         (dwarf2out_begin_function): Likewise.
12599         (dwarf2out_source_line): Simplify zero_view_p initialization.
12600         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12601         view directly.  Omit view when omitting .loc at line 0.
12603 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
12605         PR tree-optimization/84740
12606         * tree-switch-conversion.c (process_switch): Call build_constructors
12607         only if info.phi_count is non-zero.
12609         PR tree-optimization/84739
12610         * tree-tailcall.c (find_tail_calls): Check call arguments against
12611         DECL_ARGUMENTS (current_function_decl) rather than
12612         DECL_ARGUMENTS (func) when checking for tail recursion.
12614 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
12616         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12617         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12618         Volker Reichelt's entry and add entries for people that perform
12619         GCC fuzzy testing and report numerous bugs.
12621 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
12623         PR target/82411
12624         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12625         readonly data in sdata, if that is disabled.
12626         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12627         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12628         -mreadonly-in-sdata option.
12630 2018-03-07  Martin Sebor  <msebor@redhat.com>
12632         PR tree-optimization/84468
12633         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12634         basic block when looking for nul assignment.
12636 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
12638         PR target/84277
12639         * except.h (output_function_exception_table): Adjust prototype.
12640         * except.c (output_function_exception_table): Remove FNNAME parameter
12641         and add SECTION parameter.  Ouput one part of the table at a time.
12642         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12643         the first part of the exception table and emit unwind directives.
12644         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12645         (i386_pe_seh_cold_init): Likewise.
12646         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12647         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12648         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12649         (ix86_output_call_insn): Emit a nop in one more case for SEH.
12650         * config/i386/winnt.c: Include except.h.
12651         (struct seh_frame_state): Add reg_offset, after_prologue and
12652         in_cold_section fields.
12653         (i386_pe_seh_end_prologue): Set seh->after_prologue.
12654         (i386_pe_seh_cold_init): New function.
12655         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12656         to seh->in_cold_section.
12657         (seh_emit_push): Record the offset of the push.
12658         (seh_emit_save): Record the offet of the save.
12659         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12660         Test seh->after_prologue to disregard the epilogue.
12661         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12662         (i386_pe_end_cold_function): New function.
12664 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
12666         PR fortran/84565
12667         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12668         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12670         PR c++/84704
12671         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12672         on tmp_var.
12673         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12674         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12676         PR middle-end/84723
12677         * multiple_target.c: Include tree-inline.h and intl.h.
12678         (expand_target_clones): Diagnose and fail if node->definition and
12679         !tree_versionable_function_p (node->decl).
12681 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
12683         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12684         sprint_ul.
12685         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12686         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12687         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12689 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
12691         PR target/84710
12692         * combine.c (try_combine): Use reg_or_subregno instead of handling
12693         just paradoxical SUBREGs and REGs.
12695 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
12697         * config/arc/arc.c (arc_finalize_pic): Remove function.
12698         (arc_must_save_register): We use single base PIC register, remove
12699         checks to save/restore the PIC register.
12700         (arc_expand_prologue): Likewise.
12701         * config/arc/arc-protos.h (arc_set_default_type_attributes):
12702         Remove.
12703         (arc_verify_short): Likewise.
12704         (arc_attr_type): Likewise.
12705         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12706         (walk_stores): Likewise.
12707         (arc_address_cost): Make it static.
12708         (arc_verify_short): Likewise.
12709         (branch_dest): Likewise.
12710         (arc_attr_type): Likewise.
12711         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12712         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12713         (arc_final_prescan_insn): Remove inserting the nops due to
12714         hardware hazards.  It is done in reorg step.
12715         (insn_length_variant_t): Remove.
12716         (insn_length_parameters_t): Likewise.
12717         (arc_insn_length_parameters): Likewise.
12718         (arc_get_insn_variants): Likewise.
12719         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12721 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
12723         PR inline-asm/84683
12724         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12725         assertion failure.
12727         PR tree-optimization/84687
12728         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12729         on new_node->decl.
12730         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12732 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12734         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12735         Rename to ppc_speculation_barrier.
12736         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12737         __builtin_ppc_speculation_barrier.
12739 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
12741         PR target/84700
12742         * combine.c (combine_simplify_rtx): Don't try to simplify if
12743         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12744         are equal to x.
12746 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
12748         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12749         to 32 bytes when compiling for POWER9.
12751 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
12753         PR target/84564
12754         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12755         regparm >= 3 with no arg reg available also for calls with
12756         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
12758         PR target/84524
12759         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12760         orig,vex.
12761         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
12763 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
12765         PR target/84264
12766         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12768 2018-03-05  Richard Biener  <rguenther@suse.de>
12770         PR tree-optimization/84486
12771         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12772         When inserting a __builtin_assume_aligned call set the LHS
12773         SSA name alignment info accordingly.
12775 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
12777         PR tree-optimization/84114
12778         * config/aarch64/aarch64.c (aarch64_reassociation_width)
12779         Avoid reassociation of FLOAT_MODE addition.
12781 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
12783         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12784         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12785         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12786         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12787         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12788         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12789         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12790         and -mwbnoinvd.
12791         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12792         __builtin_ia32_wbinvd): New builtins.
12793         (SPECIAL_ARGS2): New.
12794         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12795         (SPECIAL_ARGS2): New.
12796         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12797         (ix86_valid_target_attribute_inner_p): Ditto.
12798         (ix86_init_mmx_sse_builtins): Add special_args2.
12799         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12800         TARGET_WBNOINVD_P): New.
12801         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12802         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12803         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12804         * config/i386/immintrin.h (_wbinvd): New intrinsic.
12805         * config/i386/pconfigintrin.h: New file.
12806         * config/i386/wbnoinvdintrin.h: Ditto.
12807         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12808         wbnoinvdintrin.h.
12809         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12811 2018-03-05  Richard Biener  <rguenther@suse.de>
12813         PR tree-optimization/84670
12814         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12815         member.
12816         (BB_VISITED_WITH_VISITED_SUCCS): New define.
12817         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12818         (compute_antic_aux): Only assert the number of values in ANTIC_IN
12819         doesn't grow if all successors (recursively) were visited at least
12820         once.
12822 2018-03-05  Richard Biener  <rguenther@suse.de>
12824         PR tree-optimization/84650
12825         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12826         if executed in the loop pipeline.
12828 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
12830         * doc/configfiles.texi (Configuration Files): Move info about
12831         conditionalizing $target-protos.h to...
12832         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
12833         differs from $target-protos.h.
12835 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
12836             Chung-Ju Wu  <jasonwucj@gmail.com>
12838         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12839         * config/nds32/nds32-multiple.md (setmemsi): Define.
12840         * config/nds32/nds32-memory-manipulation.c
12841         (nds32_gen_dup_4_byte_to_word_value): New.
12842         (emit_setmem_word_loop): New.
12843         (emit_setmem_byte_loop): New.
12844         (nds32_expand_setmem_loop): New.
12845         (nds32_expand_setmem_loop_v3m): New.
12846         (nds32_expand_setmem_unroll): New.
12847         (nds32_expand_setmem): New.
12849 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12850             Chung-Ju Wu  <jasonwucj@gmail.com>
12852         * config/nds32/nds32-memory-manipulation.c
12853         (nds32_emit_load_store): New.
12854         (nds32_emit_post_inc_load_store): New.
12855         (nds32_emit_mem_move): New.
12856         (nds32_emit_mem_move_block): New.
12857         (nds32_expand_movmemsi_loop_unknown_size): New.
12858         (nds32_expand_movmemsi_loop_known_size): New.
12859         (nds32_expand_movmemsi_loop): New.
12860         (nds32_expand_movmemsi_unroll): New.
12861         (nds32_expand_movmemqi): Rename ...
12862         (nds32_expand_movmemsi): ... to this.
12863         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12864         (movmemsi): ... to this.
12865         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12866         (nds32_expand_movmemsi): ... to this.
12868 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12869             Monk Chiang  <sh.chiang04@gmail.com>
12870             Chung-Ju Wu  <jasonwucj@gmail.com>
12872         * config/nds32/nds32-protos.h
12873         (nds32_expand_load_multiple): New arguments.
12874         (nds32_expand_store_multiple): Ditto.
12875         (nds32_valid_multiple_load_store): Rename ...
12876         (nds32_valid_multiple_load_store_p): ... to this.
12877         * config/nds32/nds32-memory-manipulation.c
12878         (nds32_expand_load_multiple): Refine implementation.
12879         (nds32_expand_store_multiple): Ditto.
12880         * config/nds32/nds32-multiple.md
12881         (load_multiple): Update nds32_expand_load_multiple interface.
12882         (store_multiple): Update nds32_expand_store_multiple interface.
12883         * config/nds32/nds32-predicates.c
12884         (nds32_valid_multiple_load_store): Rename ...
12885         (nds32_valid_multiple_load_store_p): ... to this and refine
12886         implementation.
12887         * config/nds32/predicates.md
12888         (nds32_load_multiple_and_update_address_operation): New predicate.
12889         (nds32_store_multiple_and_update_address_operation): New predicate.
12891 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12892             Chung-Ju Wu  <jasonwucj@gmail.com>
12894         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12895         (combo): New attribute.
12896         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12898 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12900         * config/nds32/nds32.opt: Change -mcmodel= default value.
12902 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
12903             Monk Chiang  <sh.chiang04@gmail.com>
12904             Chung-Ju Wu  <jasonwucj@gmail.com>
12906         * config/nds32/constants.md (unspec_element): New enum.
12907         * config/nds32/constraints.md (Umw): New constraint.
12908         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12909         * config/nds32/nds32-intrinsic.md: Likewise.
12910         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12911         (nds32_valid_smw_lwm_base_p): New.
12912         (nds32_output_smw_single_word): New.
12913         (nds32_output_lmw_single_word): New.
12914         (nds32_expand_unaligned_load): New.
12915         (nds32_expand_unaligned_store): New.
12916         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12917         (nds32_output_smw_single_word): Declare.
12918         (nds32_output_lmw_single_word): Declare.
12919         (nds32_expand_unaligned_load): Declare.
12920         (nds32_expand_unaligned_store): Declare.
12921         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12922         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12923         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12924         NDS32_BUILTIN_UASTORE_DW.
12925         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12926         predicate.
12928 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
12929             Kito Cheng  <kito.cheng@gmail.com>
12930             Chung-Ju Wu  <jasonwucj@gmail.com>
12932         * config/nds32/nds32-intrinsic.c
12933         (nds32_expand_builtin_null_ftype_reg): Delete.
12934         (nds32_expand_builtin_reg_ftype_imm): Ditto.
12935         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12936         (nds32_read_argument): New.
12937         (nds32_legitimize_target): Ditto.
12938         (nds32_legitimize_argument): Ditto.
12939         (nds32_check_constant_argument): Ditto.
12940         (nds32_expand_unop_builtin): Ditto.
12941         (nds32_expand_unopimm_builtin): Ditto.
12942         (nds32_expand_binop_builtin): Ditto.
12943         (nds32_builtin_decl_impl): Ditto.
12944         (builtin_description): Ditto.
12945         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12946         (nds32_init_builtins_impl): Ditto.
12947         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12948         (nds32_builtin_decl): New.
12949         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12950         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12952 2018-03-02  Jeff Law  <law@redhat.com>
12954         * reorg.c (stop_search_p): Handle DEBUG_INSN.
12955         (redundant_insn, fill_simple_delay_slots): Likewise.
12956         (fill_slots_from_thread): Likewise.
12957         * resource.c (mark_referenced_resources): Likewise.
12958         (mark_set_resources, find_dead_or_set_registers): Likewise.
12960 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12962         * substring-locations.h (format_warning_va): Formatting fix for
12963         ATTRIBUTE_GCC_DIAG.
12964         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12965         argument.
12966         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12967         * substring-locations.c: Include intl.h.
12968         (format_warning_va): Turned into small wrapper around
12969         format_warning_n_va, renamed to ...
12970         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12971         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12972         use ngettext.
12973         (format_warning_at_substring_n): New function.
12974         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12975         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
12976         format_warning_at_substring with just a shorter name instead of
12977         const function pointer.
12978         (fmtwarn_n): New function.
12979         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12980         appropriate, get rid of all the fmtstr temporaries, move conditionals
12981         with G_() wrapped string literals directly into fmtwarn arguments,
12982         cast dir.len to (int), formatting fixes.
12984 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
12986         * doc/invoke.texi: Remove "Cilk Plus" references.
12988 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12989             Richard Biener  <rguenther@suse.de>
12991         PR ipa/84628
12992         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12993         for error or warning attributes if CALL_FROM_THUNK_P is set.
12994         Formatting fixes.
12996 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12998         PR target/56540
12999         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13000         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13002         PR target/56540
13003         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13004         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13006         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13007         instead of -1U in last predictors element's probability member.
13009 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
13011         PR ipa/83983
13012         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13013         arguments if they are comparable.
13015 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
13017         PR tree-optimization/84634
13018         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13019         masks and masked_loop_p with a single loop_masks, making sure it's
13020         null for bb vectorization.
13022 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
13024         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13025         (vect_analyze_data_ref_access): Use loop->safe_len rather than
13026         loop->force_vectorize to check whether there is no alias.
13028 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13030         PR target/84614
13031         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13032         prototypes.
13033         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13034         comments.
13035         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13036         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13037         instead of a loop around prev_real_insn.
13038         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13039         prev_real_insn.
13041         PR inline-asm/84625
13042         * config/i386/i386.c (ix86_print_operand): Use conditional
13043         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13044         zero vector.
13046 2018-03-02  Richard Biener  <rguenther@suse.de>
13048         PR tree-optimization/84427
13049         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13050         (bitmap_set_subtract_values): Rewrite to handle multiple
13051         exprs per value.
13052         (clean): Likewise.
13053         (prune_clobbered_mems): Likewise.
13054         (phi_translate): Take edge instead of pred/phiblock.
13055         (phi_translate_1): Likewise.
13056         (phi_translate_set): Likewise.  Insert all translated
13057         exprs for a value into the set, keeping possibly multiple
13058         expressions per value.
13059         (compute_antic_aux): Adjust for phi_translate changes.
13060         When intersecting union the expressions and prune those
13061         not in the final value set, keeping possibly multiple
13062         expressions per value.  Do not use value-insertion
13063         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13064         all expressions.  Add verification that the value-sets
13065         only shrink during iteration.
13066         (compute_partial_antic_aux): Adjust for the phi_translate changes.
13067         (do_pre_regular_insertion): Likewise.
13068         (do_pre_partial_partial_insertion): Likewise.
13070 2018-03-02  Richard Biener  <rguenther@suse.de>
13072         PR target/82005
13073         * config/darwin.c (saved_debug_info_level): New static global.
13074         (darwin_asm_lto_start): Disable debug info generation for LTO out.
13075         (darwin_asm_lto_end): Restore debug info generation settings.
13077 2018-03-01  Martin Liska  <mliska@suse.cz>
13079         PR sanitizer/82484
13080         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13081         volatile arguments.
13083 2018-03-01  Richard Biener  <rguenther@suse.de>
13085         PR debug/84645
13086         * dwarf2out.c (gen_variable_die): Properly handle late VLA
13087         type annotation with LTO when debug was disabled at compile-time.
13089 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
13091         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13092         XINT with INTVAL.
13093         (mips_final_postscan_insn): Likewise.
13095 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
13097         PR rtl-optimization/84528
13098         * alias.c (init_alias_target): Add commentary.
13099         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13100         a unique base value if the frame pointer is not eliminated
13101         to the stack pointer.
13103 2018-03-01  Tom de Vries  <tom@codesourcery.com>
13105         PR rtl-optimization/83327
13106         * lra-int.h (hard_regs_spilled_into): Declare.
13107         * lra.c (hard_regs_spilled_into): Define.
13108         (init_reg_info): Init hard_regs_spilled_into.
13109         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13110         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13111         (process_bb_lives): Handle hard_regs_spilled_into.
13112         (lra_create_live_ranges_1): Before doing liveness propagation, clear
13113         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13115 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
13117         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13118         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13119         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13120         * config/rs6000/aix72.h: New file.
13122 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
13124         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13125         instead of warning_at with conditional singular and plural messages
13126         where possible.
13128         PR target/52991
13129         * stor-layout.c (update_alignment_for_field): For
13130         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13131         && !DECL_PACKED (field), do the alignment update, just use
13132         only desired_align instead of MAX (type_align, desired_align)
13133         as the alignment.
13134         (place_field): Don't do known_align < desired_align handling
13135         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13136         is non-NULL, instead do it after rli->prev_field handling and
13137         only if not within a bitfield word.  For DECL_PACKED (field)
13138         use type_align of BITS_PER_UNIT.
13140 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
13142         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13143         superfluous parentheses and trailing spaces.
13145 2018-02-28  Richard Biener  <rguenther@suse.de>
13147         PR tree-optimization/84584
13148         * graphite-scop-detection.c (scop_detection::add_scop): Discard
13149         SCoPs with fake exit edge.
13151 2018-02-28  Martin Liska  <mliska@suse.cz>
13153         PR testsuite/84597
13154         * timevar.c (timer::print): Fix format to properly print 100%
13155         values.
13157 2018-02-28  Richard Biener  <rguenther@suse.de>
13159         PR middle-end/84607
13160         * genmatch.c (capture_info::walk_match): Do not mark
13161         captured expressions without operands as expr_p given
13162         they act more like predicates and should be subject to
13163         "lost tail" side-effect preserving.
13165 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
13167         PR rtl-optimization/81611
13168         * auto-inc-dec.c (attempt_change): Move dead note from
13169         mem_insn if it's the next use of regno
13170         (find_address): Take address use of reg holding
13171         non-incremented value.  Add parm to limit search to the named
13172         reg only.
13173         (merge_in_block): Attempt to use a mem insn that is the next
13174         use of the original regno.
13176 2018-02-27  Martin Sebor  <msebor@redhat.com>
13178         PR c++/83871
13179         * doc/invoke.texi (-Wmissing-attributes): New option.
13180         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13182 2018-02-27  Martin Sebor  <msebor@redhat.com>
13184         PR translation/84207
13185         * diagnostic-core.h (warning_n, error_n, inform_n): Change
13186         n argument to unsigned HOST_WIDE_INT.
13187         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13188         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
13189         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13190         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13192 2018-02-27  Richard Biener  <rguenther@suse.de>
13194         PR tree-optimization/84512
13195         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13196         Do not use the estimate returned from record_stmt_cost for
13197         the scalar iteration cost but sum properly using add_stmt_cost.
13199 2018-02-27  Richard Biener  <rguenther@suse.de>
13201         PR tree-optimization/84466
13202         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13203         Adjust last change to less strictly validate use operands.
13205 2018-02-27  Martin Liska  <mliska@suse.cz>
13207         PR gcov-profile/84548
13208         * gcov.c (process_file): Allow partial overlap and consider it
13209         also as group functions.
13210         (output_lines): Properly calculate range of lines for a group.
13212 2018-02-27  Martin Liska  <mliska@suse.cz>
13214         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
13215         'ggc' suffixes.  Change first column width.
13216         (timer::print): Fix formatting of the column.
13218 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
13220         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
13221         preserve inline entry blocks for the sake of debug inline
13222         entry point markers alone.
13223         (remove_unused_locals): Suggest in comments a better place to
13224         force the preservation of inline entry blocks that are
13225         otherwise unused, but do not preserve them.
13227 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13229         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
13231 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13233         PR target/84039
13234         * config/i386/constraints.md (Bs): Replace
13235         ix86_indirect_branch_register with
13236         TARGET_INDIRECT_BRANCH_REGISTER.
13237         (Bw): Likewise.
13238         * config/i386/i386.md (indirect_jump): Likewise.
13239         (tablejump): Likewise.
13240         (*sibcall_memory): Likewise.
13241         (*sibcall_value_memory): Likewise.
13242         Peepholes of indirect call and jump via memory: Likewise.
13243         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
13244         (*sibcall_value_GOT_32): Likewise.
13245         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13246         (GOT_memory_operand): Likewise.
13247         (call_insn_operand): Likewise.
13248         (sibcall_insn_operand): Likewise.
13249         (GOT32_symbol_operand): Likewise.
13250         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
13252 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
13254         PR rtl-optimization/83496
13255         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
13256         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
13257         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
13258         redundant insn, if any.
13259         (relax_delay_slots): Likewise.
13260         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
13262 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
13264         PR tree-optimization/83965
13265         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
13266         that grouped statements are part of a reduction chain.  Return
13267         true if the statement is not marked as a reduction itself but
13268         is part of a group.
13269         (vect_recog_dot_prod_pattern): Don't check whether the statement
13270         is part of a group here.
13271         (vect_recog_sad_pattern): Likewise.
13272         (vect_recog_widen_sum_pattern): Likewise.
13274 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
13276         PR debug/84545
13277         * final.c (rest_of_clean_state): Also look for calls inside sequences.
13279 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13281         PR target/84530
13282         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
13283         the bool argument.
13284         (ix86_output_indirect_function_return): New prototype.
13285         (ix86_split_simple_return_pop_internal): Likewise.
13286         * config/i386/i386.c (indirect_return_via_cx): New.
13287         (indirect_return_via_cx_bnd): Likewise.
13288         (indirect_thunk_name): Handle return va CX_REG.
13289         (output_indirect_thunk_function): Create alias for
13290         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13291         (ix86_output_indirect_jmp): Remove the bool argument.
13292         (ix86_output_indirect_function_return): New function.
13293         (ix86_split_simple_return_pop_internal): Likewise.
13294         * config/i386/i386.md (*indirect_jump): Don't pass false
13295         to ix86_output_indirect_jmp.
13296         (*tablejump_1): Likewise.
13297         (simple_return_pop_internal): Change it to define_insn_and_split.
13298         Call ix86_split_simple_return_pop_internal to split it for
13299         -mfunction-return=.
13300         (simple_return_indirect_internal): Call
13301         ix86_output_indirect_function_return instead of
13302         ix86_output_indirect_jmp.
13304 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
13306         PR bootstrap/84405
13307         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13308         memset and value initialization afterwards.
13310 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
13312         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13314 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13316         PR target/84521
13317         * common/config/aarch64/aarch64-common.c
13318         (aarch_option_optimization_table[]): Switch
13319         off fomit-frame-pointer
13321 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13322             Chung-Ju Wu  <jasonwucj@gmail.com>
13324         * config/nds32/nds32-multiple.md (load_multiple): Disallow
13325         volatile memory.
13326         (store_multiple): Ditto.
13328 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13330         * config.gcc: Add --with-cpu support for nds32 target.
13331         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13332         * config/nds32/nds32.opt: Add -mcpu= option.
13334 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
13336         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13337         isel=yes): Warn for these deprecated options.
13339 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
13341         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13342         ISA_2_5_MASKS_EMBEDDED.
13344 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
13346         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13347         p->max as pointers rather than using iterative_hash_expr.
13349 2018-02-23  Carl Love  <cel@us.ibm.com>
13351         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13352         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13353         BU_P8V_OVERLOAD_2.
13354         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13355         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13356         P8V_BUILTIN_VEC_VUNSIGNED2.
13358 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
13360         PR target/81572
13361         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13362         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13363         LRA_UNKNOWN_ALT.
13364         * lra-constraints.c (curr_insn_transform): Set up
13365         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
13366         LRA_UNKNOWN_ALT.
13367         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13368         * lra-eliminations.c (spill_pseudos): Ditto.
13369         (process_insn_for_elimination): Ditto.
13370         * lra-lives.c (reg_early_clobber_p): Use the new macros.
13371         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13372         LRA_NON_CLOBBERED_ALT.
13374 2018-02-22  Martin Sebor  <msebor@redhat.com>
13376         PR tree-optimization/84480
13377         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13378         to maybe_diag_stxncpy_trunc.  Call it.
13379         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13380         from gimple_fold_builtin_strcpy.  Print inlining stack.
13381         (handle_builtin_stxncpy): Print inlining stack.
13382         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13384 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
13386         PR target/84176
13387         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13388         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13389         and -fcheck-pointer-bounds are used together.
13390         (indirect_thunk_prefix): New enum.
13391         (indirect_thunk_need_prefix): New function.
13392         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
13393         "_nt" instead of "_bnd" for NOTRACK prefix.
13394         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13395         (output_indirect_thunk_function): Likewise.
13396         (): Likewise.
13397         (ix86_code_end): Update output_indirect_thunk_function calls.
13398         (ix86_output_indirect_branch_via_reg): Replace
13399         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13400         (ix86_output_indirect_branch_via_push): Likewise.
13401         (ix86_output_function_return): Likewise.
13402         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13403         incompatible with -fcf-protection=branch and
13404         -fcheck-pointer-bounds.
13406 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13408         PR target/83335
13409         * config/aarch64/aarch64.c (aarch64_print_address_internal):
13410         Change gcc_assert call to output_operand_lossage.
13412 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13414         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13416 2018-02-22  DJ Delorie  <dj@redhat.com>
13417             Sebastian Perta  <sebastian.perta@renesas.com>
13418             Oleg Endo  <olegendo@gcc.gnu.org>
13420         * config/rx/rx.c (rx_rtx_costs): New function.
13421         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13423 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13425         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13427 2018-02-22  Martin Liska  <mliska@suse.cz>
13429         PR driver/83193
13430         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13431         Add "native" as a possible value.
13433 2018-02-22  Martin Liska  <mliska@suse.cz>
13435         PR driver/83193
13436         * config/i386/i386.c (ix86_option_override_internal):
13437         Add "native" as a possible value for -march and -mtune.
13439 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
13441         PR target/84502
13442         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13443         to all type variants.
13445         PR tree-optimization/84503
13446         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13447         width as info->bitpos + info->bitsize - start.
13448         (merged_store_group::merge_overlapping): Simplify width computation.
13449         (check_no_overlap): New function.
13450         (imm_store_chain_info::try_coalesce_bswap): Compute expected
13451         start + width and last_order of the group, fail if check_no_overlap
13452         fails.
13453         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13454         to group if check_no_overlap fails.
13456 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
13458         * config/rs6000/altivec.md: Delete contraint arguments to
13459         define_expand, define_split, and define_peephole2, and in
13460         define_insn_and_split if always unused.
13461         * config/rs6000/darwin.md: Ditto.
13462         * config/rs6000/dfp.md: Ditto.
13463         * config/rs6000/rs6000.md: Ditto.
13464         * config/rs6000/sync.md: Ditto.
13465         * config/rs6000/vector.md: Ditto.
13466         * config/rs6000/vsx.md: Ditto.
13468 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
13470         * config/rs6000/altivec.md: Write output control strings as braced
13471         blocks instead of double-quoted strings.
13472         * config/rs6000/darwin.md: Ditto.
13473         * config/rs6000/rs6000.md: Ditto.
13474         * config/rs6000/vector.md: Ditto.
13475         * config/rs6000/vsx.md: Ditto.
13477 2018-02-21  Jason Merrill  <jason@redhat.com>
13479         PR c++/84314 - ICE with templates and fastcall attribute.
13480         * attribs.c (build_type_attribute_qual_variant): Remove assert.
13482 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
13484         * ipa-cp.c (determine_versionability): Fix comment typos.
13486 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
13488         PR c/84229
13489         * ipa-cp.c (determine_versionability): Do not version functions caling
13490         va_arg_pack.
13492 2018-02-21  Martin Liska  <mliska@suse.cz>
13494         PR driver/83193
13495         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13496         Add "native" as a possible value.
13497         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
13498         the macro when native cpu detection is available.
13500 2018-02-21  Martin Liska  <mliska@suse.cz>
13502         PR driver/83193
13503         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13504         Add "native" as a possible value.
13505         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13506         when native cpu detection is available.
13508 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
13509             Martin Sebor  <msebor@redhat.com>
13511         PR tree-optimization/84478
13512         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13513         false.
13514         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13515         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13516         support which is conservatively correct, for 2 only stay conservative
13517         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
13518         argument to the 2 argument get_range_strlen, adjust 6 arg
13519         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13520         false.
13521         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13522         (gimple_fold_builtin_strlen): Pass true as last argument to
13523         get_range_strlen.
13525 2018-02-20  Martin Sebor  <msebor@redhat.com>
13527         PR middle-end/84095
13528         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13529         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
13530         (builtin_memref::builtin_memref): Factor out parts into
13531         set_base_and_offset and call it.
13533 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
13535         PR middle-end/84406
13536         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13537         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13538         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
13539         search at the associated MODE_INT.
13541 2018-02-20  Jeff Law  <law@redhat.com>
13543         PR middle-end/82123
13544         PR tree-optimization/81592
13545         PR middle-end/79257
13546         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13547         for range data rather than using global data.
13548         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13549         range data rather than using global data.
13550         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13551         pass it to children as needed.
13552         (struct directive::fmtresult): Similarly.
13553         (struct directive::set_width): Similarly.
13554         (struct directive::set_precision): Similarly.
13555         (format_integer, format_directive, parse_directive): Similarly.
13556         (format_none): Accept unnamed vr_values parameter.
13557         (format_percent, format_floating, format_character): Similarly.
13558         (format_string, format_plain): Similarly.
13559         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13560         the EVRP range analyzer for range data rather than using global data.
13561         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13562         gimple-ssa-evrp-analyze.h
13563         (class sprintf_dom_walker): Add after_dom_children member function.
13564         Add evrp_range_analyzer member.
13565         (sprintf_dom_walker::before_dom_children): Call into the EVRP
13566         range analyzer as needed.
13567         (sprintf_dom_walker::after_dom_children): New member function.
13568         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13569         if not optimizing.
13570         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13571         (evrp_range_analyzer::pop_to_marker): Likewise.
13573 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
13575         PR tree-optimization/84419
13576         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13577         with the required type if its current type is compatible but
13578         different.
13580 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
13582         PR middle-end/82004
13583         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13584         after vectorization.
13586 2018-02-20  Martin Liska  <mliska@suse.cz>
13588         PR driver/83193
13589         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13590         possible values if we don't have a hint.
13592 2018-02-20  Martin Liska  <mliska@suse.cz>
13594         PR c/84310
13595         PR target/79747
13596         * final.c (shorten_branches): Build align_tab array with one
13597         more element.
13598         * opts.c (finish_options): Add alignment option limit check.
13599         (MAX_CODE_ALIGN): Likewise.
13600         (MAX_CODE_ALIGN_VALUE): Likewise.
13601         * doc/invoke.texi: Document maximum allowed option value for
13602         all -falign-* options.
13604 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
13606         PR target/84146
13607         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13608         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13609         * var-tracking.c (emit_note_insn_var_location): Remove all references
13610         to NOTE_INSN_CALL_ARG_LOCATION.
13611         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13612         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13613         Use copy_rtx_if_shared.
13614         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13615         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13616         (dwarf2out_var_location): Remove handling of
13617         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13618         on call_insn.
13619         * final.c (final_scan_insn): Remove all references to
13620         NOTE_INSN_CALL_ARG_LOCATION.
13621         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
13622         before dumping final insns.
13623         * except.c (emit_note_eh_region_end): Remove all references to
13624         NOTE_INSN_CALL_ARG_LOCATION.
13625         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13626         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13627         * config/arc/arc.c (hwloop_optimize): Likewise.
13628         * config/arm/arm.c (create_fix_barrier): Likewise.
13629         * config/s390/s390.c (s390_chunkify_start): Likewise.
13630         * config/sh/sh.c (find_barrier): Likewise.
13631         * config/i386/i386.c (rest_of_insert_endbranch,
13632         ix86_seh_fixup_eh_fallthru): Likewise.
13633         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13634         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13635         * config/frv/frv.c (frv_function_prologue): Likewise.
13636         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
13637         reg note.
13638         (note_outside_basic_block_p): Remove all references to
13639         NOTE_INSN_CALL_ARG_LOCATION.
13640         * gengtype.c (adjust_field_rtx_def): Likewise.
13641         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13642         Likewise.
13643         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13644         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13646         PR c++/84444
13647         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13648         is ADDR_EXPR.
13650         PR tree-optimization/84452
13651         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13652         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13653         is NULL.
13655 2018-02-19  Martin Liska  <mliska@suse.cz>
13657         PR sanitizer/82183
13658         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13660 2018-02-19  Martin Liska  <mliska@suse.cz>
13661             Richard Sandiford  <richard.sandiford@linaro.org>
13663         PR tree-optimization/82491
13664         * gimple-fold.c (get_base_constructor): Make earlier bail out
13665         to prevent ubsan.
13667 2018-02-19  Carl Love  <cel@us.ibm.com>
13669         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13670         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13671         BU_P8V_OVERLOAD_1.
13672         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13673         P8V_BUILTIN_VEC_NEG.
13675 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
13677         * config/rl78/rl78.md (movdf): New define expand.
13679 2018-02-19  Martin Liska  <mliska@suse.cz>
13681         PR other/80589
13682         * doc/invoke.texi: Fix typo.
13683         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13685 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
13687         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13688         handle rs6000_single_float and rs6000_double_float specially for
13689         e500 family CPUs.
13691 2018-02-16  Jeff Law  <law@redhat.com>
13693         * config/rx/rx.c (add_pop_cfi_notes): New function.;
13694         (pop_regs): Use it.
13696 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
13698         PR ipa/84425
13699         * ipa-inline.c (inline_small_functions): Fix a typo.
13701 2018-02-16  Nathan Sidwell  <nathan@acm.org>
13703         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13705 2018-02-16  Carl Love  <cel@us.ibm.com>
13707         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13708         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13709         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13710         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13711         expansion to P8V_BUILTIN_VEC_FLOAT2.
13713 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
13715         PR rtl-optimization/70023
13716         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13717         src_regno into account.
13719 2018-02-16  Carl Love  <cel@us.ibm.com>
13721         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13722         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13723         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13724         * config/rs6000/rs6000.c: Remove case statements for
13725         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13726         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13727         and P9V_BUILTIN_VEC_VINSERT4B.
13728         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13729         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13730         * config/rs6000/vsx.md:
13731         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13732         vec_insert4b.
13734 2018-02-16  Carl Love  <cel@us.ibm.com>
13736         * config/rs6000/altivec.h: Add builtin names vec_extract4b
13737         vec_insert4b.
13738         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13739         definitions.
13740         * config/rs6000/rs6000-c.c: Add the definitions for
13741         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13742         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13743         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13744         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
13745         definition for insert4b and define insn *insert3b_internal.
13746         * doc/extend.texi: Add documentation for vec_extract4b.
13748 2018-02-16  Nathan Sidwell  <nathan@acm.org>
13750         * doc/extend.texi (Backwards Compatibility): Mention friend
13751         injection.  Note for-scope is deprecated.
13752         * doc/invoke.texi (-ffriend-injection): Deprecate.
13754 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
13756         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13757         that moved to I2, also allow destinations that are a paradoxical
13758         subreg (instead of a normal reg).
13760 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
13762         PR target/83831
13763         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13764         to QImode.
13766 2018-02-16  Richard Biener  <rguenther@suse.de>
13768         PR tree-optimization/84037
13769         PR tree-optimization/84016
13770         PR target/82862
13771         * config/i386/i386.c (ix86_builtin_vectorization_cost):
13772         Adjust vec_construct for the fact we need additional higher latency
13773         128bit inserts for AVX256 and AVX512 vector builds.
13774         (ix86_add_stmt_cost): Scale vector construction cost for
13775         elementwise loads.
13777 2018-02-16  Richard Biener  <rguenther@suse.de>
13779         PR tree-optimization/84417
13780         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13781         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13782         (non_rewritable_lvalue_p): Likewise, use poly-ints.
13784 2018-02-16  Martin Liska  <mliska@suse.cz>
13786         PR sanitizer/84307
13787         * internal-fn.def (ASAN_CHECK): Set proper flags.
13788         (ASAN_MARK): Likewise.
13790 2018-02-16  Julia Koval  <julia.koval@intel.com>
13792         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13793         from PTA_CANNONLAKE.
13795 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
13797         PR target/84272
13798         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13799         Use ++iter rather than iter++ for std::list iterators.
13800         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
13801         defer deleting them until all nodes in the forest are processed.  Do
13802         free even leaf nodes.  Change to_process into auto_vec.
13804         PR bootstrap/84405
13805         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13806         * vec.h (vec_default_construct): Use memset instead of placement new
13807         if BROKEN_VALUE_INITIALIZATION is defined.
13808         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13809         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13810         is defined.
13812         PR rtl-optimization/83723
13813         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13814         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
13815         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
13816         recursive calls.
13817         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13818         callers.
13819         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13821 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
13823         PR rtl-optimization/81443
13824         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13825         from inner REGs to paradoxical SUBREGs.
13827 2018-02-16  Richard Biener  <rguenther@suse.de>
13829         PR tree-optimization/84399
13830         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13831         For operands we can analyze at their definition make sure we can
13832         analyze them at each use as well.
13834 2018-02-16  Richard Biener  <rguenther@suse.de>
13836         PR tree-optimization/84190
13837         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13838         volatile accesses if the decl isn't volatile.
13840 2018-02-15  Jason Merrill  <jason@redhat.com>
13842         PR c++/84314 - ICE with templates and fastcall attribute.
13843         * attribs.c (build_type_attribute_qual_variant): Don't clobber
13844         TYPE_CANONICAL on an existing type.
13846 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
13848         PR tree-optimization/84383
13849         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13850         dstoff nor call operand_equal_p if dstbase is NULL.
13852         PR tree-optimization/84334
13853         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13854         also a CONSTANT_CLASS_P, punt.
13856 2018-02-14  Jim Wilson  <jimw@sifive.com>
13858         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13859         first SMALL_OPERAND check.  New local min_second_step.  Move assert
13860         to where locals are set.  Add TARGET_RVC support.
13861         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13863 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
13865         * doc/invoke.texi: Correct -Wformat-overflow code sample.
13867 2018-02-14  Martin Sebor  <msebor@redhat.com>
13869         PR tree-optimization/83698
13870         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13871         arrays constrain the offset range to their bounds.
13872         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13873         (builtin_access::overlap): Avoid setting the size of overlap if it's
13874         already been set.
13875         (maybe_diag_overlap): Also consider arrays when deciding what values
13876         of offsets to include in diagnostics.
13878 2018-02-14  Martin Sebor  <msebor@redhat.com>
13880         PR c/84108
13881         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13882         that correspond to the kind of a declaration.
13884 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
13886         PR target/83984
13887         * config/pa/pa.md: Load address of PIC label using the linkage table
13888         if the label is nonlocal.
13890 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13892         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13893         warning message if user requests -maltivec=be.
13894         * doc/invoke.texi: Document deprecation of -maltivec=be.
13896 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
13898         PR target/84220
13899         * config/rs6000/rs6000-c.c: Update definitions for
13900         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13901         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13903 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13905         PR target/84239
13906         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13907         add _get_ssp intrinsics. Remove argument from
13908         __builtin_ia32_rdssp[d|q].
13909         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13910         * config/i386/i386-builtin.def: Remove argument from
13911         __builtin_ia32_rdssp[d|q].
13912         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13913         ix86_expand_special_args_builtin for _rdssp[d|q].
13914         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13915         Clear register before usage.
13916         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13917         Add documentation for new _get_ssp and _inc_ssp intrinsics.
13919 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
13921         PR tree-optimization/84357
13922         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13923         operand 1 of an ARRAY_REF too.
13925 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
13927         PR target/83831
13928         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13929         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13930         declarations.
13931         (set_of_reg): New struct.
13932         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13933         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13934         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13935         functions.
13936         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13937         Split into bitclr, bitset, bitinvert patterns if appropriate.
13938         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13939         use rx_fuse_in_memory_bitop.
13940         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13941         to named insn, correct maximum insn length.
13943 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
13945         PR target/79242
13946         * machmode.def: Define a complex mode for PARTIAL_INT.
13947         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13948         MODE_PARTIAL_INT.
13949         * doc/rtl.texi: Document CSPImode.
13950         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13951         handling.
13952         (msp430_hard_regno_nregs_with_padding): Likewise.
13954 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
13956         PR target/84279
13957         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13959 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
13961         PR rtl-optimization/84169
13962         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
13963         we generated a parallel as new i3 and we split that to new i2 and i3
13964         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
13965         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
13966         those to i2, not i1.  Partially rewrite this scan code.
13968 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
13970         PR c/82210
13971         * stor-layout.c (place_field): For variable length fields, adjust
13972         offset_align afterwards not just based on the field's alignment,
13973         but also on the size.
13975         PR middle-end/84309
13976         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13977         of exps and logs in the use_exp2 case.
13979 2018-02-13  Jeff Law  <law@redhat.com>
13981         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13982         entry for "vector".
13984         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13985         ARGS as unused.
13987 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
13989         PR debug/84342
13990         PR debug/84319
13991         * common.opt (gas-loc-support, gas-locview-support): New.
13992         (ginline-points, ginternal-reset-location-views): New.
13993         * doc/invoke.texi: Document them.  Use @itemx where intended.
13994         (gvariable-location-views): Adjust.
13995         * target.def (reset_location_view): New.
13996         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13997         (TARGET_RESET_LOCATION_VIEW): New.
13998         * doc/tm.texi: Rebuilt.
13999         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14000         (dwarf2out_default_as_locview_support): New.
14001         (output_asm_line_debug_info): Use option variables.
14002         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14003         (output_loc_list): Likewise.
14004         (add_high_low_attributes): Check option variables.
14005         Don't output entry view attribute in strict mode.
14006         (gen_inlined_subroutine_die): Check option variables.
14007         (dwarf2out_inline_entry): Likewise.
14008         (init_sections_and_labels): Likewise.
14009         (dwarf2out_early_finish): Likewise.
14010         (maybe_reset_location_view): New, from...
14011         (dwarf2out_var_location): ... here.  Call it.
14012         * debug.h (dwarf2out_default_as_loc_support): Declare.
14013         (dwarf2out_default_as_locview_support): Declare.
14014         * hooks.c (hook_int_rtx_insn_0): New.
14015         * hooks.h (hook_int_rtx_insn_0): Declare.
14016         * toplev.c (process_options): Take -gas-loc-support and
14017         -gas-locview-support from dwarf2out.  Enable
14018         -gvariable-location-views by default only with locview
14019         assembler support.  Enable -ginternal-reset-location-views by
14020         default only if the target defines the corresponding hook.
14021         Enable -ginline-points by default if location views are
14022         enabled; force it disabled if statement frontiers are
14023         disabled.
14024         * tree-inline.c (expand_call_inline): Check option variables.
14025         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14027 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
14029         PR tree-optimization/84321
14030         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14031         handling.  Also check whether the anti-range contains any values
14032         that satisfy the mask; switch to a VR_RANGE if not.
14034 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
14036         PR sanitizer/84340
14037         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14039 2018-02-13  Martin Jambor  <mjambor@suse.cz>
14041         PR c++/83990
14042         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14043         of call statements, also set location of a load to a temporary.
14045 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
14047         * config/rl78/rl78.c (add_vector_labels): New function.
14048         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14049         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14050         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14051         which checks that no arguments are passed.
14052         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14053         * doc/extend.texi: Documentation for the new attribute.
14055 2018-02-13  Andreas Schwab  <schwab@suse.de>
14057         * config/riscv/linux.h (CPP_SPEC): Define.
14059 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
14061         PR target/84335
14062         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14063         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14064         OPTION_MASK_ISA_AES as first argument to def_builtin_const
14065         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14066         instead of OPTION_MASK_ISA_PCLMUL as first argument to
14067         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14068         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14069         temporarily for AES and PCLMUL builtins.
14071         PR tree-optimization/84339
14072         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14073         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14074         Formatting fixes.
14076         PR middle-end/84309
14077         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14078         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14079         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14080         inline function.
14081         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14082         inline function.
14083         * omp-simd-clone.h: New file.
14084         * omp-simd-clone.c: Include omp-simd-clone.h.
14085         (expand_simd_clones): No longer static.
14086         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14087         cgraph.h and omp-simd-clone.h.
14088         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14089         (vect_recog_widen_shift_pattern): Formatting fix.
14090         (vect_pattern_recog_1): Don't check optab for calls.
14092         PR target/84336
14093         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14094         operands[2] into a REG before using gen_lowpart on it.
14096 2018-02-12  Jeff Law  <law@redhat.com>
14098         PR target/83760
14099         * config/sh/sh.c (find_barrier): Consider a sibling call
14100         a barrier as well.
14102         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14103         successfully back substituting a reg.
14105 2018-02-12  Richard Biener  <rguenther@suse.de>
14107         PR tree-optimization/84037
14108         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14109         parameter, move visited init to caller.
14110         (vect_slp_analyze_operations): Separate cost from validity
14111         check, initialize visited once for all instances.
14112         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14113         for all instances.
14114         * tree-vect-stmts.c (vect_model_simple_cost): Make early
14115         out an assert.
14116         (vect_model_promotion_demotion_cost): Likewise.
14117         (vectorizable_bswap): Guard cost modeling with !slp_node
14118         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14119         SLP stmts.
14120         (vectorizable_call): Likewise.
14121         (vectorizable_conversion): Likewise.
14122         (vectorizable_assignment): Likewise.
14123         (vectorizable_shift): Likewise.
14124         (vectorizable_operation): Likewise.
14125         (vectorizable_store): Likewise.
14126         (vectorizable_load): Likewise.
14127         (vectorizable_condition): Likewise.
14128         (vectorizable_comparison): Likewise.
14130 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
14132         PR sanitizer/84307
14133         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14134         (ASAN_MARK): Fix fnspec to account for return value, change pointer
14135         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14137 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
14139         PR middle-end/83665
14140         * params.def (inline-min-speedup): Increase from 8 to 15.
14141         (max-inline-insns-auto): Decrease from 40 to 30.
14142         * ipa-split.c (consider_split): Add some buffer for function to
14143         be considered inlining candidate.
14144         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14145         default values.
14147 2018-02-12  Richard Biener  <rguenther@suse.de>
14149         PR tree-optimization/84037
14150         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14151         matched stmts if we cannot swap the non-matched ones.
14153 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
14155         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14156         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14157         _mm_maskz_scalef_round_ss): New intrinsics.
14158         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14159         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14160         __builtin_ia32_scalefss_round): Remove.
14161         (__builtin_ia32_scalefsd_mask_round,
14162         __builtin_ia32_scalefss_mask_round): New intrinsics.
14163         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14164         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14165         ((match_operand:VF_128 2 "<round_nimm_predicate>"
14166         "<round_constraint>")): Changed to ...
14167         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14168         "<round_scalar_constraint>")): ... this.
14169         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14170         %0, %1, %2<round_op3>}"): Changed to ...
14171         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14172         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14173         %2<round_scalar_mask_op3>}"): ... this.
14174         * config/i386/subst.md (round_scalar_nimm_predicate): New.
14176 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
14178         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14179         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14180         (_mm_maskz_sqrt_round_ss): New intrinsics.
14181         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14182         (__builtin_ia32_sqrtsd_mask_round)
14183         (__builtin_ia32_sqrtss_mask_round): New builtins.
14184         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14185         (__builtin_ia32_sqrtss_round): Remove.
14186         (__builtin_ia32_sqrtsd_mask_round)
14187         (__builtin_ia32_sqrtss_mask_round): New builtins.
14188         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14189         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14190         ((match_operand:VF_128 1 "vector_operand"
14191         "xBm,<round_constraint>")): Changed to ...
14192         ((match_operand:VF_128 1 "vector_operand"
14193         "xBm,<round_scalar_constraint>")): ... this.
14194         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14195         %0, %2, %<iptr>1<round_op3>}): Changed to ...
14196         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14197         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14198         %<iptr>1<round_scalar_mask_op3>}): ... this.
14199         ((set_attr "prefix" "<round_prefix>")): Changed to ...
14200         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14202 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
14204         PR target/84266
14205         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14206         Cast vec_cmpeq result to correct type.
14207         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
14208         Cast vec_cmpgt result to correct type.
14210 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
14212         * final.c (final_scan_insn_1): Renamed from...
14213         (final_scan_insn): ... this.  New wrapper, to recover
14214         seen from the outermost call in recursive ones.
14215         * config/sparc/sparc.c (output_return): Drop seen from call.
14216         (output_sibcall): Likewise.
14217         * config/visium/visium.c (output_branch): Likewise.
14219 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
14221         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
14222         function label.
14224 2018-02-10  Alan Modra  <amodra@gmail.com>
14226         PR target/84300
14227         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
14228         Specify LR as an input.
14230 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
14232         PR sanitizer/83987
14233         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
14234         remove_member_access_dummy_vars): New functions.
14235         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
14236         lower_omp_1, execute_lower_omp): Use them.
14238         PR rtl-optimization/84308
14239         * shrink-wrap.c (spread_components): Release todo vector.
14241 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
14243         PR rtl-optimization/57193
14244         * ira-color.c (struct allocno_color_data): Add member
14245         conflict_allocno_hard_prefs.
14246         (update_conflict_allocno_hard_prefs): New.
14247         (bucket_allocno_compare_func): Add a preference based on
14248         conflict_allocno_hard_prefs.
14249         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
14250         (color_allocnos): Remove a dead code.  Initiate
14251         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
14253 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14255         PR target/84226
14256         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
14257         constraint from =wa to wa.  Avoid a subreg on the output operand,
14258         instead use a pseudo and subreg it in a move.
14259         (p9_xxbrd_<mode>): Changed to ...
14260         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
14261         (p9_xxbrd_v2df): New expander.
14262         (p9_xxbrw_<mode>): Changed to ...
14263         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
14264         (p9_xxbrw_v4sf): New expander.
14266 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
14268         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
14270 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
14272         PR target/83926
14273         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
14274         multiply in 32-bit mode.
14275         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
14276         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
14277         mode.
14279 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
14281         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
14282         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
14283         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
14284         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
14286 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
14288         PR lto/84213
14289         * dwarf2out.c (is_trivial_indirect_ref): New function.
14290         (dwarf2out_late_global_decl): Do not generate a location
14291         attribute for variables that have a non-trivial DECL_VALUE_EXPR
14292         and that are not defined in the current unit.
14294 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14296         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14297         instead of a libcall for UNORDERED.
14299 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
14301         PR target/82641
14302         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14303         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14305 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14307         PR target/PR84295
14308         * config/s390/s390.c (s390_set_current_function): Invoke
14309         s390_indirect_branch_settings also if fndecl didn't change.
14311 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14313         * config/rs6000/rs6000.md (blockage): Set length to zero.
14315 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14317         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14319 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14321         PR sanitizer/84285
14322         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14323         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14324         -static-lib*san.
14326         PR debug/84252
14327         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14328         PARALLEL incoming that failed vt_get_decl_and_offset check.
14330         PR middle-end/84237
14331         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14332         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14333         TREE_READONLY bit.
14334         (get_variable_section): For decls in named .bss* sections pass true as
14335         second argument to bss_initializer_p.
14337 2018-02-09  Marek Polacek  <polacek@redhat.com>
14338             Jakub Jelinek  <jakub@redhat.com>
14340         PR c++/83659
14341         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14342         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
14343         Sync some changes from cxx_fold_indirect_ref.
14345 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14347         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14348         markers.
14349         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14350         (BLOCK_INLINE_ENTRY_LABEL): New.
14351         (dwarf2out_var_location): Disregard inline entry markers.
14352         (inline_entry_data): New struct.
14353         (inline_entry_data_hasher): New hashtable type.
14354         (inline_entry_data_hasher::hash): New.
14355         (inline_entry_data_hasher::equal): New.
14356         (inline_entry_data_table): New variable.
14357         (add_high_low_attributes): Add DW_AT_entry_pc and
14358         DW_AT_GNU_entry_view attributes if a pending entry is found
14359         in inline_entry_data_table.  Add old entry_pc attribute only
14360         if debug nonbinding markers are disabled.
14361         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14362         markers are enabled.
14363         (block_within_block_p, dwarf2out_inline_entry): New.
14364         (dwarf2out_finish): Check that no entries remained in
14365         inline_entry_data_table.
14366         * final.c (reemit_insn_block_notes): Handle inline entry notes.
14367         (final_scan_insn, notice_source_line): Likewise.
14368         (rest_of_clean_state): Skip inline entry markers.
14369         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14370         markers.
14371         * gimple.c (gimple_build_debug_inline_entry): New.
14372         * gimple.h (enum gimple_debug_subcode): Add
14373         GIMPLE_DEBUG_INLINE_ENTRY.
14374         (gimple_build_debug_inline_entry): Declare.
14375         (gimple_debug_inline_entry_p): New.
14376         (gimple_debug_nonbind_marker_p): Adjust.
14377         * insn-notes.def (INLINE_ENTRY): New.
14378         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14379         inline entry marker notes.
14380         (print_insn): Likewise.
14381         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14382         (INSN_DEBUG_MARKER_KIND): Likewise.
14383         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14384         * tree-inline.c (expand_call_inline): Build and insert
14385         debug_inline_entry stmt.
14386         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14387         inline entry blocks early, if nonbind markers are enabled.
14388         (dump_scope_block): Dump fragment info.
14389         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14390         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14391         (gimple_build_debug_inline_entry): New.
14392         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14393         Enable/disable inline entry points too.
14394         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14395         (DEBUG_INSN): Describe inline entry markers.
14397         * common.opt (gvariable-location-views): New.
14398         (gvariable-location-views=incompat5): New.
14399         * config.in: Rebuilt.
14400         * configure: Rebuilt.
14401         * configure.ac: Test assembler for view support.
14402         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14403         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14404         * dwarf2out.c (var_loc_view): New typedef.
14405         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14406         (dwarf2out_locviews_in_attribute): New.
14407         (dwarf2out_locviews_in_loclist): New.
14408         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14409         (enum dw_line_info_opcode): Add LI_adv_address.
14410         (struct dw_line_info_table): Add view.
14411         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14412         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14413         (zero_view_p): New variable.
14414         (ZERO_VIEW_P): New macro.
14415         (output_asm_line_debug_info): New.
14416         (struct var_loc_node): Add view.
14417         (add_AT_view_list, AT_loc_list): New.
14418         (add_var_loc_to_decl): Add view param.  Test it against last.
14419         (new_loc_list): Add view params.  Record them.
14420         (AT_loc_list_ptr): Handle loc and view lists.
14421         (view_list_to_loc_list_val_node): New.
14422         (print_dw_val): Handle dw_val_class_view_list.
14423         (size_of_die): Likewise.
14424         (value_format): Likewise.
14425         (loc_list_has_views): New.
14426         (gen_llsym): Set vl_symbol too.
14427         (maybe_gen_llsym, skip_loc_list_entry): New.
14428         (dwarf2out_maybe_output_loclist_view_pair): New.
14429         (output_loc_list): Output view list or entries too.
14430         (output_view_list_offset): New.
14431         (output_die): Handle dw_val_class_view_list.
14432         (output_dwarf_version): New.
14433         (output_compilation_unit_header): Use it.
14434         (output_skeleton_debug_sections): Likewise.
14435         (output_rnglists, output_line_info): Likewise.
14436         (output_pubnames, output_aranges): Update version comments.
14437         (output_one_line_info_table): Output view numbers in asm comments.
14438         (dw_loc_list): Determine current endview, pass it to new_loc_list.
14439         Call maybe_gen_llsym.
14440         (loc_list_from_tree_1): Adjust.
14441         (add_AT_location_description): Create view list attribute if
14442         needed, check it's absent otherwise.
14443         (convert_cfa_to_fb_loc_list): Adjust.
14444         (maybe_emit_file): Call output_asm_line_debug_info for test.
14445         (dwarf2out_var_location): Reset views as needed.  Precompute
14446         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
14447         attribute.  Set view.
14448         (new_line_info_table): Reset next view.
14449         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14450         (dwarf2out_source_line): Likewise.  Output view resets and labels to
14451         the assembler, or select appropriate line info opcodes.
14452         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14453         (optimize_string_length): Catch it.  Adjust.
14454         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
14455         dw_val_class_view_list, and remove it if no longer needed.
14456         (hash_loc_list): Hash view numbers.
14457         (loc_list_hasher::equal): Compare them.
14458         (optimize_location_lists): Check whether a view list symbol is
14459         needed, and whether the locview attribute is present, and
14460         whether they match.  Remove the locview attribute if no longer
14461         needed.
14462         (index_location_lists): Call skip_loc_list_entry for test.
14463         (dwarf2out_finish): Call output_asm_line_debug_info for test.
14464         Use output_dwarf_version.
14465         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14466         (struct dw_val_node): Add val_view_list.
14467         * final.c (SEEN_NEXT_VIEW): New.
14468         (set_next_view_needed): New.
14469         (clear_next_view_needed): New.
14470         (maybe_output_next_view): New.
14471         (final_start_function): Rename to...
14472         (final_start_function_1): ... this.  Take pointer to FIRST,
14473         add SEEN parameter.  Emit param bindings in the initial view.
14474         (final_start_function): Reintroduce SEEN-less interface.
14475         (final): Rename to...
14476         (final_1): ... this.  Take SEEN parameter.  Output final pending
14477         next view at the end.
14478         (final): Reintroduce seen-less interface.
14479         (final_scan_insn): Output pending next view before switching
14480         sections or ending a block.  Mark the next view as needed when
14481         outputting variable locations.  Notify debug backend of section
14482         changes, and of location view changes.
14483         (rest_of_handle_final): Adjust.
14484         * toplev.c (process_options): Autodetect value for debug variable
14485         location views option.  Warn on incompat5 without -gdwarf-5.
14486         * doc/invoke.texi (gvariable-location-views): New.
14487         (gvariable-location-views=incompat5): New.
14488         (gno-variable-location-views): New.
14490 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
14492         PR tree-optimization/84136
14493         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14494         that the result of find_edge is non-NULL.
14496 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
14498         PR target/83008
14499         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14500         storing integer register in SImode.  Fix cost of 256 and 512
14501         byte aligned SSE register store.
14503 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
14505         * config/i386/i386.c (ix86_multiplication_cost): Fix
14506         multiplication cost for TARGET_AVX512DQ.
14508 2018-02-08  Marek Polacek  <polacek@redhat.com>
14510         PR tree-optimization/84238
14511         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14512         get_range_strlen.
14514 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14516         PR tree-optimization/84265
14517         * tree-vect-stmts.c (vectorizable_store): Don't treat
14518         VMAT_CONTIGUOUS accesses as grouped.
14519         (vectorizable_load): Likewise.
14521 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14523         PR tree-optimization/81635
14524         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14525         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14526         (test_round_for_mask): New functions.
14527         (wide_int_cc_tests): Call test_round_for_mask.
14528         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14529         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14530         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14531         range returned by get_range_info.
14533 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
14535         PR ipa/81360
14536         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14537         * symtab.c: Include builtins.h
14538         (symtab_node::output_to_lto_symbol_table_p): Move here
14539         from lto-streamer-out.c:output_symbol_p.
14540         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14541         (output_symbol_p): Move all logic to symtab.c
14542         (produce_symtab): Update.
14544 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14546         * config/s390/s390-opts.h (enum indirect_branch): Define.
14547         * config/s390/s390-protos.h (s390_return_addr_from_memory)
14548         (s390_indirect_branch_via_thunk)
14549         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14550         (enum s390_indirect_branch_type): Define.
14551         * config/s390/s390.c (struct s390_frame_layout, struct
14552         machine_function): Remove.
14553         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14554         (indirect_branch_table_label_no, indirect_branch_table_name):
14555         Define variables.
14556         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14557         (enum s390_indirect_branch_option): Define.
14558         (s390_return_addr_from_memory): New function.
14559         (s390_handle_string_attribute): New function.
14560         (s390_attribute_table): Add new attribute handler.
14561         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14562         (s390_indirect_branch_via_thunk): New function.
14563         (s390_indirect_branch_via_inline_thunk): New function.
14564         (s390_function_ok_for_sibcall): When jumping via thunk disallow
14565         sibling call optimization for non z10 compiles.
14566         (s390_emit_call): Force indirect branch target to be a single
14567         register.  Add r1 clobber for non-z10 compiles.
14568         (s390_emit_epilogue): Emit return jump via return_use expander.
14569         (s390_reorg): Handle JUMP_INSNs as execute targets.
14570         (s390_option_override_internal): Perform validity checks for the
14571         new command line options.
14572         (s390_indirect_branch_attrvalue): New function.
14573         (s390_indirect_branch_settings): New function.
14574         (s390_set_current_function): Invoke s390_indirect_branch_settings.
14575         (s390_output_indirect_thunk_function):  New function.
14576         (s390_code_end): Implement target hook.
14577         (s390_case_values_threshold): Implement target hook.
14578         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14579         macros.
14580         * config/s390/s390.h (struct s390_frame_layout)
14581         (struct machine_function): Move here from s390.c.
14582         (TARGET_INDIRECT_BRANCH_NOBP_RET)
14583         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14584         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14585         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14586         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14587         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14588         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14589         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14590         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14591         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14592         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14593         (mnemonic attribute): Add values which aren't recognized
14594         automatically.
14595         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14596         pattern for branch conversion.  Fix mnemonic attribute.
14597         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14598         indirect branch via thunk if requested.
14599         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14600         ("*indirect_jump"): Disable for branch conversion using out of
14601         line thunks.
14602         ("indirect_jump_via_thunk<mode>_z10")
14603         ("indirect_jump_via_thunk<mode>")
14604         ("indirect_jump_via_inlinethunk<mode>_z10")
14605         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14606         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14607         ("casesi_jump_via_inlinethunk<mode>_z10")
14608         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14609         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14610         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14611         ("*indirect2_jump"): Disable for branch conversion.
14612         ("casesi_jump"): Turn into expander and expand patterns for branch
14613         conversion.
14614         ("return_use"): New expander.
14615         ("*return"): Emit return via thunk and rename it to ...
14616         ("*return<mode>"): ... this one.
14617         * config/s390/s390.opt: Add new options and and enum for the
14618         option values.
14620 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14622         * lra-constraints.c (match_reload): Unconditionally use
14623         gen_lowpart_SUBREG, rather than selecting between that
14624         and equivalent gen_rtx_SUBREG code.
14626 2018-02-08  Richard Biener  <rguenther@suse.de>
14628         PR tree-optimization/84233
14629         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14630         changed flag instead of boguously re-using phi_inserted.
14632 2018-02-08  Martin Jambor  <mjambor@suse.cz>
14634         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14635         static local variables.
14637 2018-02-08  Richard Biener  <rguenther@suse.de>
14639         PR tree-optimization/84278
14640         * tree-vect-stmts.c (vectorizable_store): When looking for
14641         smaller vector types to perform grouped strided loads/stores
14642         make sure the mode is supported by the target.
14643         (vectorizable_load): Likewise.
14645 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
14647         * config/aarch64/aarch64.c (aarch64_components_for_bb):
14648         Increase LDP/STP opportunities by adding adjacent callee-saves.
14650 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
14652         PR rtl-optimization/84068
14653         PR rtl-optimization/83459
14654         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14656 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
14658         PR tree-optimization/84224
14659         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14660         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14661         non-zero arguments.
14663 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
14665         PR target/84113
14666         * config/rs6000/altivec.md (*restore_world): Remove LR use.
14667         * config/rs6000/predicates.md (restore_world_operation): Adjust op
14668         count, remove one USE.
14670 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
14672         * doc/install.texi (Configuration): Document the
14673         --with-long-double-format={ibm,ieee} PowerPC configuration
14674         options.
14676         PR target/84154
14677         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14678         Convert from define_expand to be define_insn_and_split.  Rework
14679         float/double/_Float128 conversions to QI/HI/SImode to work with
14680         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
14681         conversions to QI/HImode types did a store and then a load to
14682         truncate the value.  For conversions to VSX registers, don't split
14683         the insn, instead emit the code directly.  Use the code iterator
14684         any_fix to combine signed and unsigned conversions.
14685         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14686         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14687         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14688         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14689         (fix_<mode>di2_hw): Likewise.
14690         (fixuns_<mode>di2_hw): Likewise.
14691         (fix_<mode>si2_hw): Likewise.
14692         (fixuns_<mode>si2_hw): Likewise.
14693         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14694         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14695         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14696         fix<uns>_trunc<SFDF:mode>si2_p8.
14697         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14698         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14699         (fix<uns>_<mode>_mem): Likewise.
14700         (fctiw<u>z_<mode>_mem): Likewise.
14701         (fix<uns>_<mode>_mem): Likewise.
14702         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14703         the register allocator from doing a direct move to the GPRs to do
14704         a store, and instead use the ISA 3.0 store byte/half-word from
14705         vector register instruction.  For IEEE 128-bit floating point,
14706         also optimize stores of 32-bit ints.
14707         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14709 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
14711         * genextract.c (push_pathstr_operand): New function to support
14712         [a-zA-Z].
14713         (walk_rtx): Call push_pathstr_operand.
14714         (print_path): Support [a-zA-Z].
14716 2018-02-07  Richard Biener  <rguenther@suse.de>
14718         PR tree-optimization/84037
14719         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14720         (cse_and_gimplify_to_preheader): Declare.
14721         (vect_get_place_in_interleaving_chain): Likewise.
14722         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14723         ivexpr_map.
14724         (_loop_vec_info::~_loop_vec_info): Delete it.
14725         (cse_and_gimplify_to_preheader): New function.
14726         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14727         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14728         (vectorizable_load): Likewise.  For grouped stores always base
14729         the IV on the first element.
14730         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14731         condition before gimplifying.
14733 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
14735         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14736         *DIV_EXPR and *MOD_EXPR.
14738 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
14740         PR target/84248
14741         * config/i386/i386.c (ix86_option_override_internal): Mask out
14742         the CF_SET bit when checking -fcf-protection.
14744 2018-02-07  Tom de Vries  <tom@codesourcery.com>
14746         PR libgomp/84217
14747         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14748         enough.
14750 2018-02-07  Richard Biener  <rguenther@suse.de>
14752         PR tree-optimization/84204
14753         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14754         this place.
14756         PR tree-optimization/84205
14757         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14758         special-case isl_ast_op_zdiv_r.
14760         PR tree-optimization/84223
14761         * graphite-scop-detection.c (gather_bbs::before_dom_children):
14762         Only add conditions from within the region.
14763         (gather_bbs::after_dom_children): Adjust.
14765 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
14767         PR target/84209
14768         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14769         * config/avr/avr.md: Only post-reload split REG-REG moves if
14770         either register is GENERAL_REG_P.
14772 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
14774         PR tree-optimization/84235
14775         * tree-ssa-scopedtables.c
14776         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14777         if the subtraction is performed in floating point type where NaNs are
14778         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14779         build 1.  Formatting fix.
14781 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
14783         PR target/84146
14784         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14785         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14786         and skip it regardless of bb boundaries.  Use CALL_P macro,
14787         don't test INSN_P (insn) together with CALL_P or JUMP_P check
14788         unnecessarily, formatting fix.
14790 2018-02-06  Michael Collison  <michael.collison@arm.com>
14792         * config/arm/thumb2.md:
14793         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14794         (*thumb_mov_notscc): Ditto.
14796 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
14798         PR target/84154
14799         * config/rs6000/rs6000.md (su code attribute): Use "u" for
14800         unsigned_fix, not "s".
14802 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14804         * configure.ac (gcc_fn_eh_frame_ro): New function.
14805         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14806         correct .eh_frame permissions.
14807         * configure: Regenerate.
14809 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
14811         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14812         irrelevant options.
14814 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14816         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14817         Display warning message for -mno-speculate-indirect-jumps.
14819 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
14821         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14822         Undocumented.
14823         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14825 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
14827         PR tree-optimization/84225
14828         * tree-eh.c (find_trapping_overflow): Only call
14829         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14831 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14833         PR target/84145
14834         * config/i386/i386.c: Reimplement the check of possible options
14835         -mibt/-mshstk conbination. Change error messages.
14836         * doc/invoke.texi: Fix a typo: remove extra '='.
14838 2018-02-06  Marek Polacek  <polacek@redhat.com>
14840         PR tree-optimization/84228
14841         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14843 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
14845         PR target/82641
14846         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14847         emitted arch directives.
14848         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14849         __ARM_FEATURE_COPROC before changing architectures.
14851 2018-02-06  Richard Biener  <rguenther@suse.de>
14853         * config/i386/i386.c (print_reg): Fix typo.
14854         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14856 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
14858         * configure: Regenerate.
14860 2018-02-05  Martin Sebor  <msebor@redhat.com>
14862         PR tree-optimization/83369
14863         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14864         inlining context.
14866 2018-02-05  Martin Liska  <mliska@suse.cz>
14868         * doc/invoke.texi: Cherry-pick upstream r323995.
14870 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
14872         * ira.c (ira_init_register_move_cost): Adjust comment.
14874 2018-02-05  Martin Liska  <mliska@suse.cz>
14876         PR gcov-profile/84137
14877         * doc/gcov.texi: Fix typo in documentation.
14879 2018-02-05  Martin Liska  <mliska@suse.cz>
14881         PR gcov-profile/83879
14882         * doc/gcov.texi: Document necessity of --dynamic-list-data when
14883         using dlopen functionality.
14885 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
14887         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14888         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14889         _mm_maskz_range_ss, _mm_mask_range_round_ss,
14890         _mm_maskz_range_round_ss): New intrinsics.
14891         (__builtin_ia32_rangesd128_round)
14892         (__builtin_ia32_rangess128_round): Remove.
14893         (__builtin_ia32_rangesd128_mask_round,
14894         __builtin_ia32_rangess128_mask_round): New builtins.
14895         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14896         __builtin_ia32_rangess128_round): Remove.
14897         (__builtin_ia32_rangesd128_mask_round,
14898         __builtin_ia32_rangess128_mask_round): New builtins.
14899         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14900         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14901         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14902         "<round_saeonly_constraint>")): Changed to ...
14903         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14904         "<round_saeonly_scalar_constraint>")): ... this.
14905         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14906         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14907         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14908         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14909         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14911 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
14913         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14914         options.
14915         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14916         Remove all values except native, 8540 and 8548.
14918 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
14920         * config/i386/i386.c (ix86_output_function_return): Pass
14921         INVALID_REGNUM, instead of -1, as invalid register number to
14922         indirect_thunk_name and output_indirect_thunk.
14924 2018-02-02  Julia Koval  <julia.koval@intel.com>
14926         * config.gcc: Add -march=icelake.
14927         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14928         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14929         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14930         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14931         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14932         (processor_target_table): Add icelake.
14933         (ix86_option_override_internal): Handle new PTAs.
14934         (get_builtin_code_for_version): Handle icelake.
14935         (M_INTEL_COREI7_ICELAKE): New.
14936         (fold_builtin_cpu): Handle icelake.
14937         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14938         * doc/invoke.texi: Add -march=icelake.
14940 2018-02-02  Julia Koval  <julia.koval@intel.com>
14942         * config/i386/i386.c (ix86_option_override_internal): Change flags type
14943         to wide_int_bitmask.
14944         * wide-int-bitmask.h: New.
14946 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14948         PR target/84066
14949         * config/i386/i386.md: Replace Pmode with word_mode in
14950         builtin_setjmp_setup and builtin_longjmp to support x32.
14952 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
14954         PR target/56010
14955         PR target/83743
14956         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14957         #include "opts.h".
14958         (rs6000_supported_cpu_names): New static variable.
14959         (linux_cpu_translation_table): Likewise.
14960         (elf_platform) <cpu>: Define new static variable and use it.
14961         Translate kernel AT_PLATFORM name to canonical name if needed.
14962         Error if platform name is unknown.
14964 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
14966         PR target/84089
14967         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14969 2018-02-01  Jeff Law  <law@redhat.com>
14971         PR target/84128
14972         * config/i386/i386.c (release_scratch_register_on_entry): Add new
14973         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
14974         the scratch if RELEASE_VIA_POP is false.
14975         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14976         If we have to save a temporary register, decrement SIZE appropriately.
14977         Pass new arguments to release_scratch_register_on_entry.
14978         (ix86_adjust_stack_and_probe): Likewise.
14979         (ix86_emit_probe_stack_range): Pass new arguments to
14980         release_scratch_register_on_entry.
14982 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
14984         PR rtl-optimization/84157
14985         * combine.c (change_zero_ext): Use REG_P predicate in
14986         front of HARD_REGISTER_P predicate.
14988 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
14990         * config/avr/avr.c (avr_option_override): Move disabling of
14991         -fdelete-null-pointer-checks to...
14992         * common/config/avr/avr-common.c (avr_option_optimization_table):
14993         ...here.
14995 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14997         PR tree-optimization/81635
14998         * tree-data-ref.c (split_constant_offset_1): For types that
14999         wrap on overflow, try to use range info to prove that wrapping
15000         cannot occur.
15002 2018-02-01  Renlin Li  <renlin.li@arm.com>
15004         PR target/83370
15005         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15006         TAILCALL_ADDR_REGS.
15007         (aarch64_register_move_cost): Likewise.
15008         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15009         TAILCALL_ADDR_REGS.
15010         (REG_CLASS_NAMES): Likewise.
15011         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15012         TAILCALL_ADDR_REGS. Remove IP registers.
15013         * config/aarch64/aarch64.md (Ucs): Update register constraint.
15015 2018-02-01  Richard Biener  <rguenther@suse.de>
15017         * domwalk.h (dom_walker::dom_walker): Add additional constructor
15018         for specifying RPO order and allow NULL for that.
15019         * domwalk.c (dom_walker::dom_walker): Likewise.
15020         (dom_walker::walk): Handle NULL RPO order.
15021         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15022         in RPO order.
15023         (rewrite_update_dom_walker): Likewise.
15024         (mark_def_dom_walker): Likewise.
15026 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15028         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15029         (aarch64_maybe_expand_sve_subreg_move): Declare.
15030         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15031         * config/aarch64/predicates.md (aarch64_any_register_operand): New
15032         predicate.
15033         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15034         that are semantically a reverse operation.
15035         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15036         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15037         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15038         functions.
15039         (aarch64_can_change_mode_class): For big-endian, forbid changes
15040         between two SVE modes if they have different element sizes.
15042 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15044         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15045         the TImode handling for big-endian targets.
15047 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15049         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15050         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
15051         not just bytes.
15052         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15053         Remove BSWAP handing for big-endian targets and use the form of
15054         LD1RQ appropariate for the mode.
15056 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15058         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15059         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15060         duplicated element.
15062 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15064         PR tearget/83845
15065         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15066         check for operands that need to go through aarch64_sve_reload_be.
15068 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
15070         PR tree-optimization/81661
15071         PR tree-optimization/84117
15072         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15073         * tree-eh.c: Include gimplify.h.
15074         (find_trapping_overflow, replace_trapping_overflow,
15075         rewrite_to_non_trapping_overflow): New functions.
15076         * tree-vect-loop.c: Include tree-eh.h.
15077         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15078         * tree-data-ref.c: Include tree-eh.h.
15079         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15081 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
15083         PR rtl-optimization/84123
15084         * combine.c (change_zero_ext): Check if hard register satisfies
15085         can_change_dest_mode before calling gen_lowpart_SUBREG.
15087 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
15089         PR target/82444
15090         * ira.c (ira_init_register_move_cost): Remove assert.
15092 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15094         PR rtl-optimization/84071
15095         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15096         * doc/tm.texi: Regenerate.
15098 2018-01-31  Richard Biener  <rguenther@suse.de>
15100         PR tree-optimization/84132
15101         * tree-data-ref.c (analyze_miv_subscript): Properly
15102         check whether evolution_function_is_affine_multivariate_p
15103         before calling gcd_of_steps_may_divide_p.
15105 2018-01-31  Julia Koval  <julia.koval@intel.com>
15107         PR target/83618
15108         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15109         * config/i386/i386.md (rdpid_rex64) New.
15110         (rdpid): Make 32bit only.
15112 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
15114         PR lto/84105
15115         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15116         an IDENTIFIER_NODE for FUNCTION_TYPE's.
15118 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15120         Revert
15121         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15123         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15125 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15127         PR rtl-optimization/84071
15128         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15129         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15131 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
15133         * config/arc/arc.c (arc_handle_aux_attribute): New function.
15134         (arc_attribute_table): Add 'aux' attribute.
15135         (arc_in_small_data_p): Consider aux like variables.
15136         (arc_is_aux_reg_p): New function.
15137         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15138         (arc_get_aux_arg): New function.
15139         (prepare_move_operands): Handle aux-register access.
15140         (arc_handle_aux_attribute): New function.
15141         * doc/extend.texi (ARC Variable attributes): Add subsection.
15143 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
15145         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15146         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15147         (arc_attribute_table): Add 'uncached' attribute.
15148         (arc_print_operand): Print '.di' flag for uncached memory
15149         accesses.
15150         (arc_in_small_data_p): Do not consider for small data the uncached
15151         types.
15152         (arc_is_uncached_mem_p): New function.
15153         * config/arc/predicates.md (compact_store_memory_operand): Check
15154         for uncached memory accesses.
15155         (nonvol_nonimm_operand): Likewise.
15156         * doc/extend.texi (ARC Type Attribute): New subsection.
15158 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
15160         PR c/84100
15161         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15162         falign-loops=): Add Optimization flag.
15164 2018-01-30  Jeff Law  <law@redhat.com>
15166         PR target/84064
15167         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15168         INT_REGISTERS_SAVED.  Check it prior to calling
15169         get_scratch_register_on_entry.
15170         (ix86_adjust_stack_and_probe): Similarly.
15171         (ix86_emit_probe_stack_range): Similarly.
15172         (ix86_expand_prologue): Corresponding changes.
15174 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15176         PR target/40411
15177         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15178         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15180 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
15182         PR target/84112
15183         * lra-constraints.c (curr_insn_transform): Process AND in the
15184         address.
15186 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
15188         PR rtl-optimization/83986
15189         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15190         dependence against last_pending_memory_flush in addition to
15191         pending_jump_insns.
15193 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
15195         PR tree-optimization/81611
15196         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15197         copies.
15199 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15201         PR target/83758
15202         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15203         a reg rtx.
15205 2018-01-30  Richard Biener  <rguenther@suse.de>
15206             Jakub Jelinek  <jakub@redhat.com>
15208         PR tree-optimization/84111
15209         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
15210         inner loops added during recursion, as they don't have up-to-date
15211         SSA form.
15213 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
15215         PR ipa/81360
15216         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
15217         (can_inline_edge_by_limits_p): ... here.
15218         (can_early_inline_edge_p, check_callers,
15219         update_caller_keys, update_callee_keys, recursive_inlining,
15220         add_new_edges_to_heap, speculation_useful_p,
15221         inline_small_functions,
15222         inline_small_functions, flatten_function,
15223         inline_to_all_callers_1): Update.
15225 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
15227         * profile-count.c (profile_count::combine_with_ipa_count): Handle
15228         zeros correctly.
15230 2018-01-30  Richard Biener  <rguenther@suse.de>
15232         PR tree-optimization/83008
15233         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
15234         invariant and constant vector uses in stmts when they need
15235         more than one stmt.
15237 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15239         PR bootstrap/84017
15240         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
15241         * configure: Regenerate.
15243 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15245         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
15246         pattern.
15247         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
15248         Use gen_rtx_REG rather than gen_lowpart.
15250 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15252         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
15253         rather than 0 when creating partial subregs.
15255 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15257         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
15258         of usage.
15260 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
15262         PR target/81550
15263         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
15264         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
15265         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
15266         flags.  This restores the settings used before the 2017-07-24.
15267         Turning off pre increment/decrement/modify allows IVOPTS to
15268         optimize DF/SF loops where the index is an int.
15270 2018-01-29  Richard Biener  <rguenther@suse.de>
15271             Kelvin Nilsen  <kelvin@gcc.gnu.org>
15273         PR bootstrap/80867
15274         * tree-vect-stmts.c (vectorizable_call): Don't call
15275         targetm.vectorize_builtin_md_vectorized_function if callee is
15276         NULL.
15278 2018-01-22  Carl Love  <cel@us.ibm.com>
15280         * doc/extend.tex: Fix typo in second arg in
15281         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
15283 2018-01-29  Richard Biener  <rguenther@suse.de>
15285         PR tree-optimization/84086
15286         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
15287         (flush_ssaname_freelist): When SSA names were released reset
15288         the SCEV hash table.
15290 2018-01-29  Richard Biener  <rguenther@suse.de>
15292         PR tree-optimization/84057
15293         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15294         removed paths when removing edges.
15296 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
15298         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15299         -mfunction-return=@var{choice}.
15301 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15303         PR diagnostic/84034
15304         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15305         Handle CR like TAB.
15306         (layout::print_source_line): Likewise.
15307         (test_get_line_width_without_trailing_whitespace): Add test cases.
15309 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
15311         PR middle-end/84040
15312         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15313         debug insns.
15315 2018-01-26  Jim Wilson  <jimw@sifive.com>
15317         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15319         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15320         specified.
15322 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15324         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15325         and CMP + SUB-immediate -> SUBS.
15327 2018-01-26  Martin Sebor  <msebor@redhat.com>
15329         PR tree-optimization/83896
15330         * tree-ssa-strlen.c (get_string_len): Rename...
15331         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
15332         Avoid assuming length is constant.
15333         (handle_char_store): Use HOST_WIDE_INT for string length.
15335 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
15337         PR target/81763
15338         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15339         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15341 2018-01-26  Richard Biener  <rguenther@suse.de>
15343         PR rtl-optimization/84003
15344         * dse.c (record_store): Only record redundant stores when
15345         the earlier store aliases at least all accesses the later one does.
15347 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
15349         PR rtl-optimization/83985
15350         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15351         REG_CFA_RESTORE insns.
15352         (delete_unmarked_insns): Don't ignore separate shrink wrapping
15353         REG_CFA_RESTORE insns here.
15355         PR c/83989
15356         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15357         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15359 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15361         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15362         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15363         (arc_init): Likewise.
15364         (arc_override_options): Likewise.
15365         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15366         value.
15367         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15368         support.
15369         * config/arc/arc.h (TARGET_DBNZ): Define.
15370         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15371         properly set the tune attribute.
15372         (dbnz): Use TARGET_DBNZ guard.
15373         * config/arc/arc.opt (mtune): Add core3 option.
15375 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15377         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15378         recognize new pic like addresses.
15379         (arc_delegitimize_address): Clean up.
15381 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15383         * config/arc/arc-arches.def: Option mrf16 valid for all
15384         architectures.
15385         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15386         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15387         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15388         * config/arc/arc-tables.opt: Regenerate.
15389         * config/arc/arc.c (arc_conditional_register_usage): Handle
15390         reduced register file case.
15391         (arc_file_start): Set must have build attributes.
15392         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15393         mrf16 option value.
15394         * config/arc/arc.opt (mrf16): Add new option.
15395         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15396         * config/arc/genmultilib.awk: Handle new mrf16 option.
15397         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15398         * config/arc/t-multilib: Regenerate.
15399         * doc/invoke.texi (ARC Options): Document mrf16 option.
15401 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15403         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15404         * config/arc/arc.c (arc_handle_secure_attribute): New function.
15405         (arc_attribute_table): Add 'secure_call' attribute.
15406         (arc_print_operand): Print secure call operand.
15407         (arc_function_ok_for_sibcall): Don't optimize tail calls when
15408         secure.
15409         (arc_is_secure_call_p): New function.  * config/arc/arc.md
15410         (call_i): Add support for sjli instruction.
15411         (call_value_i): Likewise.
15412         * config/arc/constraints.md (Csc): New constraint.
15414 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15415             John Eric Martin  <John.Martin@emmicro-us.com>
15417         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15418         * config/arc/arc.c (_arc_jli_section): New struct.
15419         (arc_jli_section): New type.
15420         (rc_jli_sections): New static variable.
15421         (arc_handle_jli_attribute): New function.
15422         (arc_attribute_table): Add jli_always and jli_fixed attribute.
15423         (arc_file_end): New function.
15424         (TARGET_ASM_FILE_END): Define.
15425         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15426         (arc_add_jli_section): New function.
15427         (jli_call_scan): Likewise.
15428         (arc_reorg): Call jli_call_scan.
15429         (arc_output_addsi): Remove 'S' from printing asm operand.
15430         (arc_is_jli_call_p): New function.
15431         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15432         operand.
15433         (movhi_insn): Likewise.
15434         (movsi_insn): Likewise.
15435         (movsi_set_cc_insn): Likewise.
15436         (loadqi_update): Likewise.
15437         (load_zeroextendqisi_update): Likewise.
15438         (load_signextendqisi_update): Likewise.
15439         (loadhi_update): Likewise.
15440         (load_zeroextendhisi_update): Likewise.
15441         (load_signextendhisi_update): Likewise.
15442         (loadsi_update): Likewise.
15443         (loadsf_update): Likewise.
15444         (movsicc_insn): Likewise.
15445         (bset_insn): Likewise.
15446         (bxor_insn): Likewise.
15447         (bclr_insn): Likewise.
15448         (bmsk_insn): Likewise.
15449         (bicsi3_insn): Likewise.
15450         (cmpsi_cc_c_insn): Likewise.
15451         (movsi_ne): Likewise.
15452         (movsi_cond_exec): Likewise.
15453         (clrsbsi2): Likewise.
15454         (norm_f): Likewise.
15455         (normw): Likewise.
15456         (swap): Likewise.
15457         (divaw): Likewise.
15458         (flag): Likewise.
15459         (sr): Likewise.
15460         (kflag): Likewise.
15461         (ffs): Likewise.
15462         (ffs_f): Likewise.
15463         (fls): Likewise.
15464         (call_i): Remove 'S' asm letter, add jli instruction.
15465         (call_value_i): Likewise.
15466         * config/arc/arc.op (mjli-always): New option.
15467         * config/arc/constraints.md (Cji): New constraint.
15468         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15469         operand.
15470         (subsf3_fpx): Likewise.
15471         (mulsf3_fpx): Likewise.
15472         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15473         asm operand.
15474         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15475         function attrbutes.
15476         * doc/invoke.texi (ARC): Document mjli-always option.
15478 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
15480         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15481         avoid addition with 0 and use incw and decw where possible.
15483 2018-01-26  Richard Biener  <rguenther@suse.de>
15485         PR tree-optimization/81082
15486         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15487         association if it requires casting to unsigned.
15488         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15489         from fold_plusminus_mult_expr to catch important cases late when
15490         range info is available.
15492 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15494         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15495         * configure.ac (hidden_linkonce): New test.
15496         * configure: Regenerate.
15497         * config.in: Regenerate.
15499 2018-01-26  Julia Koval  <julia.koval@intel.com>
15501         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15502         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15503         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15504         _mm_mask_bitshuffle_epi64_mask): Fix type.
15505         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15506         USI_FTYPE_V4DI_V4DI_USI): Remove.
15507         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15508         __builtin_ia32_vpshufbitqmb256_mask,
15509         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15510         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15511         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15513 2018-01-26  Alan Modra  <amodra@gmail.com>
15515         PR target/84033
15516         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15517         UNSPEC_VBPERMQ.  Sort other unspecs.
15519 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
15521         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15523 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
15525         PR middle-end/83055
15526         * predict.c (drop_profile): Do not push/pop cfun; update also
15527         node->count.
15528         (handle_missing_profiles): Fix logic looking for zero profiles.
15530 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
15532         PR middle-end/83977
15533         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15534         on functions with #pragma omp declare simd or functions with simd
15535         attribute.
15536         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15537         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15538         Remove trailing \n from warning_at calls.
15540 2018-01-25  Tom de Vries  <tom@codesourcery.com>
15542         PR target/84028
15543         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15544         for neutered workers.
15546 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
15548         PR target/68467
15549         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15550         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15552 2018-01-24  Jeff Law  <law@redhat.com>
15554         PR target/83994
15555         * i386.c (get_probe_interval): Move to earlier point.
15556         (ix86_compute_frame_layout): If -fstack-clash-protection and
15557         the frame is larger than the probe interval, then use pushes
15558         to save registers rather than reg->mem moves.
15559         (ix86_expand_prologue): Remove conditional for int_registers_saved
15560         assertion.
15562 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
15564         PR target/84014
15565         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15566         min/max for never referenced object.
15568 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
15570         PR middle-end/83977
15571         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15572         here.
15573         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15574         attributes from DECL_ATTRIBUTES (decl) without affecting
15575         DECL_ATTRIBUTES (current_function_decl).
15576         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15577         functions with non-NULL DECL_ABSTRACT_ORIGIN.
15579 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
15581         PR tree-optimization/83979
15582         * fold-const.c (fold_comparison): Use constant_boolean_node
15583         instead of boolean_{true,false}_node.
15585 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
15587         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15588         with zero counts.
15590 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15592         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15593         Simplify the clause that sets the length attribute.
15594         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15595         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15596         clause that sets the length attribute.
15597         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15599 2018-01-24  Tom de Vries  <tom@codesourcery.com>
15601         PR target/83589
15602         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15603         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15604         Add strict parameter.
15605         (prevent_branch_around_nothing): Insert dummy insn between branch to
15606         label and label with no ptx insn inbetween.
15607         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15609 2018-01-24  Tom de Vries  <tom@codesourcery.com>
15611         PR target/81352
15612         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15613         for neutered threads in warp.
15614         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15616 2018-01-24  Richard Biener  <rguenther@suse.de>
15618         PR tree-optimization/83176
15619         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15620         operands.
15622 2018-01-24  Richard Biener  <rguenther@suse.de>
15624         PR tree-optimization/82819
15625         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15626         code generating pluses that are no-ops in the target precision.
15628 2018-01-24  Richard Biener  <rguenther@suse.de>
15630         PR middle-end/84000
15631         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15633 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15635         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15636         to merge probabilities.
15637         * predict.c (probably_never_executed): Also mark as cold functions
15638         with global 0 profile and guessed local profile.
15639         * profile-count.c (profile_probability::combine_with_count): New
15640         member function.
15641         * profile-count.h (profile_probability::operator*,
15642         profile_probability::operator*=, profile_probability::operator/,
15643         profile_probability::operator/=): Reduce precision to adjusted
15644         and set value to guessed on contradictory divisions.
15645         (profile_probability::combine_with_freq): Remove.
15646         (profile_probability::combine_wiht_count): Declare.
15647         (profile_count::force_nonzero):: Set to adjusted.
15648         (profile_count::probability_in):: Set quality to adjusted.
15649         * tree-ssa-tail-merge.c (replace_block_by): Use
15650         combine_with_count.
15652 2018-01-23  Andrew Waterman  <andrew@sifive.com>
15653             Jim Wilson  <jimw@sifive.com>
15655         * config/riscv/riscv.c (riscv_stack_boundary): New.
15656         (riscv_option_override): Set riscv_stack_boundary.  Handle
15657         riscv_preferred_stack_boundary_arg.
15658         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15659         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15660         (STACK_BOUNDARY): Set to riscv_stack_boundary.
15661         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15662         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15663         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15665 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
15667         PR target/83905
15668         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15669         of struct ix86_frame.
15670         (ix86_expand_epilogue): Likewise.  Add a local variable for
15671         the reg_save_offset field in struct ix86_frame.
15673 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
15675         PR tree-optimization/82604
15676         * tree-loop-distribution.c (enum partition_kind): New enum item
15677         PKIND_PARTIAL_MEMSET.
15678         (partition_builtin_p): Support above new enum item.
15679         (generate_code_for_partition): Ditto.
15680         (compute_access_range): Differentiate cases that equality can be
15681         proven at all loops, the innermost loops or no loops.
15682         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15683         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
15684         (finalize_partitions, distribute_loop): Don't fuse partition of
15685         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15686         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15687         parloop is enabled.
15689 2018-01-23  Martin Liska  <mliska@suse.cz>
15691         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15692         order to ignore the predictor.
15693         (PRED_POLYMORPHIC_CALL): Likewise.
15694         (PRED_RECURSIVE_CALL): Likewise.
15696 2018-01-23  Martin Liska  <mliska@suse.cz>
15698         * tree-profile.c (tree_profiling): Print function header to
15699         aware reader which function we are working on.
15700         * value-prof.c (gimple_find_values_to_profile): Do not print
15701         not interesting value histograms.
15703 2018-01-23  Martin Liska  <mliska@suse.cz>
15705         * profile-count.h (enum profile_quality): Add
15706         profile_uninitialized as the first value. Do not number values
15707         as they are zero based.
15708         (profile_count::verify): Update sanity check.
15709         (profile_probability::verify): Likewise.
15711 2018-01-23  Nathan Sidwell  <nathan@acm.org>
15713         * doc/invoke.texi (ffor-scope): Deprecate.
15715 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15717         PR tree-optimization/83510
15718         * domwalk.c (set_all_edges_as_executable): New function.
15719         (dom_walker::dom_walker): Convert bool param
15720         "skip_unreachable_blocks" to enum reachability.  Move setup of
15721         edge flags to set_all_edges_as_executable and only do it when
15722         reachability is REACHABLE_BLOCKS.
15723         * domwalk.h (enum dom_walker::reachability): New enum.
15724         (dom_walker::dom_walker): Convert bool param
15725         "skip_unreachable_blocks" to enum reachability.
15726         (set_all_edges_as_executable): New decl.
15727         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
15728         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15729         "reachability".
15730         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15731         but converting true to REACHABLE_BLOCKS.
15732         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15733         * tree-vrp.c
15734         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15735         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15736         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15737         REACHABLE_BLOCKS.
15738         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15739         if check_all_array_refs will be called.
15741 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15743         * tree.c (selftest::test_location_wrappers): Add more test
15744         coverage.
15746 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15748         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15749         (selftest::test_bit_in_range): Likewise.
15751 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
15753         PR testsuite/83888
15754         * doc/sourcebuild.texi (vect_float): Say that the selector
15755         only describes the situation when -funsafe-math-optimizations is on.
15756         (vect_float_strict): Document.
15758 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
15760         PR tree-optimization/83965
15761         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15762         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15763         instead of checking only for a reduction.
15764         (vect_recog_widen_sum_pattern): Likewise.
15766 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15768         * predict.c (probably_never_executed): Only use precise profile info.
15769         (compute_function_frequency): Skip after inlining hack since we now
15770         have quality checking.
15772 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15774         * profile-count.h (profile_probability::very_unlikely,
15775         profile_probability::unlikely, profile_probability::even): Set
15776         precision to guessed.
15778 2018-01-23  Richard Biener  <rguenther@suse.de>
15780         PR tree-optimization/83963
15781         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15782         Properly terminate dominator walk when crossing the exit edge not
15783         when visiting its source block.
15785 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
15787         PR c++/83918
15788         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15789         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15791 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
15793         PR tree-optimization/83957
15794         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
15795         semicolon after for body surrounded by braces.
15797         PR tree-optimization/83081
15798         * profile-count.h (profile_probability::split): New method.
15799         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15800         Use profile_probability::split.
15801         (do_compare_rtx_and_jump): Fix adjustment of probabilities
15802         when splitting a single conditional jump into 2.
15804 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
15806         PR tree-optimization/69452
15807         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15808         decl.
15810 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15812         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15813         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15814         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15816 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15818         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15819         declaration.
15820         * config/rl78/rl78.md (movdi): New define_expand.
15821         * config/rl78/rl78.c (rl78_split_movdi): New function.
15823 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
15825         PR target/83862
15826         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15827         no longer used.
15828         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15829         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15830         128-bit to produce an UNSPEC move to get the double word with the
15831         signbit and then a shift directly to do signbit.
15832         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15833         implementation with a new version that just does either a direct
15834         move or a regular move.  Move memory interface to separate insns.
15835         Move insns so they are next to the expander.
15836         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15837         with signbit move.  Split big and little endian case.
15838         (signbit<mode>2_dm_mem_le): Likewise.
15839         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15840         (signbit<mode>2_dm2): Likewise.
15842 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15844         * config/rl78/rl78.md (anddi3): New define_expand.
15846 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15848         * config/rl78/rl78.md (umindi3): New define_expand.
15850 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15852         * config/rl78/rl78.md (smindi3): New define_expand.
15854 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15856         * config/rl78/rl78.md (smaxdi3): New define_expand.
15858 2018-01-22  Carl Love  <cel@us.ibm.com>
15860         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15861         LVX_V1TI): Add macro expansion.
15862         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15863         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15864         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15865         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15866         Change check to determine if the instruction is a byte reversing
15867         entry.  Fix typo in comment.
15868         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15869         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15870         Add def_builtin calls for new builtins.
15871         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15872         Add define_insn expansion.
15874 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15876         * config/rl78/rl78.md (umaxdi3): New define_expand.
15878 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15880         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15881         for non-QImode registers.
15883 2018-01-22  Richard Biener  <rguenther@suse.de>
15885         PR tree-optimization/83963
15886         * graphite-scop-detection.c (scop_detection::get_sese): Delay
15887         including the loop exit block.
15888         (scop_detection::merge_sese): Likewise.
15889         (scop_detection::add_scop): Do it here instead.
15891 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15893         * doc/sourcebuild.texi (arm_softfloat): Document.
15895 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
15897         PR gcc/77734
15898         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15899         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15900         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15902 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15903             David Edelsohn  <dje.gcc@gmail.com>
15905         PR target/83946
15906         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15907         Change "crset eq" to "crset 2".
15908         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15909         (*call_indirect_aix<mode>_nospec): Likewise.
15910         (*call_value_indirect_aix<mode>_nospec): Likewise.
15911         (*call_indirect_elfv2<mode>_nospec): Likewise.
15912         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15913         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15914         change assembly output from . to $.
15915         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15916         (indirect_jump<mode>_nospec): Change assembly output from . to $.
15917         (*tablejump<mode>_internal1_nospec): Likewise.
15919 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
15921         PR target/80870
15922         * config/sh/sh_optimize_sett_clrt.cc:
15923         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15925 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
15927         PR tree-optimization/83940
15928         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15929         offset_dt to vect_constant_def rather than vect_unknown_def_type.
15930         (vect_check_load_store_mask): Add a mask_dt_out parameter and
15931         use it to pass back the definition type.
15932         (vect_check_store_rhs): Likewise rhs_dt_out.
15933         (vect_build_gather_load_calls): Add a mask_dt argument and use
15934         it instead of a call to vect_is_simple_use.
15935         (vectorizable_store): Update calls to vect_check_load_store_mask
15936         and vect_check_store_rhs.  Use the dt returned by the latter instead
15937         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
15938         instead of calls to vect_is_simple_use.  Pass the scalar rather
15939         than the vector operand to vect_is_simple_use when handling
15940         second and subsequent copies of an rhs value.
15941         (vectorizable_load): Update calls to vect_check_load_store_mask
15942         and vect_build_gather_load_calls.  Use the cached mask_dt and
15943         gs_info.offset_dt instead of calls to vect_is_simple_use.
15945 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
15947         PR middle-end/83945
15948         * tree-emutls.c: Include gimplify.h.
15949         (lower_emutls_2): New function.
15950         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15951         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15952         it before further processing.
15954         PR target/83930
15955         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15956         UINTVAL (trueop1) instead of INTVAL (op1).
15958 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
15960         PR debug/81570
15961         PR debug/83728
15962         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15963         INCOMING_FRAME_SP_OFFSET if not defined.
15964         (scan_trace): Add ENTRY argument.  If true and
15965         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15966         emit a note to adjust the CFA offset.
15967         (create_cfi_notes): Adjust scan_trace callers.
15968         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15969         INCOMING_FRAME_SP_OFFSET in the CIE.
15970         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15971         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15972         Likewise.
15973         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15974         * doc/tm.texi: Regenerated.
15976 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15978         PR rtl-optimization/83147
15979         * lra-constraints.c (remove_inheritance_pseudos): Use
15980         lra_substitute_pseudo_within_insn.
15982 2018-01-19  Tom de Vries  <tom@codesourcery.com>
15983             Cesar Philippidis  <cesar@codesourcery.com>
15985         PR target/83920
15986         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15988 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
15990         PR target/83790
15991         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15992         spaces for function labels.
15994 2018-01-19  Martin Liska  <mliska@suse.cz>
15996         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15997         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15998         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15999         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16000         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16001         (PRED_CONST_RETURN): Change from 69 to 65.
16002         (PRED_NULL_RETURN): Change from 91 to 71.
16003         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16004         (PRED_LOOP_GUARD): Change from 66 to 73.
16006 2018-01-19  Martin Liska  <mliska@suse.cz>
16008         * predict.c (predict_insn_def): Add new assert.
16009         (struct branch_predictor): Change type to signed integer.
16010         (test_prediction_value_range): Amend test to cover
16011         PROB_UNINITIALIZED.
16012         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16013         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16014         (PRED_LOOP_ITERATIONS_MAX): Likewise.
16015         (PRED_LOOP_IV_COMPARE): Likewise.
16016         * predict.h (PROB_UNINITIALIZED): Define new constant.
16018 2018-01-19  Martin Liska  <mliska@suse.cz>
16020         * predict.c (dump_prediction): Add new format for
16021         analyze_brprob.py script which is enabled with -details
16022         suboption.
16023         * profile-count.h (precise_p): New function.
16025 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
16027         PR tree-optimization/83922
16028         * tree-vect-loop.c (vect_verify_full_masking): Return false if
16029         there are no statements that need masking.
16030         (vect_active_double_reduction_p): New function.
16031         (vect_analyze_loop_operations): Use it when handling phis that
16032         are not in the loop header.
16034 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
16036         PR tree-optimization/83914
16037         * tree-vect-loop.c (vectorizable_induction): Don't convert
16038         init_expr or apply the peeling adjustment for inductions
16039         that are nested within the vectorized loop.
16041 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16043         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16044         instead of NEG.
16046 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
16048         PR sanitizer/81715
16049         PR testsuite/83882
16050         * function.h (gimplify_parameters): Add gimple_seq * argument.
16051         * function.c: Include gimple.h and options.h.
16052         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16053         for the added local temporaries if needed.
16054         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16055         if there are any parameter cleanups, wrap whole body into a
16056         try/finally with the cleanups.
16058 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
16060         PR target/82964
16061         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16062         Use GET_MODE_CLASS for scalar floating point.
16064 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
16066         PR ipa/82256
16067         patch by PaX Team
16068         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16069         Fix call of call_cgraph_insertion_hooks.
16071 2018-01-18  Martin Sebor  <msebor@redhat.com>
16073         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16075 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
16077         PR ipa/83619
16078         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16079         frequencies.
16081 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
16083         PR other/70268
16084         * common.opt: (-ffile-prefix-map): New option.
16085         * opts.c (common_handle_option): Defer it.
16086         * opts-global.c (handle_common_deferred_options): Handle it.
16087         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16088         * file-prefix-map.h: New file.
16089         (remap_debug_filename, add_debug_prefix_map): ...here.
16090         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16091         * final.c (debug_prefix_map, add_debug_prefix_map
16092         remap_debug_filename): Move to...
16093         * file-prefix-map.c: New file.
16094         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16095         generalize, get rid of alloca(), use strrchr() instead of strchr().
16096         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16097         Implement in terms of add_prefix_map().
16098         (remap_macro_filename, remap_debug_filename): Implement in term of
16099         remap_filename().
16100         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16101         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16102         * dbxout.c: Include file-prefix-map.h.
16103         * varasm.c: Likewise.
16104         * vmsdbgout.c: Likewise.
16105         * xcoffout.c: Likewise.
16106         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16107         * doc/cppopts.texi (-fmacro-prefix-map): Document.
16108         * doc/invoke.texi (-ffile-prefix-map): Document.
16109         (-fdebug-prefix-map): Update description.
16111 2018-01-18  Martin Liska  <mliska@suse.cz>
16113         * config/i386/i386.c (indirect_thunk_name): Document that also
16114         lfence is emitted.
16115         (output_indirect_thunk): Document why both instructions
16116         (pause and lfence) are generated.
16118 2018-01-18  Richard Biener  <rguenther@suse.de>
16120         PR tree-optimization/83887
16121         * graphite-scop-detection.c
16122         (scop_detection::get_nearest_dom_with_single_entry): Remove.
16123         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16124         (scop_detection::merge_sese): Re-implement with a flood-fill
16125         algorithm that properly finds a SESE region if it exists.
16127 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
16129         PR c/61240
16130         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16131         pointer_diff optimizations use view_convert instead of convert.
16133 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16135         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16136         Generate different code for -mno-speculate-indirect-jumps.
16137         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16138         (*call_indirect_aix<mode>): Disable for
16139         -mno-speculate-indirect-jumps.
16140         (*call_indirect_aix<mode>_nospec): New define_insn.
16141         (*call_value_indirect_aix<mode>): Disable for
16142         -mno-speculate-indirect-jumps.
16143         (*call_value_indirect_aix<mode>_nospec): New define_insn.
16144         (*sibcall_nonlocal_sysv<mode>): Generate different code for
16145         -mno-speculate-indirect-jumps.
16146         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16148 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
16150         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16151         long double type, set the flags for noting the default long double
16152         type, even if we don't pass or return a long double type.
16154 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
16156         PR ipa/83051
16157         * ipa-inline.c (flatten_function): Do not overwrite final inlining
16158         failure.
16160 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
16162         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16163         support for merge[hl].
16164         (fold_mergehl_helper): New helper function.
16165         (tree-vector-builder.h): New #include for tree_vector_builder usage.
16166         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16167         (altivec_vmrglw_direct): Add xxmrglw insn.
16169 2018-01-17  Andrew Waterman  <andrew@sifive.com>
16171         * config/riscv/riscv.c (riscv_conditional_register_usage): If
16172         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16174 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
16176         PR lto/83121
16177         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16178         call the lto_location_cache before reading the
16179         DECL_SOURCE_LOCATION of the types.
16181 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
16182             Richard Sandiford  <richard.sandiford@linaro.org>
16184         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16185         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16186         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16187         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16188         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16189         Add declaration.
16190         * config/aarch64/constraints.md (aarch64_movti_operand):
16191         Limit immediates.
16192         * config/aarch64/predicates.md (Uti): Add new constraint.
16194 2018-01-17 Carl Love  <cel@us.ibm.com>
16196         * config/rs6000/vsx.md (define_expand xl_len_r,
16197         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16198         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16199         lxvll.
16200         (define_expand, define_insn): Move the shift left from  the
16201         define_insn to the define_expand for lxvl and stxvl instructions.
16202         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16203         and XL_LEN_R definitions to PURE.
16205 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
16207         * config/i386/i386.c (indirect_thunk_name): Declare regno
16208         as unsigned int.  Compare regno with INVALID_REGNUM.
16209         (output_indirect_thunk): Ditto.
16210         (output_indirect_thunk_function): Ditto.
16211         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
16212         in the call to output_indirect_thunk_function.
16214 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
16216         PR middle-end/83884
16217         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
16218         rather than the size of inner_type to determine the stack slot size
16219         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
16221 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
16223         PR target/83546
16224         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
16225         to PTA_SILVERMONT.
16227 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
16229         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
16230         endian Linux systems to optionally enable multilibs for selecting
16231         the long double type if the user configured an explicit type.
16232         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
16233         have no long double multilibs if not defined.
16234         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
16235         warn if the user used -mabi={ieee,ibm}longdouble and we built
16236         multilibs for long double.
16237         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
16238         appropriate multilib option.
16239         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
16240         multilib options.
16241         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
16242         for building long double multilibs.
16243         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
16245 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
16247         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
16248         copies.
16250         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
16251         64 bits.
16252         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
16253         128 bits.
16255         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
16256         variables.
16258         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
16259         return value.
16261 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
16263         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
16264         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
16266 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16268         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
16269         different rtl trees depending on TARGET_64BIT.
16270         (rs6000_gen_lvx): Likewise.
16272 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
16274         * config/visium/visium.md (nop): Tweak comment.
16275         (hazard_nop): Likewise.
16277 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16279         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
16280         -mspeculate-indirect-jumps.
16281         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
16282         for -mno-speculate-indirect-jumps.
16283         (*call_indirect_elfv2<mode>_nospec): New define_insn.
16284         (*call_value_indirect_elfv2<mode>): Disable for
16285         -mno-speculate-indirect-jumps.
16286         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
16287         (indirect_jump): Emit different RTL for
16288         -mno-speculate-indirect-jumps.
16289         (*indirect_jump<mode>): Disable for
16290         -mno-speculate-indirect-jumps.
16291         (*indirect_jump<mode>_nospec): New define_insn.
16292         (tablejump): Emit different RTL for
16293         -mno-speculate-indirect-jumps.
16294         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16295         (tablejumpsi_nospec): New define_expand.
16296         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16297         (tablejumpdi_nospec): New define_expand.
16298         (*tablejump<mode>_internal1): Disable for
16299         -mno-speculate-indirect-jumps.
16300         (*tablejump<mode>_internal1_nospec): New define_insn.
16301         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16302         option.
16304 2018-01-16  Artyom Skrobov tyomitch@gmail.com
16306         * caller-save.c (insert_save): Drop unnecessary parameter.  All
16307         callers updated.
16309 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16310             Richard Biener  <rguenth@suse.de>
16312         PR libgomp/83590
16313         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16314         return early, inline manually is_gimple_sizepos.  Make sure if we
16315         call gimplify_expr we don't end up with a gimple constant.
16316         * tree.c (variably_modified_type_p): Don't return true for
16317         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
16318         * gimplify.h (is_gimple_sizepos): Remove.
16320 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16322         PR tree-optimization/83857
16323         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16324         vectorizable_live_operation for pure SLP statements.
16325         (vectorizable_live_operation): Handle PHIs.
16327 2018-01-16  Richard Biener  <rguenther@suse.de>
16329         PR tree-optimization/83867
16330         * tree-vect-stmts.c (vect_transform_stmt): Precompute
16331         nested_in_vect_loop_p since the scalar stmt may get invalidated.
16333 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16335         PR c/83844
16336         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16337         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16338         If off is not INTEGER_CST, issue a may not be aligned warning
16339         rather than isn't aligned.  Use isn%'t rather than isn't.
16340         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16341         into MULT_EXPR.
16342         <case MULT_EXPR>: Improve the case when bottom and one of the
16343         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16344         operand, in that case check if the other operand is multiple of
16345         bottom divided by the INTEGER_CST operand.
16347 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16349         PR target/83858
16350         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16351         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16352         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16353         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16354         * config/pa/pa.c (pa_function_arg_advance): Likewise.
16355         (pa_function_arg, pa_arg_partial_bytes): Likewise.
16356         (pa_function_arg_size): New function.
16358 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16360         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16361         in a separate statement.
16363 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16365         PR tree-optimization/83847
16366         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16367         group gathers and scatters.
16369 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16371         PR rtl-optimization/86620
16372         * params.def (max-sched-ready-insns): Bump minimum value to 1.
16374         PR rtl-optimization/83213
16375         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16376         to last if both are JUMP_INSNs.
16378         PR tree-optimization/83843
16379         * gimple-ssa-store-merging.c
16380         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16381         store_immediate_info for bswap/nop orig_stores.
16383 2018-01-15  Andrew Waterman  <andrew@sifive.com>
16385         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16386         !TARGET_MUL.
16387         <UDIV>: Increase cost if !TARGET_DIV.
16389 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
16391         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16392         (define_attr "cr_logical_3op"): New.
16393         (cceq_ior_compare): Adjust.
16394         (cceq_ior_compare_complement): Adjust.
16395         (*cceq_rev_compare): Adjust.
16396         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16397         (is_cracked_insn): Adjust.
16398         (insn_must_be_first_in_group): Adjust.
16399         * config/rs6000/40x.md: Adjust.
16400         * config/rs6000/440.md: Adjust.
16401         * config/rs6000/476.md: Adjust.
16402         * config/rs6000/601.md: Adjust.
16403         * config/rs6000/603.md: Adjust.
16404         * config/rs6000/6xx.md: Adjust.
16405         * config/rs6000/7450.md: Adjust.
16406         * config/rs6000/7xx.md: Adjust.
16407         * config/rs6000/8540.md: Adjust.
16408         * config/rs6000/cell.md: Adjust.
16409         * config/rs6000/e300c2c3.md: Adjust.
16410         * config/rs6000/e500mc.md: Adjust.
16411         * config/rs6000/e500mc64.md: Adjust.
16412         * config/rs6000/e5500.md: Adjust.
16413         * config/rs6000/e6500.md: Adjust.
16414         * config/rs6000/mpc.md: Adjust.
16415         * config/rs6000/power4.md: Adjust.
16416         * config/rs6000/power5.md: Adjust.
16417         * config/rs6000/power6.md: Adjust.
16418         * config/rs6000/power7.md: Adjust.
16419         * config/rs6000/power8.md: Adjust.
16420         * config/rs6000/power9.md: Adjust.
16421         * config/rs6000/rs64.md: Adjust.
16422         * config/rs6000/titan.md: Adjust.
16424 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16426         * config/i386/predicates.md (indirect_branch_operand): Rewrite
16427         ix86_indirect_branch_register logic.
16429 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16431         * config/i386/constraints.md (Bs): Update
16432         ix86_indirect_branch_register check.  Don't check
16433         ix86_indirect_branch_register with GOT_memory_operand.
16434         (Bw): Likewise.
16435         * config/i386/predicates.md (GOT_memory_operand): Don't check
16436         ix86_indirect_branch_register here.
16437         (GOT32_symbol_operand): Likewise.
16439 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16441         * config/i386/predicates.md (constant_call_address_operand):
16442         Rewrite ix86_indirect_branch_register logic.
16443         (sibcall_insn_operand): Likewise.
16445 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16447         * config/i386/constraints.md (Bs): Replace
16448         ix86_indirect_branch_thunk_register with
16449         ix86_indirect_branch_register.
16450         (Bw): Likewise.
16451         * config/i386/i386.md (indirect_jump): Likewise.
16452         (tablejump): Likewise.
16453         (*sibcall_memory): Likewise.
16454         (*sibcall_value_memory): Likewise.
16455         Peepholes of indirect call and jump via memory: Likewise.
16456         * config/i386/i386.opt: Likewise.
16457         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16458         (GOT_memory_operand): Likewise.
16459         (call_insn_operand): Likewise.
16460         (sibcall_insn_operand): Likewise.
16461         (GOT32_symbol_operand): Likewise.
16463 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
16465         PR middle-end/83837
16466         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16467         type rather than type addr's type points to.
16468         (expand_omp_atomic_mutex): Likewise.
16469         (expand_omp_atomic): Likewise.
16471 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16473         PR target/83839
16474         * config/i386/i386.c (output_indirect_thunk_function): Use
16475         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16476         for  __x86_return_thunk.
16478 2018-01-15  Richard Biener  <rguenther@suse.de>
16480         PR middle-end/83850
16481         * expmed.c (extract_bit_field_1): Fix typo.
16483 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16485         PR target/83687
16486         * config/arm/iterators.md (VF): New mode iterator.
16487         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16488         Remove integer-related logic from pattern.
16489         (neon_vabd<mode>_3): Likewise.
16491 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
16493         PR middle-end/82694
16494         * common.opt (fstrict-overflow): No longer an alias.
16495         (fwrapv-pointer): New option.
16496         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16497         also for pointer types based on flag_wrapv_pointer.
16498         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16499         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16500         opts->x_flag_wrapv got set.
16501         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16502         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16503         POINTER_TYPE_OVERFLOW_UNDEFINED.
16504         * match.pd: Likewise in address comparison pattern.
16505         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16507 2018-01-15  Richard Biener  <rguenther@suse.de>
16509         PR lto/83804
16510         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16511         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
16512         Reset type names to their identifier if their TYPE_DECL doesn't
16513         have linkage (and thus is used for ODR and devirt).
16514         (save_debug_info_for_decl): Remove.
16515         (save_debug_info_for_type): Likewise.
16516         (add_tree_to_fld_list): Adjust.
16517         * tree-pretty-print.c (dump_generic_node): Make dumping of
16518         type names more robust.
16520 2018-01-15  Richard Biener  <rguenther@suse.de>
16522         * BASE-VER: Bump to 8.0.1.
16524 2018-01-14  Martin Sebor  <msebor@redhat.com>
16526         PR other/83508
16527         * builtins.c (check_access): Avoid warning when the no-warning bit
16528         is set.
16530 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
16532         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16533         * ira-color (allocno_hard_regs_compare): Likewise.
16535 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
16537         PR target/83013
16538         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16539         Use .pushsection/.popsection.
16541 2018-01-14  Martin Sebor  <msebor@redhat.com>
16543         PR c++/81327
16544         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16546 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
16548         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16549         entry from extra_headers.
16550         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16551         extra_headers, make the list bitwise identical to the i?86-*-* one.
16553 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16555         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16556         -mcmodel=large with -mindirect-branch=thunk,
16557         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16558         -mfunction-return=thunk-extern.
16559         * doc/invoke.texi: Document -mcmodel=large is incompatible with
16560         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16561         -mfunction-return=thunk and -mfunction-return=thunk-extern.
16563 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16565         * config/i386/i386.c (print_reg): Print the name of the full
16566         integer register without '%'.
16567         (ix86_print_operand): Handle 'V'.
16568         * doc/extend.texi: Document 'V' modifier.
16570 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16572         * config/i386/constraints.md (Bs): Disallow memory operand for
16573         -mindirect-branch-register.
16574         (Bw): Likewise.
16575         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16576         (GOT_memory_operand): Likewise.
16577         (call_insn_operand): Likewise.
16578         (sibcall_insn_operand): Likewise.
16579         (GOT32_symbol_operand): Likewise.
16580         * config/i386/i386.md (indirect_jump): Call convert_memory_address
16581         for -mindirect-branch-register.
16582         (tablejump): Likewise.
16583         (*sibcall_memory): Likewise.
16584         (*sibcall_value_memory): Likewise.
16585         Disallow peepholes of indirect call and jump via memory for
16586         -mindirect-branch-register.
16587         (*call_pop): Replace m with Bw.
16588         (*call_value_pop): Likewise.
16589         (*sibcall_pop_memory): Replace m with Bs.
16590         * config/i386/i386.opt (mindirect-branch-register): New option.
16591         * doc/invoke.texi: Document -mindirect-branch-register option.
16593 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16595         * config/i386/i386-protos.h (ix86_output_function_return): New.
16596         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16597         set function_return_type.
16598         (indirect_thunk_name): Add ret_p to indicate thunk for function
16599         return.
16600         (output_indirect_thunk_function): Pass false to
16601         indirect_thunk_name.
16602         (ix86_output_indirect_branch_via_reg): Likewise.
16603         (ix86_output_indirect_branch_via_push): Likewise.
16604         (output_indirect_thunk_function): Create alias for function
16605         return thunk if regno < 0.
16606         (ix86_output_function_return): New function.
16607         (ix86_handle_fndecl_attribute): Handle function_return.
16608         (ix86_attribute_table): Add function_return.
16609         * config/i386/i386.h (machine_function): Add
16610         function_return_type.
16611         * config/i386/i386.md (simple_return_internal): Use
16612         ix86_output_function_return.
16613         (simple_return_internal_long): Likewise.
16614         * config/i386/i386.opt (mfunction-return=): New option.
16615         (indirect_branch): Mention -mfunction-return=.
16616         * doc/extend.texi: Document function_return function attribute.
16617         * doc/invoke.texi: Document -mfunction-return= option.
16619 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16621         * config/i386/i386-opts.h (indirect_branch): New.
16622         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16623         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16624         with local indirect jump when converting indirect call and jump.
16625         (ix86_set_indirect_branch_type): New.
16626         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16627         (indirectlabelno): New.
16628         (indirect_thunk_needed): Likewise.
16629         (indirect_thunk_bnd_needed): Likewise.
16630         (indirect_thunks_used): Likewise.
16631         (indirect_thunks_bnd_used): Likewise.
16632         (INDIRECT_LABEL): Likewise.
16633         (indirect_thunk_name): Likewise.
16634         (output_indirect_thunk): Likewise.
16635         (output_indirect_thunk_function): Likewise.
16636         (ix86_output_indirect_branch_via_reg): Likewise.
16637         (ix86_output_indirect_branch_via_push): Likewise.
16638         (ix86_output_indirect_branch): Likewise.
16639         (ix86_output_indirect_jmp): Likewise.
16640         (ix86_code_end): Call output_indirect_thunk_function if needed.
16641         (ix86_output_call_insn): Call ix86_output_indirect_branch if
16642         needed.
16643         (ix86_handle_fndecl_attribute): Handle indirect_branch.
16644         (ix86_attribute_table): Add indirect_branch.
16645         * config/i386/i386.h (machine_function): Add indirect_branch_type
16646         and has_local_indirect_jump.
16647         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16648         to true.
16649         (tablejump): Likewise.
16650         (*indirect_jump): Use ix86_output_indirect_jmp.
16651         (*tablejump_1): Likewise.
16652         (simple_return_indirect_internal): Likewise.
16653         * config/i386/i386.opt (mindirect-branch=): New option.
16654         (indirect_branch): New.
16655         (keep): Likewise.
16656         (thunk): Likewise.
16657         (thunk-inline): Likewise.
16658         (thunk-extern): Likewise.
16659         * doc/extend.texi: Document indirect_branch function attribute.
16660         * doc/invoke.texi: Document -mindirect-branch= option.
16662 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
16664         PR ipa/83051
16665         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16667 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
16669         * ipa-inline.c (want_inline_small_function_p): Return false if
16670         inlining has already failed with CIF_FINAL_ERROR.
16671         (update_caller_keys): Call want_inline_small_function_p before
16672         can_inline_edge_p.
16673         (update_callee_keys): Likewise.
16675 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16677         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16678         New function.
16679         (rs6000_quadword_masked_address_p): Likewise.
16680         (quad_aligned_load_p): Likewise.
16681         (quad_aligned_store_p): Likewise.
16682         (const_load_sequence_p): Add comment to describe the outer-most loop.
16683         (mimic_memory_attributes_and_flags): New function.
16684         (rs6000_gen_stvx): Likewise.
16685         (replace_swapped_aligned_store): Likewise.
16686         (rs6000_gen_lvx): Likewise.
16687         (replace_swapped_aligned_load): Likewise.
16688         (replace_swapped_load_constant): Capitalize argument name in
16689         comment describing this function.
16690         (rs6000_analyze_swaps): Add a third pass to search for vector loads
16691         and stores that access quad-word aligned addresses and replace
16692         with stvx or lvx instructions when appropriate.
16693         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16694         New function prototype.
16695         (rs6000_quadword_masked_address_p): Likewise.
16696         (rs6000_gen_lvx): Likewise.
16697         (rs6000_gen_stvx): Likewise.
16698         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16699         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16700         when memory address is aligned.
16701         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16702         this split to select lvx instruction when memory address is aligned.
16703         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16704         instruction when memory address is aligned.
16705         (*vsx_le_perm_load_v16qi): Likewise.
16706         (four unnamed splitters): Modify to select the stvx instruction
16707         when memory is aligned.
16709 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
16711         * predict.c (determine_unlikely_bbs): Handle correctly BBs
16712         which appears in the queue multiple times.
16714 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16715             Alan Hayward  <alan.hayward@arm.com>
16716             David Sherwood  <david.sherwood@arm.com>
16718         * tree-vectorizer.h (vec_lower_bound): New structure.
16719         (_loop_vec_info): Add check_nonzero and lower_bounds.
16720         (LOOP_VINFO_CHECK_NONZERO): New macro.
16721         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16722         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16723         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16724         fields.  Make seg_len the distance travelled, not including the
16725         access size.
16726         (dr_direction_indicator): Declare.
16727         (dr_zero_step_indicator): Likewise.
16728         (dr_known_forward_stride_p): Likewise.
16729         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16730         tree-ssanames.h.
16731         (runtime_alias_check_p): Allow runtime alias checks with
16732         variable strides.
16733         (operator ==): Compare access_size and align.
16734         (prune_runtime_alias_test_list): Rework for new distinction between
16735         the access_size and seg_len.
16736         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
16737         segment lengths.
16738         (get_segment_min_max): New function.
16739         (create_intersect_range_checks): Use it.
16740         (dr_step_indicator): New function.
16741         (dr_direction_indicator): Likewise.
16742         (dr_zero_step_indicator): Likewise.
16743         (dr_known_forward_stride_p): Likewise.
16744         * tree-loop-distribution.c (data_ref_segment_size): Return
16745         DR_STEP * (niters - 1).
16746         (compute_alias_check_pairs): Update call to the dr_with_seg_len
16747         constructor.
16748         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16749         (vect_preserves_scalar_order_p): New function, split out from...
16750         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
16751         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16752         (vect_vfa_access_size): New function.
16753         (vect_vfa_align): Likewise.
16754         (vect_compile_time_alias): Take access_size_a and access_b arguments.
16755         (dump_lower_bound): New function.
16756         (vect_check_lower_bound): Likewise.
16757         (vect_small_gap_p): Likewise.
16758         (vectorizable_with_step_bound_p): Likewise.
16759         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16760         depencies if the vectorization factor is 1.  Convert the checks
16761         for nonzero steps into checks on the bounds of DR_STEP.  Try using
16762         a bunds check for variable steps if the minimum required step is
16763         relatively small. Update calls to the dr_with_seg_len
16764         constructor and to vect_compile_time_alias.
16765         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16766         function.
16767         (vect_loop_versioning): Call it.
16768         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16769         when retrying.
16770         (vect_estimate_min_profitable_iters): Account for any bounds checks.
16772 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16773             Alan Hayward  <alan.hayward@arm.com>
16774             David Sherwood  <david.sherwood@arm.com>
16776         * doc/sourcebuild.texi (vect_scatter_store): Document.
16777         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16778         optabs.
16779         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16780         Document.
16781         * genopinit.c (main): Add supports_vec_scatter_store and
16782         supports_vec_scatter_store_cached to target_optabs.
16783         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16784         IFN_MASK_SCATTER_STORE.
16785         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16786         functions.
16787         * internal-fn.h (internal_store_fn_p): Declare.
16788         (internal_fn_stored_value_index): Likewise.
16789         * internal-fn.c (scatter_store_direct): New macro.
16790         (expand_scatter_store_optab_fn): New function.
16791         (direct_scatter_store_optab_supported_p): New macro.
16792         (internal_store_fn_p): New function.
16793         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16794         IFN_MASK_SCATTER_STORE.
16795         (internal_fn_mask_index): Likewise.
16796         (internal_fn_stored_value_index): New function.
16797         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16798         for scatter stores.
16799         * optabs-query.h (supports_vec_scatter_store_p): Declare.
16800         * optabs-query.c (supports_vec_scatter_store_p): New function.
16801         * tree-vectorizer.h (vect_get_store_rhs): Declare.
16802         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16803         true for scatter stores.
16804         (vect_gather_scatter_fn_p): Handle scatter stores too.
16805         (vect_check_gather_scatter): Consider using scatter stores if
16806         supports_vec_scatter_store_p.
16807         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16808         scatter stores too.
16809         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16810         internal_fn_stored_value_index.
16811         (check_load_store_masking): Handle scatter stores too.
16812         (vect_get_store_rhs): Make public.
16813         (vectorizable_call): Use internal_store_fn_p.
16814         (vectorizable_store): Handle scatter store internal functions.
16815         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16816         when deciding whether the end of the group has been reached.
16817         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16818         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16819         (mask_scatter_store<mode>): New insns.
16821 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16822             Alan Hayward  <alan.hayward@arm.com>
16823             David Sherwood  <david.sherwood@arm.com>
16825         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16826         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16827         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16828         function.
16829         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16830         Use vect_truncate_gather_scatter_offset if we can't treat the
16831         operation as a normal gather load or scatter store.
16832         (get_group_load_store_type): Take the gather_scatter_info
16833         as argument.  Try using a gather load or scatter store for
16834         single-element groups.
16835         (get_load_store_type): Update calls to get_group_load_store_type
16836         and vect_use_strided_gather_scatters_p.
16838 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16839             Alan Hayward  <alan.hayward@arm.com>
16840             David Sherwood  <david.sherwood@arm.com>
16842         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16843         optional tree argument.
16844         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16845         null target hooks.
16846         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16847         but continue to use the current value as a fallback.
16848         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16849         to compare the updates.
16850         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16851         (get_load_store_type): Use it when handling a strided access.
16852         (vect_get_strided_load_store_ops): New function.
16853         (vect_get_data_ptr_increment): Likewise.
16854         (vectorizable_load): Handle strided gather loads.  Always pass
16855         a step to vect_create_data_ref_ptr and bump_vector_ptr.
16857 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16858             Alan Hayward  <alan.hayward@arm.com>
16859             David Sherwood  <david.sherwood@arm.com>
16861         * doc/md.texi (gather_load@var{m}): Document.
16862         (mask_gather_load@var{m}): Likewise.
16863         * genopinit.c (main): Add supports_vec_gather_load and
16864         supports_vec_gather_load_cached to target_optabs.
16865         * optabs-tree.c (init_tree_optimization_optabs): Use
16866         ggc_cleared_alloc to allocate target_optabs.
16867         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16868         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16869         functions.
16870         * internal-fn.h (internal_load_fn_p): Declare.
16871         (internal_gather_scatter_fn_p): Likewise.
16872         (internal_fn_mask_index): Likewise.
16873         (internal_gather_scatter_fn_supported_p): Likewise.
16874         * internal-fn.c (gather_load_direct): New macro.
16875         (expand_gather_load_optab_fn): New function.
16876         (direct_gather_load_optab_supported_p): New macro.
16877         (direct_internal_fn_optab): New function.
16878         (internal_load_fn_p): Likewise.
16879         (internal_gather_scatter_fn_p): Likewise.
16880         (internal_fn_mask_index): Likewise.
16881         (internal_gather_scatter_fn_supported_p): Likewise.
16882         * optabs-query.c (supports_at_least_one_mode_p): New function.
16883         (supports_vec_gather_load_p): Likewise.
16884         * optabs-query.h (supports_vec_gather_load_p): Declare.
16885         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16886         and memory_type field.
16887         (NUM_PATTERNS): Bump to 15.
16888         * tree-vect-data-refs.c: Include internal-fn.h.
16889         (vect_gather_scatter_fn_p): New function.
16890         (vect_describe_gather_scatter_call): Likewise.
16891         (vect_check_gather_scatter): Try using internal functions for
16892         gather loads.  Recognize existing calls to a gather load function.
16893         (vect_analyze_data_refs): Consider using gather loads if
16894         supports_vec_gather_load_p.
16895         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16896         (vect_get_gather_scatter_offset_type): Likewise.
16897         (vect_convert_mask_for_vectype): Likewise.
16898         (vect_add_conversion_to_patterm): Likewise.
16899         (vect_try_gather_scatter_pattern): Likewise.
16900         (vect_recog_gather_scatter_pattern): New pattern recognizer.
16901         (vect_vect_recog_func_ptrs): Add it.
16902         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16903         internal_fn_mask_index and internal_gather_scatter_fn_p.
16904         (check_load_store_masking): Take the gather_scatter_info as an
16905         argument and handle gather loads.
16906         (vect_get_gather_scatter_ops): New function.
16907         (vectorizable_call): Check internal_load_fn_p.
16908         (vectorizable_load): Likewise.  Handle gather load internal
16909         functions.
16910         (vectorizable_store): Update call to check_load_store_masking.
16911         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16912         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16913         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16914         (aarch64_gather_scale_operand_d): New predicates.
16915         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16916         (mask_gather_load<mode>): New insns.
16918 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16919             Alan Hayward  <alan.hayward@arm.com>
16920             David Sherwood  <david.sherwood@arm.com>
16922         * optabs.def (fold_left_plus_optab): New optab.
16923         * doc/md.texi (fold_left_plus_@var{m}): Document.
16924         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16925         * internal-fn.c (fold_left_direct): Define.
16926         (expand_fold_left_optab_fn): Likewise.
16927         (direct_fold_left_optab_supported_p): Likewise.
16928         * fold-const-call.c (fold_const_fold_left): New function.
16929         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16930         * tree-parloops.c (valid_reduction_p): New function.
16931         (gather_scalar_reductions): Use it.
16932         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16933         (vect_finish_replace_stmt): Declare.
16934         * tree-vect-loop.c (fold_left_reduction_fn): New function.
16935         (needs_fold_left_reduction_p): New function, split out from...
16936         (vect_is_simple_reduction): ...here.  Accept reductions that
16937         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16938         (vect_force_simple_reduction): Also store the reduction type in
16939         the assignment's STMT_VINFO_REDUC_TYPE.
16940         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16941         (merge_with_identity): New function.
16942         (vect_expand_fold_left): Likewise.
16943         (vectorize_fold_left_reduction): Likewise.
16944         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
16945         scalar phi in place for it.  Check for target support and reject
16946         cases that would reassociate the operation.  Defer the transform
16947         phase to vectorize_fold_left_reduction.
16948         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16949         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16950         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16952 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16954         * tree-if-conv.c (predicate_mem_writes): Remove redundant
16955         call to ifc_temp_var.
16957 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16958             Alan Hayward  <alan.hayward@arm.com>
16959             David Sherwood  <david.sherwood@arm.com>
16961         * target.def (legitimize_address_displacement): Take the original
16962         offset as a poly_int.
16963         * targhooks.h (default_legitimize_address_displacement): Update
16964         accordingly.
16965         * targhooks.c (default_legitimize_address_displacement): Likewise.
16966         * doc/tm.texi: Regenerate.
16967         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16968         as an argument, moving assert of ad->disp == ad->disp_term to...
16969         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
16970         Try calling targetm.legitimize_address_displacement before expanding
16971         the address rather than afterwards, and adjust for the new interface.
16972         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16973         Match the new hook interface.  Handle SVE addresses.
16974         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16975         new hook interface.
16977 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16979         * Makefile.in (OBJS): Add early-remat.o.
16980         * target.def (select_early_remat_modes): New hook.
16981         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16982         * doc/tm.texi: Regenerate.
16983         * targhooks.h (default_select_early_remat_modes): Declare.
16984         * targhooks.c (default_select_early_remat_modes): New function.
16985         * timevar.def (TV_EARLY_REMAT): New timevar.
16986         * passes.def (pass_early_remat): New pass.
16987         * tree-pass.h (make_pass_early_remat): Declare.
16988         * early-remat.c: New file.
16989         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16990         function.
16991         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16993 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16994             Alan Hayward  <alan.hayward@arm.com>
16995             David Sherwood  <david.sherwood@arm.com>
16997         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16998         vfm1 with a bound_epilog parameter.
16999         (vect_do_peeling): Update calls accordingly, and move the prologue
17000         call earlier in the function.  Treat the base bound_epilog as 0 for
17001         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
17002         this base when peeling for gaps.
17003         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17004         with fully-masked loops.
17005         (vect_estimate_min_profitable_iters): Handle the single peeled
17006         iteration in that case.
17008 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17009             Alan Hayward  <alan.hayward@arm.com>
17010             David Sherwood  <david.sherwood@arm.com>
17012         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17013         single-element interleaving even if the size is not a power of 2.
17014         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17015         accesses for single-element interleaving if the group size is
17016         not a power of 2.
17018 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17019             Alan Hayward  <alan.hayward@arm.com>
17020             David Sherwood  <david.sherwood@arm.com>
17022         * doc/md.texi (fold_extract_last_@var{m}): Document.
17023         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17024         * optabs.def (fold_extract_last_optab): New optab.
17025         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17026         * internal-fn.c (fold_extract_direct): New macro.
17027         (expand_fold_extract_optab_fn): Likewise.
17028         (direct_fold_extract_optab_supported_p): Likewise.
17029         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17030         * tree-vect-loop.c (vect_model_reduction_cost): Handle
17031         EXTRACT_LAST_REDUCTION.
17032         (get_initial_def_for_reduction): Do not create an initial vector
17033         for EXTRACT_LAST_REDUCTION reductions.
17034         (vectorizable_reduction): Leave the scalar phi in place for
17035         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
17036         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
17037         epilogue code for EXTRACT_LAST_REDUCTION and defer the
17038         transform phase to vectorizable_condition.
17039         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17040         split out from...
17041         (vect_finish_stmt_generation): ...here.
17042         (vect_finish_replace_stmt): New function.
17043         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17044         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17045         pattern.
17046         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17048 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17049             Alan Hayward  <alan.hayward@arm.com>
17050             David Sherwood  <david.sherwood@arm.com>
17052         * doc/md.texi (extract_last_@var{m}): Document.
17053         * optabs.def (extract_last_optab): New optab.
17054         * internal-fn.def (EXTRACT_LAST): New internal function.
17055         * internal-fn.c (cond_unary_direct): New macro.
17056         (expand_cond_unary_optab_fn): Likewise.
17057         (direct_cond_unary_optab_supported_p): Likewise.
17058         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17059         loops using EXTRACT_LAST.
17060         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17061         (extract_last_<mode>): ...this optab.
17062         (vec_extract<mode><Vel>): Update accordingly.
17064 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17065             Alan Hayward  <alan.hayward@arm.com>
17066             David Sherwood  <david.sherwood@arm.com>
17068         * target.def (empty_mask_is_expensive): New hook.
17069         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17070         * doc/tm.texi: Regenerate.
17071         * targhooks.h (default_empty_mask_is_expensive): Declare.
17072         * targhooks.c (default_empty_mask_is_expensive): New function.
17073         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17074         if the target says that empty masks are expensive.
17075         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17076         New function.
17077         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17079 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17080             Alan Hayward  <alan.hayward@arm.com>
17081             David Sherwood  <david.sherwood@arm.com>
17083         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17084         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17085         (vect_use_loop_mask_for_alignment_p): New function.
17086         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17087         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17088         niters_skip argument.  Make sure that the first niters_skip elements
17089         of the first iteration are inactive.
17090         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17091         Update call to vect_set_loop_masks_directly.
17092         (get_misalign_in_elems): New function, split out from...
17093         (vect_gen_prolog_loop_niters): ...here.
17094         (vect_update_init_of_dr): Take a code argument that specifies whether
17095         the adjustment should be added or subtracted.
17096         (vect_update_init_of_drs): Likewise.
17097         (vect_prepare_for_masked_peels): New function.
17098         (vect_do_peeling): Skip prologue peeling if we're using a mask
17099         instead.  Update call to vect_update_inits_of_drs.
17100         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17101         mask_skip_niters.
17102         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17103         alignment.  Do not include the number of peeled iterations in
17104         the minimum threshold in that case.
17105         (vectorizable_induction): Adjust the start value down by
17106         LOOP_VINFO_MASK_SKIP_NITERS iterations.
17107         (vect_transform_loop): Call vect_prepare_for_masked_peels.
17108         Take the number of skipped iterations into account when calculating
17109         the loop bounds.
17110         * tree-vect-stmts.c (vect_gen_while_not): New function.
17112 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17113             Alan Hayward  <alan.hayward@arm.com>
17114             David Sherwood  <david.sherwood@arm.com>
17116         * doc/sourcebuild.texi (vect_fully_masked): Document.
17117         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17118         default value to 0.
17119         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17120         split out from...
17121         (vect_analyze_loop_2): ...here. Don't check the vectorization
17122         factor against the number of loop iterations if the loop is
17123         fully-masked.
17125 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17126             Alan Hayward  <alan.hayward@arm.com>
17127             David Sherwood  <david.sherwood@arm.com>
17129         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17130         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17131         (dump_groups): Update accordingly.
17132         (iv_use::mem_type): New member variable.
17133         (address_p): New function.
17134         (record_use): Add a mem_type argument and initialize the new
17135         mem_type field.
17136         (record_group_use): Add a mem_type argument.  Use address_p.
17137         Remove obsolete null checks of base_object.  Update call to record_use.
17138         (find_interesting_uses_op): Update call to record_group_use.
17139         (find_interesting_uses_cond): Likewise.
17140         (find_interesting_uses_address): Likewise.
17141         (get_mem_type_for_internal_fn): New function.
17142         (find_address_like_use): Likewise.
17143         (find_interesting_uses_stmt): Try find_address_like_use before
17144         calling find_interesting_uses_op.
17145         (addr_offset_valid_p): Use the iv mem_type field as the type
17146         of the addressed memory.
17147         (add_autoinc_candidates): Likewise.
17148         (get_address_cost): Likewise.
17149         (split_small_address_groups_p): Use address_p.
17150         (split_address_groups): Likewise.
17151         (add_iv_candidate_for_use): Likewise.
17152         (autoinc_possible_for_pair): Likewise.
17153         (rewrite_groups): Likewise.
17154         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17155         (determine_group_iv_cost): Update after split of USE_ADDRESS.
17156         (get_alias_ptr_type_for_ptr_address): New function.
17157         (rewrite_use_address): Rewrite address uses in calls that were
17158         identified by find_address_like_use.
17160 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17161             Alan Hayward  <alan.hayward@arm.com>
17162             David Sherwood  <david.sherwood@arm.com>
17164         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17165         TARGET_MEM_REFs.
17166         * gimple-expr.h (is_gimple_addressable: Likewise.
17167         * gimple-expr.c (is_gimple_address): Likewise.
17168         * internal-fn.c (expand_call_mem_ref): New function.
17169         (expand_mask_load_optab_fn): Use it.
17170         (expand_mask_store_optab_fn): Likewise.
17172 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17173             Alan Hayward  <alan.hayward@arm.com>
17174             David Sherwood  <david.sherwood@arm.com>
17176         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17177         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17178         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17179         (cond_umax@var{mode}): Document.
17180         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17181         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17182         (cond_umin_optab, cond_umax_optab): New optabs.
17183         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17184         (COND_IOR, COND_XOR): New internal functions.
17185         * internal-fn.h (get_conditional_internal_fn): Declare.
17186         * internal-fn.c (cond_binary_direct): New macro.
17187         (expand_cond_binary_optab_fn): Likewise.
17188         (direct_cond_binary_optab_supported_p): Likewise.
17189         (get_conditional_internal_fn): New function.
17190         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17191         Cope with reduction statements that are vectorized as calls rather
17192         than assignments.
17193         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17194         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17195         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17196         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17197         (UNSPEC_COND_EOR): New unspecs.
17198         (optab): Add mappings for them.
17199         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17200         (sve_int_op, sve_fp_op): New int attributes.
17202 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17203             Alan Hayward  <alan.hayward@arm.com>
17204             David Sherwood  <david.sherwood@arm.com>
17206         * optabs.def (while_ult_optab): New optab.
17207         * doc/md.texi (while_ult@var{m}@var{n}): Document.
17208         * internal-fn.def (WHILE_ULT): New internal function.
17209         * internal-fn.h (direct_internal_fn_supported_p): New override
17210         that takes two types as argument.
17211         * internal-fn.c (while_direct): New macro.
17212         (expand_while_optab_fn): New function.
17213         (convert_optab_supported_p): Likewise.
17214         (direct_while_optab_supported_p): New macro.
17215         * wide-int.h (wi::udiv_ceil): New function.
17216         * tree-vectorizer.h (rgroup_masks): New structure.
17217         (vec_loop_masks): New typedef.
17218         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
17219         and fully_masked_p.
17220         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
17221         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
17222         (vect_max_vf): New function.
17223         (slpeel_make_loop_iterate_ntimes): Delete.
17224         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
17225         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
17226         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
17227         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
17228         internal-fn.h, stor-layout.h and optabs-query.h.
17229         (vect_set_loop_mask): New function.
17230         (add_preheader_seq): Likewise.
17231         (add_header_seq): Likewise.
17232         (interleave_supported_p): Likewise.
17233         (vect_maybe_permute_loop_masks): Likewise.
17234         (vect_set_loop_masks_directly): Likewise.
17235         (vect_set_loop_condition_masked): Likewise.
17236         (vect_set_loop_condition_unmasked): New function, split out from
17237         slpeel_make_loop_iterate_ntimes.
17238         (slpeel_make_loop_iterate_ntimes): Rename to..
17239         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
17240         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
17241         (vect_do_peeling): Update call accordingly.
17242         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
17243         loops.
17244         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17245         mask_compare_type, can_fully_mask_p and fully_masked_p.
17246         (release_vec_loop_masks): New function.
17247         (_loop_vec_info): Use it to free the loop masks.
17248         (can_produce_all_loop_masks_p): New function.
17249         (vect_get_max_nscalars_per_iter): Likewise.
17250         (vect_verify_full_masking): Likewise.
17251         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
17252         retries, and free the mask rgroups before retrying.  Check loop-wide
17253         reasons for disallowing fully-masked loops.  Make the final decision
17254         about whether use a fully-masked loop or not.
17255         (vect_estimate_min_profitable_iters): Do not assume that peeling
17256         for the number of iterations will be needed for fully-masked loops.
17257         (vectorizable_reduction): Disable fully-masked loops.
17258         (vectorizable_live_operation): Likewise.
17259         (vect_halve_mask_nunits): New function.
17260         (vect_double_mask_nunits): Likewise.
17261         (vect_record_loop_mask): Likewise.
17262         (vect_get_loop_mask): Likewise.
17263         (vect_transform_loop): Handle the case in which the final loop
17264         iteration might handle a partial vector.  Call vect_set_loop_condition
17265         instead of slpeel_make_loop_iterate_ntimes.
17266         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
17267         (check_load_store_masking): New function.
17268         (prepare_load_store_mask): Likewise.
17269         (vectorizable_store): Handle fully-masked loops.
17270         (vectorizable_load): Likewise.
17271         (supportable_widening_operation): Use vect_halve_mask_nunits for
17272         booleans.
17273         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
17274         (vect_gen_while): New function.
17275         * config/aarch64/aarch64.md (umax<mode>3): New expander.
17276         (aarch64_uqdec<mode>): New insn.
17278 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17279             Alan Hayward  <alan.hayward@arm.com>
17280             David Sherwood  <david.sherwood@arm.com>
17282         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
17283         (reduc_xor_scal_optab): New optabs.
17284         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
17285         (reduc_xor_scal_@var{m}): Document.
17286         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
17287         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17288         internal functions.
17289         * fold-const-call.c (fold_const_call): Handle them.
17290         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17291         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17292         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17293         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17294         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17295         (UNSPEC_XORV): New unspecs.
17296         (optab): Add entries for them.
17297         (BITWISEV): New int iterator.
17298         (bit_reduc_op): New int attributes.
17300 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17301             Alan Hayward  <alan.hayward@arm.com>
17302             David Sherwood  <david.sherwood@arm.com>
17304         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17305         * internal-fn.def (VEC_SHL_INSERT): New internal function.
17306         * optabs.def (vec_shl_insert_optab): New optab.
17307         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17308         (duplicate_and_interleave): Likewise.
17309         * tree-vect-loop.c: Include internal-fn.h.
17310         (neutral_op_for_slp_reduction): New function, split out from
17311         get_initial_defs_for_reduction.
17312         (get_initial_def_for_reduction): Handle option 2 for variable-length
17313         vectors by loading the neutral value into a vector and then shifting
17314         the initial value into element 0.
17315         (get_initial_defs_for_reduction): Replace the code argument with
17316         the neutral value calculated by neutral_op_for_slp_reduction.
17317         Use gimple_build_vector for constant-length vectors.
17318         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17319         but the first group_size elements have a neutral value.
17320         Use duplicate_and_interleave otherwise.
17321         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17322         Update call to get_initial_defs_for_reduction.  Handle SLP
17323         reductions for variable-length vectors by creating one vector
17324         result for each scalar result, with the elements associated
17325         with other scalar results stubbed out with the neutral value.
17326         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17327         Require IFN_VEC_SHL_INSERT for double reductions on
17328         variable-length vectors, or SLP reductions that have
17329         a neutral value.  Require can_duplicate_and_interleave_p
17330         support for variable-length unchained SLP reductions if there
17331         is no neutral value, such as for MIN/MAX reductions.  Also require
17332         the number of vector elements to be a multiple of the number of
17333         SLP statements when doing variable-length unchained SLP reductions.
17334         Update call to vect_create_epilog_for_reduction.
17335         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17336         and remove initial values.
17337         (duplicate_and_interleave): Make public.
17338         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17339         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17341 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17342             Alan Hayward  <alan.hayward@arm.com>
17343             David Sherwood  <david.sherwood@arm.com>
17345         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17346         (can_duplicate_and_interleave_p): New function.
17347         (vect_get_and_check_slp_defs): Take the vector of statements
17348         rather than just the current one.  Remove excess parentheses.
17349         Restriction rejectinon of vect_constant_def and vect_external_def
17350         for variable-length vectors to boolean types, or types for which
17351         can_duplicate_and_interleave_p is false.
17352         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17353         (duplicate_and_interleave): New function.
17354         (vect_get_constant_vectors): Use gimple_build_vector for
17355         constant-length vectors and suitable variable-length constant
17356         vectors.  Use duplicate_and_interleave for other variable-length
17357         vectors.  Don't defer the update when inserting new statements.
17359 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17360             Alan Hayward  <alan.hayward@arm.com>
17361             David Sherwood  <david.sherwood@arm.com>
17363         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17364         min_profitable_iters doesn't go negative.
17366 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17367             Alan Hayward  <alan.hayward@arm.com>
17368             David Sherwood  <david.sherwood@arm.com>
17370         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17371         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17372         * optabs.def (vec_mask_load_lanes_optab): New optab.
17373         (vec_mask_store_lanes_optab): Likewise.
17374         * internal-fn.def (MASK_LOAD_LANES): New internal function.
17375         (MASK_STORE_LANES): Likewise.
17376         * internal-fn.c (mask_load_lanes_direct): New macro.
17377         (mask_store_lanes_direct): Likewise.
17378         (expand_mask_load_optab_fn): Handle masked operations.
17379         (expand_mask_load_lanes_optab_fn): New macro.
17380         (expand_mask_store_optab_fn): Handle masked operations.
17381         (expand_mask_store_lanes_optab_fn): New macro.
17382         (direct_mask_load_lanes_optab_supported_p): Likewise.
17383         (direct_mask_store_lanes_optab_supported_p): Likewise.
17384         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17385         parameter.
17386         (vect_load_lanes_supported): Likewise.
17387         * tree-vect-data-refs.c (strip_conversion): New function.
17388         (can_group_stmts_p): Likewise.
17389         (vect_analyze_data_ref_accesses): Use it instead of checking
17390         for a pair of assignments.
17391         (vect_store_lanes_supported): Take a masked_p parameter.
17392         (vect_load_lanes_supported): Likewise.
17393         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17394         vect_store_lanes_supported and vect_load_lanes_supported.
17395         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17396         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17397         parameter.  Don't allow gaps for masked accesses.
17398         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
17399         and vect_load_lanes_supported.
17400         (get_load_store_type): Take a masked_p parameter and update
17401         call to get_group_load_store_type.
17402         (vectorizable_store): Update call to get_load_store_type.
17403         Handle IFN_MASK_STORE_LANES.
17404         (vectorizable_load): Update call to get_load_store_type.
17405         Handle IFN_MASK_LOAD_LANES.
17407 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17408             Alan Hayward  <alan.hayward@arm.com>
17409             David Sherwood  <david.sherwood@arm.com>
17411         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17412         modes for SVE.
17413         * config/aarch64/aarch64-protos.h
17414         (aarch64_sve_struct_memory_operand_p): Declare.
17415         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17416         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17417         (VPRED, vpred): Handle SVE structure modes.
17418         * config/aarch64/constraints.md (Utx): New constraint.
17419         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17420         (aarch64_sve_struct_nonimmediate_operand): New predicates.
17421         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17422         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17423         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17424         structure modes.  Split into pieces after RA.
17425         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17426         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17427         New patterns.
17428         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17429         SVE structure modes.
17430         (aarch64_classify_address): Likewise.
17431         (sizetochar): Move earlier in file.
17432         (aarch64_print_operand): Handle SVE register lists.
17433         (aarch64_array_mode): New function.
17434         (aarch64_sve_struct_memory_operand_p): Likewise.
17435         (TARGET_ARRAY_MODE): Redefine.
17437 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17438             Alan Hayward  <alan.hayward@arm.com>
17439             David Sherwood  <david.sherwood@arm.com>
17441         * target.def (array_mode): New target hook.
17442         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17443         * doc/tm.texi: Regenerate.
17444         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17445         * hooks.c (hook_optmode_mode_uhwi_none): New function.
17446         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17447         targetm.array_mode.
17448         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
17449         type sizes.
17451 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17452             Alan Hayward  <alan.hayward@arm.com>
17453             David Sherwood  <david.sherwood@arm.com>
17455         * fold-const.c (fold_binary_loc): Check the argument types
17456         rather than the result type when testing for a vector operation.
17458 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17460         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17461         * doc/tm.texi: Regenerate.
17463 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17464             Alan Hayward  <alan.hayward@arm.com>
17465             David Sherwood  <david.sherwood@arm.com>
17467         * doc/invoke.texi (-msve-vector-bits=): Document new option.
17468         (sve): Document new AArch64 extension.
17469         * doc/md.texi (w): Extend the description of the AArch64
17470         constraint to include SVE vectors.
17471         (Upl, Upa): Document new AArch64 predicate constraints.
17472         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17473         enum.
17474         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17475         (msve-vector-bits=): New option.
17476         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17477         SVE when these are disabled.
17478         (sve): New extension.
17479         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17480         modes.  Adjust their number of units based on aarch64_sve_vg.
17481         (MAX_BITSIZE_MODE_ANY_MODE): Define.
17482         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17483         aarch64_addr_query_type.
17484         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17485         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17486         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17487         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17488         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17489         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17490         (aarch64_simd_imm_zero_p): Delete.
17491         (aarch64_check_zero_based_sve_index_immediate): Declare.
17492         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17493         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17494         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17495         (aarch64_sve_float_mul_immediate_p): Likewise.
17496         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17497         rather than an rtx.
17498         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17499         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17500         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17501         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17502         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17503         (aarch64_regmode_natural_size): Likewise.
17504         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17505         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17506         left one place.
17507         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17508         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17509         for VG and the SVE predicate registers.
17510         (V_ALIASES): Add a "z"-prefixed alias.
17511         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17512         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17513         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17514         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17515         (REG_CLASS_NAMES): Add entries for them.
17516         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
17517         and the predicate registers.
17518         (aarch64_sve_vg): Declare.
17519         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17520         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17521         (REGMODE_NATURAL_SIZE): Define.
17522         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17523         SVE macros.
17524         * config/aarch64/aarch64.c: Include cfgrtl.h.
17525         (simd_immediate_info): Add a constructor for series vectors,
17526         and an associated step field.
17527         (aarch64_sve_vg): New variable.
17528         (aarch64_dbx_register_number): Handle VG and the predicate registers.
17529         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17530         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17531         (VEC_ANY_DATA, VEC_STRUCT): New constants.
17532         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17533         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17534         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17535         (aarch64_get_mask_mode): New functions.
17536         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17537         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17538         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
17539         predicate modes and predicate registers.  Explicitly restrict
17540         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
17541         to store a vector mode if it is recognized by
17542         aarch64_classify_vector_mode.
17543         (aarch64_regmode_natural_size): New function.
17544         (aarch64_hard_regno_caller_save_mode): Return the original mode
17545         for predicates.
17546         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17547         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17548         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17549         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17550         functions.
17551         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
17552         does not overlap dest if the function is frame-related.  Handle
17553         SVE constants.
17554         (aarch64_split_add_offset): New function.
17555         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17556         them aarch64_add_offset.
17557         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17558         and update call to aarch64_sub_sp.
17559         (aarch64_add_cfa_expression): New function.
17560         (aarch64_expand_prologue): Pass extra temporary registers to the
17561         functions above.  Handle the case in which we need to emit new
17562         DW_CFA_expressions for registers that were originally saved
17563         relative to the stack pointer, but now have to be expressed
17564         relative to the frame pointer.
17565         (aarch64_output_mi_thunk): Pass extra temporary registers to the
17566         functions above.
17567         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
17568         IP0 and IP1 values for SVE frames.
17569         (aarch64_expand_vec_series): New function.
17570         (aarch64_expand_sve_widened_duplicate): Likewise.
17571         (aarch64_expand_sve_const_vector): Likewise.
17572         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17573         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
17574         into the register, rather than emitting a SET directly.
17575         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17576         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17577         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17578         (offset_9bit_signed_scaled_p): New functions.
17579         (aarch64_replicate_bitmask_imm): New function.
17580         (aarch64_bitmask_imm): Use it.
17581         (aarch64_cannot_force_const_mem): Reject expressions involving
17582         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
17583         (aarch64_classify_index): Handle SVE indices, by requiring
17584         a plain register index with a scale that matches the element size.
17585         (aarch64_classify_address): Handle SVE addresses.  Assert that
17586         the mode of the address is VOIDmode or an integer mode.
17587         Update call to aarch64_classify_symbol.
17588         (aarch64_classify_symbolic_expression): Update call to
17589         aarch64_classify_symbol.
17590         (aarch64_const_vec_all_in_range_p): New function.
17591         (aarch64_print_vector_float_operand): Likewise.
17592         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
17593         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
17594         and the FP immediates 1.0 and 0.5.
17595         (aarch64_print_address_internal): Handle SVE addresses.
17596         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17597         (aarch64_regno_regclass): Handle predicate registers.
17598         (aarch64_secondary_reload): Handle big-endian reloads of SVE
17599         data modes.
17600         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17601         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17602         (aarch64_convert_sve_vector_bits): New function.
17603         (aarch64_override_options): Use it to handle -msve-vector-bits=.
17604         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17605         rather than an rtx.
17606         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17607         Handle SVE vector and predicate modes.  Accept VL-based constants
17608         that need only one temporary register, and VL offsets that require
17609         no temporary registers.
17610         (aarch64_conditional_register_usage): Mark the predicate registers
17611         as fixed if SVE isn't available.
17612         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17613         Return true for SVE vector and predicate modes.
17614         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17615         rather than an unsigned int.  Handle SVE modes.
17616         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
17617         SVE modes.
17618         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17619         if SVE is enabled.
17620         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17621         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17622         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17623         (aarch64_sve_float_mul_immediate_p): New functions.
17624         (aarch64_sve_valid_immediate): New function.
17625         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17626         Explicitly reject structure modes.  Check for INDEX constants.
17627         Handle PTRUE and PFALSE constants.
17628         (aarch64_check_zero_based_sve_index_immediate): New function.
17629         (aarch64_simd_imm_zero_p): Delete.
17630         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17631         vector modes.  Accept constants in the range of CNT[BHWD].
17632         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17633         ask for an Advanced SIMD mode.
17634         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17635         (aarch64_simd_vector_alignment): Handle SVE predicates.
17636         (aarch64_vectorize_preferred_vector_alignment): New function.
17637         (aarch64_simd_vector_alignment_reachable): Use it instead of
17638         the vector size.
17639         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17640         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17641         functions.
17642         (MAX_VECT_LEN): Delete.
17643         (expand_vec_perm_d): Add a vec_flags field.
17644         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17645         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17646         (aarch64_evpc_ext): Don't apply a big-endian lane correction
17647         for SVE modes.
17648         (aarch64_evpc_rev): Rename to...
17649         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
17650         (aarch64_evpc_rev_global): New function.
17651         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17652         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17653         MAX_VECT_LEN.
17654         (aarch64_evpc_sve_tbl): New function.
17655         (aarch64_expand_vec_perm_const_1): Update after rename of
17656         aarch64_evpc_rev.  Handle SVE permutes too, trying
17657         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17658         than aarch64_evpc_tbl.
17659         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17660         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17661         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17662         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17663         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17664         (aarch64_expand_sve_vcond): New functions.
17665         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17666         of aarch64_vector_mode_p.
17667         (aarch64_dwarf_poly_indeterminate_value): New function.
17668         (aarch64_compute_pressure_classes): Likewise.
17669         (aarch64_can_change_mode_class): Likewise.
17670         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17671         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17672         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17673         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17674         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17675         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17676         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17677         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17678         constraints.
17679         (Dn, Dl, Dr): Accept const as well as const_vector.
17680         (Dz): Likewise.  Compare against CONST0_RTX.
17681         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17682         of "vector" where appropriate.
17683         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17684         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17685         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17686         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17687         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17688         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17689         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17690         (v_int_equiv): Extend to SVE modes.
17691         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17692         mode attributes.
17693         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17694         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17695         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17696         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17697         (SVE_COND_FP_CMP): New int iterators.
17698         (perm_hilo): Handle the new unpack unspecs.
17699         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17700         attributes.
17701         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17702         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17703         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17704         (aarch64_equality_operator, aarch64_constant_vector_operand)
17705         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17706         (aarch64_sve_nonimmediate_operand): Likewise.
17707         (aarch64_sve_general_operand): Likewise.
17708         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17709         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17710         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17711         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17712         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17713         (aarch64_sve_float_arith_immediate): Likewise.
17714         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17715         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17716         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17717         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17718         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17719         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17720         (aarch64_sve_float_arith_operand): Likewise.
17721         (aarch64_sve_float_arith_with_sub_operand): Likewise.
17722         (aarch64_sve_float_mul_operand): Likewise.
17723         (aarch64_sve_vec_perm_operand): Likewise.
17724         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17725         (aarch64_mov_operand): Accept const_poly_int and const_vector.
17726         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17727         as well as const_vector.
17728         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17729         in file.  Use CONST0_RTX and CONSTM1_RTX.
17730         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
17731         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17732         Use aarch64_simd_imm_zero.
17733         * config/aarch64/aarch64-sve.md: New file.
17734         * config/aarch64/aarch64.md: Include it.
17735         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17736         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17737         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17738         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17739         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17740         (sve): New attribute.
17741         (enabled): Disable instructions with the sve attribute unless
17742         TARGET_SVE.
17743         (movqi, movhi): Pass CONST_POLY_INT operaneds through
17744         aarch64_expand_mov_immediate.
17745         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17746         CNT[BHSD] immediates.
17747         (movti): Split CONST_POLY_INT moves into two halves.
17748         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17749         Split additions that need a temporary here if the destination
17750         is the stack pointer.
17751         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17752         (*add<mode>3_poly_1): New instruction.
17753         (set_clobber_cc): New expander.
17755 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17757         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17758         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
17759         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17760         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17761         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
17762         Change innermode from fixed_mode_size to machine_mode.
17763         (simplify_subreg): Update call accordingly.  Handle a constant-sized
17764         subreg of a variable-length CONST_VECTOR.
17766 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17767             Alan Hayward  <alan.hayward@arm.com>
17768             David Sherwood  <david.sherwood@arm.com>
17770         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17771         (add_offset_to_base): New function, split out from...
17772         (create_mem_ref): ...here.  When handling a scale other than 1,
17773         check first whether the address is valid without the offset.
17774         Add it into the base if so, leaving the index and scale as-is.
17776 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
17778         PR c++/83778
17779         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17780         fold_for_warn before checking if arg2 is INTEGER_CST.
17782 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
17784         * config/rs6000/predicates.md (load_multiple_operation): Delete.
17785         (store_multiple_operation): Delete.
17786         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17787         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17788         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17789         guarded by TARGET_STRING.
17790         (rs6000_output_load_multiple): Delete.
17791         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17792         OPTION_MASK_STRING / TARGET_STRING handling.
17793         (print_operand) <'N', 'O'>: Add comment that these are unused now.
17794         (const rs6000_opt_masks) <"string">: Change mask to 0.
17795         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17796         (MASK_STRING): Delete.
17797         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17798         parts.  Simplify.
17799         (load_multiple): Delete.
17800         (*ldmsi8): Delete.
17801         (*ldmsi7): Delete.
17802         (*ldmsi6): Delete.
17803         (*ldmsi5): Delete.
17804         (*ldmsi4): Delete.
17805         (*ldmsi3): Delete.
17806         (store_multiple): Delete.
17807         (*stmsi8): Delete.
17808         (*stmsi7): Delete.
17809         (*stmsi6): Delete.
17810         (*stmsi5): Delete.
17811         (*stmsi4): Delete.
17812         (*stmsi3): Delete.
17813         (movmemsi_8reg): Delete.
17814         (corresponding unnamed define_insn): Delete.
17815         (movmemsi_6reg): Delete.
17816         (corresponding unnamed define_insn): Delete.
17817         (movmemsi_4reg): Delete.
17818         (corresponding unnamed define_insn): Delete.
17819         (movmemsi_2reg): Delete.
17820         (corresponding unnamed define_insn): Delete.
17821         (movmemsi_1reg): Delete.
17822         (corresponding unnamed define_insn): Delete.
17823         * config/rs6000/rs6000.opt (mno-string): New.
17824         (mstring): Replace by deprecation warning stub.
17825         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17827 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
17829         * regrename.c (regrename_do_replace): If replacing the same
17830         reg multiple times, try to reuse last created gen_raw_REG.
17832         PR debug/81155
17833         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17834         main to workaround a bug in GDB.
17836 2018-01-12  Tom de Vries  <tom@codesourcery.com>
17838         PR target/83737
17839         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17841 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
17843         PR rtl-optimization/80481
17844         * ira-color.c (get_cap_member): New function.
17845         (allocnos_conflict_by_live_ranges_p): Use it.
17846         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17847         (setup_slot_coalesced_allocno_live_ranges): Ditto.
17849 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
17851         PR target/83628
17852         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17853         (*saddl_se_1): Ditto.
17854         (*ssubsi_1): Ditto.
17855         (*ssubl_se_1): Ditto.
17857 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17859         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17860         rather than wi::to_widest for DR_INITs.
17861         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17862         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17863         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17864         INTEGER_CSTs.
17865         (vect_analyze_group_access_1): Note that here.
17867 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17869         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17870         polynomial type sizes.
17872 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17874         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17875         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17876         (gimple_add_tmp_var): Likewise.
17878 2018-01-12  Martin Liska  <mliska@suse.cz>
17880         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17881         (gimple_alloc_sizes): Likewise.
17882         (dump_gimple_statistics): Use PRIu64 in printf format.
17883         * gimple.h: Change uint64_t to int.
17885 2018-01-12  Martin Liska  <mliska@suse.cz>
17887         * tree-core.h: Use uint64_t instead of int.
17888         * tree.c (tree_node_counts): Likewise.
17889         (tree_node_sizes): Likewise.
17890         (dump_tree_statistics): Use PRIu64 in printf format.
17892 2018-01-12  Martin Liska  <mliska@suse.cz>
17894         * Makefile.in: As qsort_chk is implemented in vec.c, add
17895         vec.o to linkage of gencfn-macros.
17896         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17897         passing the info to record_node_allocation_statistics.
17898         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17899         and pass the info.
17900         * ggc-common.c (struct ggc_usage): Add operator== and use
17901         it in operator< and compare function.
17902         * mem-stats.h (struct mem_usage): Likewise.
17903         * vec.c (struct vec_usage): Remove operator< and compare
17904         function. Can be simply inherited.
17906 2018-01-12  Martin Jambor  <mjambor@suse.cz>
17908         PR target/81616
17909         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17910         * tree-ssa-math-opts.c: Include domwalk.h.
17911         (convert_mult_to_fma_1): New function.
17912         (fma_transformation_info): New type.
17913         (fma_deferring_state): Likewise.
17914         (cancel_fma_deferring): New function.
17915         (result_of_phi): Likewise.
17916         (last_fma_candidate_feeds_initial_phi): Likewise.
17917         (convert_mult_to_fma): Added deferring logic, split actual
17918         transformation to convert_mult_to_fma_1.
17919         (math_opts_dom_walker): New type.
17920         (math_opts_dom_walker::after_dom_children): New method, body moved
17921         here from pass_optimize_widening_mul::execute, added deferring logic
17922         bits.
17923         (pass_optimize_widening_mul::execute): Moved most of code to
17924         math_opts_dom_walker::after_dom_children.
17925         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17926         * config/i386/i386.c (ix86_option_override_internal): Added
17927         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17929 2018-01-12  Richard Biener  <rguenther@suse.de>
17931         PR debug/83157
17932         * dwarf2out.c (gen_variable_die): Do not reset old_die for
17933         inline instance vars.
17935 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
17937         PR target/81819
17938         * config/rx/rx.c (rx_is_restricted_memory_address):
17939         Handle SUBREG case.
17941 2018-01-12  Richard Biener  <rguenther@suse.de>
17943         PR tree-optimization/80846
17944         * target.def (split_reduction): New target hook.
17945         * targhooks.c (default_split_reduction): New function.
17946         * targhooks.h (default_split_reduction): Declare.
17947         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17948         target requests first reduce vectors by combining low and high
17949         parts.
17950         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17951         (get_vectype_for_scalar_type_and_size): Export.
17952         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17953         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17954         * doc/tm.texi: Regenerate.
17955         * config/i386/i386.c (ix86_split_reduction): Implement
17956         TARGET_VECTORIZE_SPLIT_REDUCTION.
17958 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17960         PR target/83368
17961         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17962         in PIC mode except for TARGET_VXWORKS_RTP.
17963         * config/sparc/sparc.c: Include cfgrtl.h.
17964         (TARGET_INIT_PIC_REG): Define.
17965         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17966         (sparc_pic_register_p): New predicate.
17967         (sparc_legitimate_address_p): Use it.
17968         (sparc_legitimize_pic_address): Likewise.
17969         (sparc_delegitimize_address): Likewise.
17970         (sparc_mode_dependent_address_p): Likewise.
17971         (gen_load_pcrel_sym): Remove 4th parameter.
17972         (load_got_register): Adjust call to above.  Remove obsolete stuff.
17973         (sparc_expand_prologue): Do not call load_got_register here.
17974         (sparc_flat_expand_prologue): Likewise.
17975         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17976         (sparc_use_pseudo_pic_reg): New function.
17977         (sparc_init_pic_reg): Likewise.
17978         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17979         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17981 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
17983         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17984         Add item for branch_cost.
17986 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17988         PR rtl-optimization/83565
17989         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17990         not extend the result to a larger mode for rotate operations.
17991         (num_sign_bit_copies1): Likewise.
17993 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17995         PR target/40411
17996         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17997         -symbolic.
17998         Use values-Xc.o for -pedantic.
17999         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18001 2018-01-12  Martin Liska  <mliska@suse.cz>
18003         PR ipa/83054
18004         * ipa-devirt.c (final_warning_record::grow_type_warnings):
18005         New function.
18006         (possible_polymorphic_call_targets): Use it.
18007         (ipa_devirt): Likewise.
18009 2018-01-12  Martin Liska  <mliska@suse.cz>
18011         * profile-count.h (enum profile_quality): Use 0 as invalid
18012         enum value of profile_quality.
18014 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
18016         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18017         -mext-string options.
18019 2018-01-12  Richard Biener  <rguenther@suse.de>
18021         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18022         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18023         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18024         Likewise.
18025         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18027 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
18029         * configure.ac (--with-long-double-format): Add support for the
18030         configuration option to change the default long double format on
18031         PowerPC systems.
18032         * config.gcc (powerpc*-linux*-*): Likewise.
18033         * configure: Regenerate.
18034         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18035         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18036         used without modification.
18038 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18040         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18041         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18042         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18043         MISC_BUILTIN_SPEC_BARRIER.
18044         (rs6000_init_builtins): Likewise.
18045         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18046         enum value.
18047         (speculation_barrier): New define_insn.
18048         * doc/extend.texi: Document __builtin_speculation_barrier.
18050 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
18052         PR target/83203
18053         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18054         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18055         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18056         iterators.
18057         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
18058         integral modes instead of "ss" and "sd".
18059         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18060         vectors with 32-bit and 64-bit elements.
18061         (vecdupssescalarmodesuffix): New mode attribute.
18062         (vec_dup<mode>): Use it.
18064 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
18066         PR target/83330
18067         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18068         frame if argument is passed on stack.
18070 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
18072         PR target/82682
18073         * ree.c (combine_reaching_defs): Optimize also
18074         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18075         reg2=any_extend(exp); reg1=reg2;, formatting fix.
18077 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
18079         PR middle-end/83189
18080         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18082 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
18084         PR middle-end/83718
18085         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18086         after they are computed.
18088 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
18090         PR tree-optimization/83695
18091         * gimple-loop-linterchange.cc
18092         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18093         reset cached scev information after interchange.
18094         (pass_linterchange::execute): Remove call to scev_reset_htab.
18096 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18098         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18099         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18100         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18101         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18102         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18103         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18104         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18105         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18106         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18107         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18108         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18109         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18110         (V_lane_reg): Likewise.
18111         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18112         New define_expand.
18113         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18114         (vfmal_lane_low<mode>_intrinsic,
18115         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18116         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18117         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18118         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18119         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18120         vfmsl_lane_high<mode>_intrinsic): New define_insns.
18122 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18124         * config/arm/arm-cpus.in (fp16fml): New feature.
18125         (ALL_SIMD): Add fp16fml.
18126         (armv8.2-a): Add fp16fml as an option.
18127         (armv8.3-a): Likewise.
18128         (armv8.4-a): Add fp16fml as part of fp16.
18129         * config/arm/arm.h (TARGET_FP16FML): Define.
18130         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18131         when appropriate.
18132         * config/arm/arm-modes.def (V2HF): Define.
18133         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18134         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18135         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18136         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18137         vfmsl_low, vfmsl_high): New set of builtins.
18138         * config/arm/iterators.md (PLUSMINUS): New code iterator.
18139         (vfml_op): New code attribute.
18140         (VFMLHALVES): New int iterator.
18141         (VFML, VFMLSEL): New mode attributes.
18142         (V_reg): Define mapping for V2HF.
18143         (V_hi, V_lo): New mode attributes.
18144         (VF_constraint): Likewise.
18145         (vfml_half, vfml_half_selector): New int attributes.
18146         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18147         define_expand.
18148         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18149         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18150         New define_insn.
18151         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18152         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18153         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18154         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
18155         documentation.
18156         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18157         Document new effective target and option set.
18159 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18161         * config/arm/arm-cpus.in (armv8_4): New feature.
18162         (ARMv8_4a): New fgroup.
18163         (armv8.4-a): New arch.
18164         * config/arm/arm-tables.opt: Regenerate.
18165         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18166         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18167         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18168         Add matching rules for -march=armv8.4-a and extensions.
18169         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18171 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
18173         PR target/81821
18174         * config/rx/rx.md (BW): New mode attribute.
18175         (sync_lock_test_and_setsi): Add mode suffix to insn output.
18177 2018-01-11  Richard Biener  <rguenther@suse.de>
18179         PR tree-optimization/83435
18180         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18181         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18182         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
18184 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18185             Alan Hayward  <alan.hayward@arm.com>
18186             David Sherwood  <david.sherwood@arm.com>
18188         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
18189         field.
18190         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
18191         (aarch64_print_address_internal): Use it to check for a zero offset.
18193 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18194             Alan Hayward  <alan.hayward@arm.com>
18195             David Sherwood  <david.sherwood@arm.com>
18197         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18198         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18199         Return a poly_int64 rather than a HOST_WIDE_INT.
18200         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18201         rather than a HOST_WIDE_INT.
18202         * config/aarch64/aarch64.h (aarch64_frame): Protect with
18203         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
18204         hard_fp_offset, frame_size, initial_adjust, callee_offset and
18205         final_offset from HOST_WIDE_INT to poly_int64.
18206         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
18207         to_constant when getting the number of units in an Advanced SIMD
18208         mode.
18209         (aarch64_builtin_vectorized_function): Check for a constant number
18210         of units.
18211         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
18212         GET_MODE_SIZE.
18213         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
18214         attribute instead of GET_MODE_NUNITS.
18215         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
18216         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
18217         GET_MODE_SIZE for fixed-size registers.
18218         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
18219         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
18220         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
18221         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
18222         (aarch64_print_operand, aarch64_print_address_internal)
18223         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
18224         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
18225         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
18226         Handle polynomial GET_MODE_SIZE.
18227         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
18228         wider than SImode without modification.
18229         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
18230         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
18231         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
18232         passing and returning SVE modes.
18233         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
18234         rather than GEN_INT.
18235         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
18236         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
18237         (aarch64_allocate_and_probe_stack_space): Likewise.
18238         (aarch64_layout_frame): Cope with polynomial offsets.
18239         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
18240         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
18241         polynomial offsets.
18242         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
18243         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
18244         poly_int64 rather than a HOST_WIDE_INT.
18245         (aarch64_get_separate_components, aarch64_process_components)
18246         (aarch64_expand_prologue, aarch64_expand_epilogue)
18247         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
18248         (aarch64_anchor_offset): New function, split out from...
18249         (aarch64_legitimize_address): ...here.
18250         (aarch64_builtin_vectorization_cost): Handle polynomial
18251         TYPE_VECTOR_SUBPARTS.
18252         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
18253         GET_MODE_NUNITS.
18254         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
18255         number of elements from the PARALLEL rather than the mode.
18256         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
18257         rather than GET_MODE_BITSIZE.
18258         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
18259         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
18260         (aarch64_expand_vec_perm_const_1): Handle polynomial
18261         d->perm.length () and d->perm elements.
18262         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
18263         Apply to_constant to d->perm elements.
18264         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
18265         polynomial CONST_VECTOR_NUNITS.
18266         (aarch64_move_pointer): Take amount as a poly_int64 rather
18267         than an int.
18268         (aarch64_progress_pointer): Avoid temporary variable.
18269         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
18270         the mode attribute instead of GET_MODE.
18272 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18273             Alan Hayward  <alan.hayward@arm.com>
18274             David Sherwood  <david.sherwood@arm.com>
18276         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
18277         x exists before using it.
18278         (aarch64_add_constant_internal): Rename to...
18279         (aarch64_add_offset_1): ...this.  Replace regnum with separate
18280         src and dest rtxes.  Handle the case in which they're different,
18281         including when the offset is zero.  Replace scratchreg with an rtx.
18282         Use 2 additions if there is no spare register into which we can
18283         move a 16-bit constant.
18284         (aarch64_add_constant): Delete.
18285         (aarch64_add_offset): Replace reg with separate src and dest
18286         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
18287         Use aarch64_add_offset_1.
18288         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18289         an rtx rather than an int.  Take the delta as a poly_int64
18290         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
18291         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18292         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18293         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18294         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18295         and aarch64_add_sp.
18296         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18297         aarch64_add_constant.
18299 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18301         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18302         Use scalar_float_mode.
18304 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18306         * config/aarch64/aarch64-simd.md
18307         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18308         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18309         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18310         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18311         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18312         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18313         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18314         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18315         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18316         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18318 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18320         PR target/83514
18321         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18322         targ_options->x_arm_arch_string is non NULL.
18324 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
18326         * config/aarch64/aarch64.h
18327         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
18329 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
18331         PR target/82096
18332         * expmed.c (emit_store_flag_force): Swap if const op0
18333         and change VOIDmode to mode of op0.
18335 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18337         PR rtl-optimization/83761
18338         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18339         than bytes to mode_for_size.
18341 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18343         PR middle-end/83189
18344         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18345         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18346         profile.
18348 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18350         PR middle-end/83575
18351         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18352         when in layout mode.
18353         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18354         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18355         partition fixup.
18357 2018-01-10  Michael Collison  <michael.collison@arm.com>
18359         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18360         * config/aarch64/aarch64-option-extension.def: Add
18361         AARCH64_OPT_EXTENSION of 'fp16fml'.
18362         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18363         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18364         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18365         * config/aarch64/constraints.md (Ui7): New constraint.
18366         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18367         (VFMLA_SEL_W): Ditto.
18368         (f16quad): Ditto.
18369         (f16mac1): Ditto.
18370         (VFMLA16_LOW): New int iterator.
18371         (VFMLA16_HIGH): Ditto.
18372         (UNSPEC_FMLAL): New unspec.
18373         (UNSPEC_FMLSL): Ditto.
18374         (UNSPEC_FMLAL2): Ditto.
18375         (UNSPEC_FMLSL2): Ditto.
18376         (f16mac): New code attribute.
18377         * config/aarch64/aarch64-simd-builtins.def
18378         (aarch64_fmlal_lowv2sf): Ditto.
18379         (aarch64_fmlsl_lowv2sf): Ditto.
18380         (aarch64_fmlalq_lowv4sf): Ditto.
18381         (aarch64_fmlslq_lowv4sf): Ditto.
18382         (aarch64_fmlal_highv2sf): Ditto.
18383         (aarch64_fmlsl_highv2sf): Ditto.
18384         (aarch64_fmlalq_highv4sf): Ditto.
18385         (aarch64_fmlslq_highv4sf): Ditto.
18386         (aarch64_fmlal_lane_lowv2sf): Ditto.
18387         (aarch64_fmlsl_lane_lowv2sf): Ditto.
18388         (aarch64_fmlal_laneq_lowv2sf): Ditto.
18389         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18390         (aarch64_fmlalq_lane_lowv4sf): Ditto.
18391         (aarch64_fmlsl_lane_lowv4sf): Ditto.
18392         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18393         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18394         (aarch64_fmlal_lane_highv2sf): Ditto.
18395         (aarch64_fmlsl_lane_highv2sf): Ditto.
18396         (aarch64_fmlal_laneq_highv2sf): Ditto.
18397         (aarch64_fmlsl_laneq_highv2sf): Ditto.
18398         (aarch64_fmlalq_lane_highv4sf): Ditto.
18399         (aarch64_fmlsl_lane_highv4sf): Ditto.
18400         (aarch64_fmlalq_laneq_highv4sf): Ditto.
18401         (aarch64_fmlsl_laneq_highv4sf): Ditto.
18402         * config/aarch64/aarch64-simd.md:
18403         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18404         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18405         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18406         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18407         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18408         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18409         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18410         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18411         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18412         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18413         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18414         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18415         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18416         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18417         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18418         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18419         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18420         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18421         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18422         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18423         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18424         (vfmlsl_low_u32): Ditto.
18425         (vfmlalq_low_u32): Ditto.
18426         (vfmlslq_low_u32): Ditto.
18427         (vfmlal_high_u32): Ditto.
18428         (vfmlsl_high_u32): Ditto.
18429         (vfmlalq_high_u32): Ditto.
18430         (vfmlslq_high_u32): Ditto.
18431         (vfmlal_lane_low_u32): Ditto.
18432         (vfmlsl_lane_low_u32): Ditto.
18433         (vfmlal_laneq_low_u32): Ditto.
18434         (vfmlsl_laneq_low_u32): Ditto.
18435         (vfmlalq_lane_low_u32): Ditto.
18436         (vfmlslq_lane_low_u32): Ditto.
18437         (vfmlalq_laneq_low_u32): Ditto.
18438         (vfmlslq_laneq_low_u32): Ditto.
18439         (vfmlal_lane_high_u32): Ditto.
18440         (vfmlsl_lane_high_u32): Ditto.
18441         (vfmlal_laneq_high_u32): Ditto.
18442         (vfmlsl_laneq_high_u32): Ditto.
18443         (vfmlalq_lane_high_u32): Ditto.
18444         (vfmlslq_lane_high_u32): Ditto.
18445         (vfmlalq_laneq_high_u32): Ditto.
18446         (vfmlslq_laneq_high_u32): Ditto.
18447         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18448         (AARCH64_FL_FOR_ARCH8_4): New.
18449         (AARCH64_ISA_F16FML): New ISA flag.
18450         (TARGET_F16FML): New feature flag for fp16fml.
18451         (doc/invoke.texi): Document new fp16fml option.
18453 2018-01-10  Michael Collison  <michael.collison@arm.com>
18455         * config/aarch64/aarch64-builtins.c:
18456         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18457         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18458         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18459         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18460         (AARCH64_ISA_SHA3): New ISA flag.
18461         (TARGET_SHA3): New feature flag for sha3.
18462         * config/aarch64/iterators.md (sha512_op): New int attribute.
18463         (CRYPTO_SHA512): New int iterator.
18464         (UNSPEC_SHA512H): New unspec.
18465         (UNSPEC_SHA512H2): Ditto.
18466         (UNSPEC_SHA512SU0): Ditto.
18467         (UNSPEC_SHA512SU1): Ditto.
18468         * config/aarch64/aarch64-simd-builtins.def
18469         (aarch64_crypto_sha512hqv2di): New builtin.
18470         (aarch64_crypto_sha512h2qv2di): Ditto.
18471         (aarch64_crypto_sha512su0qv2di): Ditto.
18472         (aarch64_crypto_sha512su1qv2di): Ditto.
18473         (aarch64_eor3qv8hi): Ditto.
18474         (aarch64_rax1qv2di): Ditto.
18475         (aarch64_xarqv2di): Ditto.
18476         (aarch64_bcaxqv8hi): Ditto.
18477         * config/aarch64/aarch64-simd.md:
18478         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18479         (aarch64_crypto_sha512su0qv2di): Ditto.
18480         (aarch64_crypto_sha512su1qv2di): Ditto.
18481         (aarch64_eor3qv8hi): Ditto.
18482         (aarch64_rax1qv2di): Ditto.
18483         (aarch64_xarqv2di): Ditto.
18484         (aarch64_bcaxqv8hi): Ditto.
18485         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18486         (vsha512h2q_u64): Ditto.
18487         (vsha512su0q_u64): Ditto.
18488         (vsha512su1q_u64): Ditto.
18489         (veor3q_u16): Ditto.
18490         (vrax1q_u64): Ditto.
18491         (vxarq_u64): Ditto.
18492         (vbcaxq_u16): Ditto.
18493         * config/arm/types.md (crypto_sha512): New type attribute.
18494         (crypto_sha3): Ditto.
18495         (doc/invoke.texi): Document new sha3 option.
18497 2018-01-10  Michael Collison  <michael.collison@arm.com>
18499         * config/aarch64/aarch64-builtins.c:
18500         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18501         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18502         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18503         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18504         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18505         (AARCH64_ISA_SM4): New ISA flag.
18506         (TARGET_SM4): New feature flag for sm4.
18507         * config/aarch64/aarch64-simd-builtins.def
18508         (aarch64_sm3ss1qv4si): Ditto.
18509         (aarch64_sm3tt1aq4si): Ditto.
18510         (aarch64_sm3tt1bq4si): Ditto.
18511         (aarch64_sm3tt2aq4si): Ditto.
18512         (aarch64_sm3tt2bq4si): Ditto.
18513         (aarch64_sm3partw1qv4si): Ditto.
18514         (aarch64_sm3partw2qv4si): Ditto.
18515         (aarch64_sm4eqv4si): Ditto.
18516         (aarch64_sm4ekeyqv4si): Ditto.
18517         * config/aarch64/aarch64-simd.md:
18518         (aarch64_sm3ss1qv4si): Ditto.
18519         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18520         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18521         (aarch64_sm4eqv4si): Ditto.
18522         (aarch64_sm4ekeyqv4si): Ditto.
18523         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18524         (sm3part_op): Ditto.
18525         (CRYPTO_SM3TT): Ditto.
18526         (CRYPTO_SM3PART): Ditto.
18527         (UNSPEC_SM3SS1): New unspec.
18528         (UNSPEC_SM3TT1A): Ditto.
18529         (UNSPEC_SM3TT1B): Ditto.
18530         (UNSPEC_SM3TT2A): Ditto.
18531         (UNSPEC_SM3TT2B): Ditto.
18532         (UNSPEC_SM3PARTW1): Ditto.
18533         (UNSPEC_SM3PARTW2): Ditto.
18534         (UNSPEC_SM4E): Ditto.
18535         (UNSPEC_SM4EKEY): Ditto.
18536         * config/aarch64/constraints.md (Ui2): New constraint.
18537         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18538         * config/arm/types.md (crypto_sm3): New type attribute.
18539         (crypto_sm4): Ditto.
18540         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18541         (vsm3tt1aq_u32): Ditto.
18542         (vsm3tt1bq_u32): Ditto.
18543         (vsm3tt2aq_u32): Ditto.
18544         (vsm3tt2bq_u32): Ditto.
18545         (vsm3partw1q_u32): Ditto.
18546         (vsm3partw2q_u32): Ditto.
18547         (vsm4eq_u32): Ditto.
18548         (vsm4ekeyq_u32): Ditto.
18549         (doc/invoke.texi): Document new sm4 option.
18551 2018-01-10  Michael Collison  <michael.collison@arm.com>
18553         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18554         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18555         (AARCH64_FL_FOR_ARCH8_4): New.
18556         (AARCH64_FL_V8_4): New flag.
18557         (doc/invoke.texi): Document new armv8.4-a option.
18559 2018-01-10  Michael Collison  <michael.collison@arm.com>
18561         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18562         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18563         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18564         * config/aarch64/aarch64-option-extension.def: Add
18565         AARCH64_OPT_EXTENSION of 'sha2'.
18566         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18567         (crypto): Disable sha2 and aes if crypto disabled.
18568         (crypto): Enable aes and sha2 if enabled.
18569         (simd): Disable sha2 and aes if simd disabled.
18570         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18571         New flags.
18572         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18573         (TARGET_SHA2): New feature flag for sha2.
18574         (TARGET_AES): New feature flag for aes.
18575         * config/aarch64/aarch64-simd.md:
18576         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18577         conditional on TARGET_AES.
18578         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18579         (aarch64_crypto_sha1hsi): Make pattern conditional
18580         on TARGET_SHA2.
18581         (aarch64_crypto_sha1hv4si): Ditto.
18582         (aarch64_be_crypto_sha1hv4si): Ditto.
18583         (aarch64_crypto_sha1su1v4si): Ditto.
18584         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18585         (aarch64_crypto_sha1su0v4si): Ditto.
18586         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18587         (aarch64_crypto_sha256su0v4si): Ditto.
18588         (aarch64_crypto_sha256su1v4si): Ditto.
18589         (doc/invoke.texi): Document new aes and sha2 options.
18591 2018-01-10  Martin Sebor  <msebor@redhat.com>
18593         PR tree-optimization/83781
18594         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18595         as string arrays.
18597 2018-01-11  Martin Sebor  <msebor@gmail.com>
18598             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18600         PR tree-optimization/83501
18601         PR tree-optimization/81703
18603         * tree-ssa-strlen.c (get_string_cst): Rename...
18604         (get_string_len): ...to this.  Handle global constants.
18605         (handle_char_store): Adjust.
18607 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
18608             Jim Wilson  <jimw@sifive.com>
18610         * config/riscv/riscv-protos.h (riscv_output_return): New.
18611         * config/riscv/riscv.c (struct machine_function): New naked_p field.
18612         (riscv_attribute_table, riscv_output_return),
18613         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18614         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18615         (riscv_compute_frame_info): Only compute frame->mask if not a naked
18616         function.
18617         (riscv_expand_prologue): Add early return for naked function.
18618         (riscv_expand_epilogue): Likewise.
18619         (riscv_function_ok_for_sibcall): Return false for naked function.
18620         (riscv_set_current_function): New.
18621         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18622         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18623         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18624         * doc/extend.texi (RISC-V Function Attributes): New.
18626 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
18628         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18629         check for 128-bit long double before checking TCmode.
18630         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18631         128-bit long doubles before checking TFmode or TCmode.
18632         (FLOAT128_IBM_P): Likewise.
18634 2018-01-10  Martin Sebor  <msebor@redhat.com>
18636         PR tree-optimization/83671
18637         * builtins.c (c_strlen): Unconditionally return zero for the empty
18638         string.
18639         Use -Warray-bounds for warnings.
18640         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18641         for non-constant array indices with COMPONENT_REF, arrays of
18642         arrays, and pointers to arrays.
18643         (gimple_fold_builtin_strlen): Determine and set length range for
18644         non-constant character arrays.
18646 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
18648         PR middle-end/81897
18649         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18650         empty blocks.
18652 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
18654         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18656 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
18658         PR target/83399
18659         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18660         VECTOR_MEM_ALTIVEC_OR_VSX_P.
18661         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18662         indexed_or_indirect_operand predicate.
18663         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18664         (*vsx_le_perm_load_v8hi): Likewise.
18665         (*vsx_le_perm_load_v16qi): Likewise.
18666         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18667         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18668         (*vsx_le_perm_store_v8hi): Likewise.
18669         (*vsx_le_perm_store_v16qi): Likewise.
18670         (eight unnamed splitters): Likewise.
18672 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
18674         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18675         * config/rs6000/emmintrin.h: Likewise.
18676         * config/rs6000/mmintrin.h: Likewise.
18677         * config/rs6000/xmmintrin.h: Likewise.
18679 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
18681         PR c++/43486
18682         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18683         "public_flag".
18684         * tree.c (tree_nop_conversion): Return true for location wrapper
18685         nodes.
18686         (maybe_wrap_with_location): New function.
18687         (selftest::check_strip_nops): New function.
18688         (selftest::test_location_wrappers): New function.
18689         (selftest::tree_c_tests): Call it.
18690         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18691         (maybe_wrap_with_location): New decl.
18692         (EXPR_LOCATION_WRAPPER_P): New macro.
18693         (location_wrapper_p): New inline function.
18694         (tree_strip_any_location_wrapper): New inline function.
18696 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
18698         PR target/83735
18699         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18700         stack_realign_offset for the largest alignment of stack slot
18701         actually used.
18702         (ix86_find_max_used_stack_alignment): New function.
18703         (ix86_finalize_stack_frame_flags): Use it.  Set
18704         max_used_stack_alignment if we don't realign stack.
18705         * config/i386/i386.h (machine_function): Add
18706         max_used_stack_alignment.
18708 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
18710         * config/arm/arm.opt (-mbranch-cost): New option.
18711         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18712         account.
18714 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
18716         PR target/83629
18717         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18718         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18720 2018-01-10  Richard Biener  <rguenther@suse.de>
18722         PR debug/83765
18723         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18724         early out so it also covers the case where we have a non-NULL
18725         origin.
18727 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
18729         PR tree-optimization/83753
18730         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18731         for non-strided grouped accesses if the number of elements is 1.
18733 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18735         PR target/81616
18736         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18737         * i386.h (TARGET_USE_GATHER): Define.
18738         * x86-tune.def (X86_TUNE_USE_GATHER): New.
18740 2018-01-10  Martin Liska  <mliska@suse.cz>
18742         PR bootstrap/82831
18743         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18744         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18745         partitioning.
18746         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18747         CLEANUP_NO_PARTITIONING is not set.
18749 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
18751         * doc/rtl.texi: Remove documentation of (const ...) wrappers
18752         for vectors, as a partial revert of r254296.
18753         * rtl.h (const_vec_p): Delete.
18754         (const_vec_duplicate_p): Don't test for vector CONSTs.
18755         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18756         * expmed.c (make_tree): Likewise.
18758         Revert:
18759         * common.md (E, F): Use CONSTANT_P instead of checking for
18760         CONST_VECTOR.
18761         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18762         checking for CONST_VECTOR.
18764 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18766         PR middle-end/83575
18767         * predict.c (force_edge_cold): Handle in more sane way edges
18768         with no prediction.
18770 2018-01-09  Carl Love  <cel@us.ibm.com>
18772         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18773         V4SI, V4SF types.
18774         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18775         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18776         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18777         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
18778         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18779         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
18780         * config/rs6000/rs6000-protos.h: Add extern defition for
18781         rs6000_generate_float2_double_code.
18782         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18783         function.
18784         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18785         (float2_v2df): Add define_expand.
18787 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
18789         PR target/83628
18790         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18791         op_mode in the force_to_mode call.
18793 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18795         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18796         instead of checking each element individually.
18797         (aarch64_evpc_uzp): Likewise.
18798         (aarch64_evpc_zip): Likewise.
18799         (aarch64_evpc_ext): Likewise.
18800         (aarch64_evpc_rev): Likewise.
18801         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18802         instead of checking each element individually.  Return true without
18803         generating rtl if
18804         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18805         whether all selected elements come from the same input, instead of
18806         checking each element individually.  Remove calls to gen_rtx_REG,
18807         start_sequence and end_sequence and instead assert that no rtl is
18808         generated.
18810 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18812         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18813         order of HIGH and CONST checks.
18815 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18817         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18818         if the destination isn't an SSA_NAME.
18820 2018-01-09  Richard Biener  <rguenther@suse.de>
18822         PR tree-optimization/83668
18823         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18824         move prologue...
18825         (canonicalize_loop_form): ... here, renamed from ...
18826         (canonicalize_loop_closed_ssa_form): ... this and amended to
18827         swap successor edges for loop exit blocks to make us use
18828         the RPO order we need for initial schedule generation.
18830 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
18832         PR tree-optimization/64811
18833         * match.pd: When optimizing comparisons with Inf, avoid
18834         introducing or losing exceptions from comparisons with NaN.
18836 2018-01-09  Martin Liska  <mliska@suse.cz>
18838         PR sanitizer/82517
18839         * asan.c (shadow_mem_size): Add gcc_assert.
18841 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
18843         Don't save registers in main().
18845         PR target/83738
18846         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18847         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18848         * config/avr/avr.c (avr_set_current_function): Don't error if
18849         naked, OS_task or OS_main are specified at the same time.
18850         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18851         OS_main.
18852         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18853         attribute.
18854         * common/config/avr/avr-common.c (avr_option_optimization_table):
18855         Switch on -mmain-is-OS_task for optimizing compilations.
18857 2018-01-09  Richard Biener  <rguenther@suse.de>
18859         PR tree-optimization/83572
18860         * graphite.c: Include cfganal.h.
18861         (graphite_transform_loops): Connect infinite loops to exit
18862         and remove fake edges at the end.
18864 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18866         * ipa-inline.c (edge_badness): Revert accidental checkin.
18868 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18870         PR ipa/80763
18871         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18872         symbols; not inline clones.
18874 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
18876         PR target/83507
18877         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18878         hard registers.  Formatting fixes.
18880         PR preprocessor/83722
18881         * gcc.c (try_generate_repro): Pass
18882         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18883         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18884         do_report_bug.
18886 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
18887             Kito Cheng  <kito.cheng@gmail.com>
18889         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18890         (riscv_leaf_function_p): Delete.
18891         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18893 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18895         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18896         function.
18897         (do_ifelse): New function.
18898         (do_isel): New function.
18899         (do_sub3): New function.
18900         (do_add3): New function.
18901         (do_load_mask_compare): New function.
18902         (do_overlap_load_compare): New function.
18903         (expand_compare_loop): New function.
18904         (expand_block_compare): Call expand_compare_loop() when appropriate.
18905         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18906         option description.
18907         (-mblock-compare-inline-loop-limit): New option.
18909 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18911         PR target/83677
18912         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18913         Reverse order of second and third operands in first alternative.
18914         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18915         of first and second elements in UNSPEC_VPERMR vector.
18916         (altivec_expand_vec_perm_le): Likewise.
18918 2018-01-08  Jeff Law  <law@redhat.com>
18920         PR rtl-optimizatin/81308
18921         * tree-switch-conversion.c (cfg_altered): New file scoped static.
18922         (process_switch): If group_case_labels makes a change, then set
18923         cfg_altered.
18924         (pass_convert_switch::execute): If a switch is converted, then
18925         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
18927         PR rtl-optimization/81308
18928         * recog.c (split_all_insns): Conditionally cleanup the CFG after
18929         splitting insns.
18931 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
18933         PR target/83663 - Revert r255946
18934         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18935         generation for cases where splatting a value is not useful.
18936         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18937         across a vec_duplicate and a paradoxical subreg forming a vector
18938         mode to a vec_concat.
18940 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18942         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18943         -march=armv8.3-a variants.
18944         * config/arm/t-multilib: Likewise.
18945         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
18947 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18949         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18950         to generate rtl.
18951         (cceq_ior_compare_complement): Give it a name so I can use it, and
18952         change boolean_or_operator predicate to boolean_operator so it can
18953         be used to generate a crand.
18954         (eqne): New code iterator.
18955         (bd/bd_neg): New code_attrs.
18956         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18957         a single define_insn.
18958         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18959         decrement (bdnzt/bdnzf/bdzt/bdzf).
18960         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18961         with the new names of the branch decrement patterns, and added the
18962         names of the branch decrement conditional patterns.
18964 2018-01-08  Richard Biener  <rguenther@suse.de>
18966         PR tree-optimization/83563
18967         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18968         cache.
18970 2018-01-08  Richard Biener  <rguenther@suse.de>
18972         PR middle-end/83713
18973         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18975 2018-01-08  Richard Biener  <rguenther@suse.de>
18977         PR tree-optimization/83685
18978         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18979         references to abnormals.
18981 2018-01-08  Richard Biener  <rguenther@suse.de>
18983         PR lto/83719
18984         * dwarf2out.c (output_indirect_strings): Handle empty
18985         skeleton_debug_str_hash.
18986         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18988 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
18990         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18991         (emit_store_direct): Likewise.
18992         (arc_trampoline_adjust_address): Likewise.
18993         (arc_asm_trampoline_template): New function.
18994         (arc_initialize_trampoline): Use asm_trampoline_template.
18995         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18996         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18997         * config/arc/arc.md (flush_icache): Delete pattern.
18999 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
19001         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19002         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19003         munaligned-access.
19005 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19007         PR target/83681
19008         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19009         by not USED_FOR_TARGET.
19010         (make_pass_resolve_sw_modes): Likewise.
19012 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19014         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19015         USED_FOR_TARGET.
19017 2018-01-08  Richard Biener  <rguenther@suse.de>
19019         PR middle-end/83580
19020         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19022 2018-01-08  Richard Biener  <rguenther@suse.de>
19024         PR middle-end/83517
19025         * match.pd ((t * 2) / 2) -> t): Add missing :c.
19027 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
19029         PR middle-end/81897
19030         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19031         basic blocks with a small number of successors.
19032         (convert_control_dep_chain_into_preds): Improve handling of
19033         forwarder blocks.
19034         (dump_predicates): Split apart into...
19035         (dump_pred_chain): ...here...
19036         (dump_pred_info): ...and here.
19037         (can_one_predicate_be_invalidated_p): Add debugging printfs.
19038         (can_chain_union_be_invalidated_p): Improve check for invalidation
19039         of paths.
19040         (uninit_uses_cannot_happen): Avoid unnecessary if
19041         convert_control_dep_chain_into_preds yielded nothing.
19043 2018-01-06  Martin Sebor  <msebor@redhat.com>
19045         PR tree-optimization/83640
19046         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19047         subtracting negative offset from size.
19048         (builtin_access::overlap): Adjust offset bounds of the access to fall
19049         within the size of the object if possible.
19051 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
19053         PR rtl-optimization/83699
19054         * expmed.c (extract_bit_field_1): Restrict the vector usage of
19055         extract_bit_field_as_subreg to cases in which the extracted
19056         value is also a vector.
19058         * lra-constraints.c (process_alt_operands): Test for the equivalence
19059         substitutions when detecting a possible reload cycle.
19061 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
19063         PR debug/83480
19064         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19065         by default if flag_selective_schedling{,2}.  Formatting fixes.
19067         PR rtl-optimization/83682
19068         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19069         if it has non-VECTOR_MODE element mode.
19070         (vec_duplicate_p): Likewise.
19072         PR middle-end/83694
19073         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19074         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19076 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
19078         PR target/83604
19079         * config/i386/i386-builtin.def
19080         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19081         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19082         Require also OPTION_MASK_ISA_AVX512F in addition to
19083         OPTION_MASK_ISA_GFNI.
19084         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19085         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19086         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19087         to OPTION_MASK_ISA_GFNI.
19088         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19089         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19090         OPTION_MASK_ISA_AVX512BW.
19091         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19092         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19093         addition to OPTION_MASK_ISA_GFNI.
19094         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19095         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19096         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19097         to OPTION_MASK_ISA_GFNI.
19098         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19099         a requirement for all ISAs rather than any of them with a few
19100         exceptions.
19101         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19102         processing.
19103         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19104         bitmasks to be enabled with 3 exceptions, instead of requiring any
19105         enabled ISA with lots of exceptions.
19106         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19107         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19108         Change avx512bw in isa attribute to avx512f.
19109         * config/i386/sgxintrin.h: Add license boilerplate.
19110         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
19111         to __AVX512F__ and __AVX512VL to __AVX512VL__.
19112         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19113         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19114         defined.
19115         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19116         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19117         temporarily sse2 rather than sse if not enabled already.
19119         PR target/83604
19120         * config/i386/sse.md (VI248_VLBW): Rename to ...
19121         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
19122         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19123         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19124         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19125         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19126         mode iterator instead of VI248_VLBW.
19128 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
19130         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19131         (record_modified): Skip clobbers; add debug output.
19132         (param_change_prob): Use sreal frequencies.
19134 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
19136         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19137         punt for user-aligned variables.
19139 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
19141         * tree-chrec.c (chrec_contains_symbols): Return true for
19142         POLY_INT_CST.
19144 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
19146         PR target/82439
19147         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19148         of (x|y) == x for BICS pattern.
19150 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
19152         PR tree-optimization/83605
19153         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19154         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19155         can throw.
19157 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19159         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19160         * config/epiphany/rtems.h: New file.
19162 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19163             Uros Bizjak  <ubizjak@gmail.com>
19165         PR target/83554
19166         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19167         QIreg_operand instead of register_operand predicate.
19168         * config/i386/i386.c (ix86_rop_should_change_byte_p,
19169         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19170         comments instead of -fmitigate[-_]rop.
19172 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19174         PR bootstrap/81926
19175         * cgraphunit.c (symbol_table::compile): Switch to text_section
19176         before calling assembly_start debug hook.
19177         * run-rtl-passes.c (run_rtl_passes): Likewise.
19178         Include output.h.
19180 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19182         * tree-vrp.c (extract_range_from_binary_expr_1): Check
19183         range_int_cst_p rather than !symbolic_range_p before calling
19184         extract_range_from_multiplicative_op_1.
19186 2018-01-04  Jeff Law  <law@redhat.com>
19188         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19189         redundant test in assertion.
19191 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19193         * doc/rtl.texi: Document machine_mode wrapper classes.
19195 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19197         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19198         using tree_to_uhwi.
19200 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19202         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19203         the VEC_PERM_EXPR fold to fail.
19205 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19207         PR debug/83585
19208         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
19209         to switched_sections.
19211 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19213         PR target/83680
19214         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
19215         test for d.testing.
19217 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
19219         PR target/83387
19220         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
19221         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
19223 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19225         PR debug/83666
19226         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
19227         is BLKmode and bitpos not zero or mode change is needed.
19229 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19231         PR target/83675
19232         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
19233         TARGET_VIS2.
19235 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
19237         PR target/83628
19238         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
19239         instead of MULT rtx.  Update all corresponding splitters.
19240         (*saddl_se): Ditto.
19241         (*ssub<modesuffix>): Ditto.
19242         (*ssubl_se): Ditto.
19243         (*cmp_sadd_di): Update split patterns.
19244         (*cmp_sadd_si): Ditto.
19245         (*cmp_sadd_sidi): Ditto.
19246         (*cmp_ssub_di): Ditto.
19247         (*cmp_ssub_si): Ditto.
19248         (*cmp_ssub_sidi): Ditto.
19249         * config/alpha/predicates.md (const23_operand): New predicate.
19250         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
19251         Look for ASHIFT, not MULT inner operand.
19252         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
19254 2018-01-04  Martin Liska  <mliska@suse.cz>
19256         PR gcov-profile/83669
19257         * gcov.c (output_intermediate_file): Add version to intermediate
19258         gcov file.
19259         * doc/gcov.texi: Document new field 'version' in intermediate
19260         file format. Fix location of '-k' option of gcov command.
19262 2018-01-04  Martin Liska  <mliska@suse.cz>
19264         PR ipa/82352
19265         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
19267 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19269         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
19271 2018-01-03  Martin Sebor  <msebor@redhat.com>
19273         PR tree-optimization/83655
19274         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
19275         checking calls with invalid arguments.
19277 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19279         * tree-vect-stmts.c (vect_get_store_rhs): New function.
19280         (vectorizable_mask_load_store): Delete.
19281         (vectorizable_call): Return false for masked loads and stores.
19282         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
19283         instead of gimple_assign_rhs1.
19284         (vectorizable_load): Handle IFN_MASK_LOAD.
19285         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
19287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19289         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19290         split out from..,
19291         (vectorizable_mask_load_store): ...here.
19292         (vectorizable_load): ...and here.
19294 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19296         * tree-vect-stmts.c (vect_build_all_ones_mask)
19297         (vect_build_zero_merge_argument): New functions, split out from...
19298         (vectorizable_load): ...here.
19300 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19302         * tree-vect-stmts.c (vect_check_store_rhs): New function,
19303         split out from...
19304         (vectorizable_mask_load_store): ...here.
19305         (vectorizable_store): ...and here.
19307 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19309         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19310         split out from...
19311         (vectorizable_mask_load_store): ...here.
19313 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19315         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19316         (vect_model_store_cost): Take a vec_load_store_type instead of a
19317         vect_def_type.
19318         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19319         (vect_model_store_cost): Take a vec_load_store_type instead of a
19320         vect_def_type.
19321         (vectorizable_mask_load_store): Update accordingly.
19322         (vectorizable_store): Likewise.
19323         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19325 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19327         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19328         IFN_MASK_LOAD calls here rather than...
19329         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19331 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19332             Alan Hayward  <alan.hayward@arm.com>
19333             David Sherwood  <david.sherwood@arm.com>
19335         * expmed.c (extract_bit_field_1): For vector extracts,
19336         fall back to extract_bit_field_as_subreg if vec_extract
19337         isn't available.
19339 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19340             Alan Hayward  <alan.hayward@arm.com>
19341             David Sherwood  <david.sherwood@arm.com>
19343         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19344         they are variable or constant sized.
19345         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19346         slots for constant-sized data.
19348 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19349             Alan Hayward  <alan.hayward@arm.com>
19350             David Sherwood  <david.sherwood@arm.com>
19352         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19353         handling COND_EXPRs with boolean comparisons, try to find a better
19354         basis for the mask type than the boolean itself.
19356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19358         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19359         is calculated and how it can be overridden.
19360         * genmodes.c (max_bitsize_mode_any_mode): New variable.
19361         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19362         if defined.
19363         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19364         if nonzero.
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         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19371         Remove the mode argument.
19372         (aarch64_simd_valid_immediate): Remove the mode and inverse
19373         arguments.
19374         * config/aarch64/iterators.md (bitsize): New iterator.
19375         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19376         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19377         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19378         aarch64_simd_valid_immediate.
19379         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19380         (aarch64_reg_or_bic_imm): Likewise.
19381         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19382         with an insn_type enum and msl with a modifier_type enum.
19383         Replace element_width with a scalar_mode.  Change the shift
19384         to unsigned int.  Add constructors for scalar_float_mode and
19385         scalar_int_mode elements.
19386         (aarch64_vect_float_const_representable_p): Delete.
19387         (aarch64_can_const_movi_rtx_p)
19388         (aarch64_simd_scalar_immediate_valid_for_move)
19389         (aarch64_simd_make_constant): Update call to
19390         aarch64_simd_valid_immediate.
19391         (aarch64_advsimd_valid_immediate_hs): New function.
19392         (aarch64_advsimd_valid_immediate): Likewise.
19393         (aarch64_simd_valid_immediate): Remove mode and inverse
19394         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
19395         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19396         and aarch64_float_const_representable_p on the result.
19397         (aarch64_output_simd_mov_immediate): Remove mode argument.
19398         Update call to aarch64_simd_valid_immediate and use of
19399         simd_immediate_info.
19400         (aarch64_output_scalar_simd_mov_immediate): Update call
19401         accordingly.
19403 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19404             Alan Hayward  <alan.hayward@arm.com>
19405             David Sherwood  <david.sherwood@arm.com>
19407         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19408         (mode_nunits): Likewise CONST_MODE_NUNITS.
19409         * machmode.def (ADJUST_NUNITS): Document.
19410         * genmodes.c (mode_data::need_nunits_adj): New field.
19411         (blank_mode): Update accordingly.
19412         (adj_nunits): New variable.
19413         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19414         parameter.
19415         (emit_mode_size_inline): Set need_bytesize_adj for all modes
19416         listed in adj_nunits.
19417         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19418         listed in adj_nunits.  Don't emit case statements for such modes.
19419         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19420         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
19421         nothing if adj_nunits is nonnull.
19422         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19423         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19424         (emit_mode_fbit): Update use of print_maybe_const_decl.
19425         (emit_move_size): Likewise.  Treat the array as non-const
19426         if adj_nunits.
19427         (emit_mode_adjustments): Handle adj_nunits.
19429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19431         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19432         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19433         (VECTOR_MODES): Use it.
19434         (make_vector_modes): Take the prefix as an argument.
19436 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19437             Alan Hayward  <alan.hayward@arm.com>
19438             David Sherwood  <david.sherwood@arm.com>
19440         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19441         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19442         for MODE_VECTOR_BOOL.
19443         * machmode.def (VECTOR_BOOL_MODE): Document.
19444         * genmodes.c (VECTOR_BOOL_MODE): New macro.
19445         (make_vector_bool_mode): New function.
19446         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19447         MODE_VECTOR_BOOL.
19448         * lto-streamer-in.c (lto_input_mode_table): Likewise.
19449         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19450         Likewise.
19451         * stor-layout.c (int_mode_for_mode): Likewise.
19452         * tree.c (build_vector_type_for_mode): Likewise.
19453         * varasm.c (output_constant_pool_2): Likewise.
19454         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19455         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
19456         for MODE_VECTOR_BOOL.
19457         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19458         of mode class checks.
19459         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19460         instead of a list of mode class checks.
19461         (expand_vector_scalar_condition): Likewise.
19462         (type_for_widest_vector_mode): Handle BImode as an inner mode.
19464 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19465             Alan Hayward  <alan.hayward@arm.com>
19466             David Sherwood  <david.sherwood@arm.com>
19468         * machmode.h (mode_size): Change from unsigned short to
19469         poly_uint16_pod.
19470         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19471         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19472         or if measurement_type is not polynomial.
19473         (fixed_size_mode::includes_p): Check for constant-sized modes.
19474         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19475         return a poly_uint16 rather than an unsigned short.
19476         (emit_mode_size): Change the type of mode_size from unsigned short
19477         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
19478         (emit_mode_adjustments): Cope with polynomial vector sizes.
19479         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19480         for GET_MODE_SIZE.
19481         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19482         for GET_MODE_SIZE.
19483         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19484         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19485         * caller-save.c (setup_save_areas): Likewise.
19486         (replace_reg_with_saved_mem): Likewise.
19487         * calls.c (emit_library_call_value_1): Likewise.
19488         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19489         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19490         (gen_lowpart_for_combine): Likewise.
19491         * convert.c (convert_to_integer_1): Likewise.
19492         * cse.c (equiv_constant, cse_insn): Likewise.
19493         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19494         (cselib_subst_to_values): Likewise.
19495         * dce.c (word_dce_process_block): Likewise.
19496         * df-problems.c (df_word_lr_mark_ref): Likewise.
19497         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19498         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19499         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19500         (rtl_for_decl_location): Likewise.
19501         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19502         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19503         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19504         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19505         (expand_expr_real_1): Likewise.
19506         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19507         (pad_below): Likewise.
19508         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19509         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19510         * ira.c (get_subreg_tracking_sizes): Likewise.
19511         * ira-build.c (ira_create_allocno_objects): Likewise.
19512         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19513         (ira_sort_regnos_for_alter_reg): Likewise.
19514         * ira-costs.c (record_operand_costs): Likewise.
19515         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19516         (resolve_simple_move): Likewise.
19517         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19518         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19519         (lra_constraints): Likewise.
19520         (CONST_POOL_OK_P): Reject variable-sized modes.
19521         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19522         (add_pseudo_to_slot, lra_spill): Likewise.
19523         * omp-low.c (omp_clause_aligned_alignment): Likewise.
19524         * optabs-query.c (get_best_extraction_insn): Likewise.
19525         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19526         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19527         (expand_mult_highpart, valid_multiword_target_p): Likewise.
19528         * recog.c (offsettable_address_addr_space_p): Likewise.
19529         * regcprop.c (maybe_mode_change): Likewise.
19530         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19531         * regrename.c (build_def_use): Likewise.
19532         * regstat.c (dump_reg_info): Likewise.
19533         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19534         (find_reloads, find_reloads_subreg_address): Likewise.
19535         * reload1.c (eliminate_regs_1): Likewise.
19536         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19537         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19538         (simplify_binary_operation_1, simplify_subreg): Likewise.
19539         * targhooks.c (default_function_arg_padding): Likewise.
19540         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19541         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19542         (verify_gimple_assign_ternary): Likewise.
19543         * tree-inline.c (estimate_move_cost): Likewise.
19544         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19545         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19546         (get_address_cost_ainc): Likewise.
19547         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19548         (vect_supportable_dr_alignment): Likewise.
19549         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19550         (vectorizable_reduction): Likewise.
19551         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19552         (vectorizable_operation, vectorizable_load): Likewise.
19553         * tree.c (build_same_sized_truth_vector_type): Likewise.
19554         * valtrack.c (cleanup_auto_inc_dec): Likewise.
19555         * var-tracking.c (emit_note_insn_var_location): Likewise.
19556         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19557         (ADDR_VEC_ALIGN): Likewise.
19559 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19560             Alan Hayward  <alan.hayward@arm.com>
19561             David Sherwood  <david.sherwood@arm.com>
19563         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19564         unsigned short.
19565         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19566         or if measurement_type is polynomial.
19567         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19568         * combine.c (make_extraction): Likewise.
19569         * dse.c (find_shift_sequence): Likewise.
19570         * dwarf2out.c (mem_loc_descriptor): Likewise.
19571         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19572         (extract_bit_field, extract_low_bits): Likewise.
19573         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19574         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19575         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19576         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19577         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19578         * reload.c (find_reloads): Likewise.
19579         * reload1.c (alter_reg): Likewise.
19580         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19581         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19582         * tree-if-conv.c (predicate_mem_writes): Likewise.
19583         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19584         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19585         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19586         * valtrack.c (dead_debug_insert_temp): Likewise.
19587         * varasm.c (mergeable_constant_section): Likewise.
19588         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19590 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19591             Alan Hayward  <alan.hayward@arm.com>
19592             David Sherwood  <david.sherwood@arm.com>
19594         * expr.c (expand_assignment): Cope with polynomial mode sizes
19595         when assigning to a CONCAT.
19597 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19598             Alan Hayward  <alan.hayward@arm.com>
19599             David Sherwood  <david.sherwood@arm.com>
19601         * machmode.h (mode_precision): Change from unsigned short to
19602         poly_uint16_pod.
19603         (mode_to_precision): Return a poly_uint16 rather than an unsigned
19604         short.
19605         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19606         or if measurement_type is not polynomial.
19607         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
19608         in which the mode is already known to be a scalar_int_mode.
19609         * genmodes.c (emit_mode_precision): Change the type of mode_precision
19610         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
19611         initializer.
19612         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19613         for GET_MODE_PRECISION.
19614         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19615         for GET_MODE_PRECISION.
19616         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19617         as polynomial.
19618         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19619         (expand_field_assignment, make_extraction): Likewise.
19620         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19621         (get_last_value): Likewise.
19622         * convert.c (convert_to_integer_1): Likewise.
19623         * cse.c (cse_insn): Likewise.
19624         * expr.c (expand_expr_real_1): Likewise.
19625         * lra-constraints.c (simplify_operand_subreg): Likewise.
19626         * optabs-query.c (can_atomic_load_p): Likewise.
19627         * optabs.c (expand_atomic_load): Likewise.
19628         (expand_atomic_store): Likewise.
19629         * ree.c (combine_reaching_defs): Likewise.
19630         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19631         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19632         * tree.h (type_has_mode_precision_p): Likewise.
19633         * ubsan.c (instrument_si_overflow): Likewise.
19635 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19636             Alan Hayward  <alan.hayward@arm.com>
19637             David Sherwood  <david.sherwood@arm.com>
19639         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19640         polynomial numbers of units.
19641         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19642         (valid_vector_subparts_p): New function.
19643         (build_vector_type): Remove temporary shim and take the number
19644         of units as a poly_uint64 rather than an int.
19645         (build_opaque_vector_type): Take the number of units as a
19646         poly_uint64 rather than an int.
19647         * tree.c (build_vector_from_ctor): Handle polynomial
19648         TYPE_VECTOR_SUBPARTS.
19649         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19650         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19651         (build_vector_from_val): If the number of units is variable,
19652         use build_vec_duplicate_cst for constant operands and
19653         VEC_DUPLICATE_EXPR otherwise.
19654         (make_vector_type): Remove temporary is_constant ().
19655         (build_vector_type, build_opaque_vector_type): Take the number of
19656         units as a poly_uint64 rather than an int.
19657         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19658         VECTOR_CST_NELTS.
19659         * cfgexpand.c (expand_debug_expr): Likewise.
19660         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19661         (store_constructor, expand_expr_real_1): Likewise.
19662         (const_scalar_mask_from_tree): Likewise.
19663         * fold-const-call.c (fold_const_reduction): Likewise.
19664         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19665         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19666         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19667         (fold_relational_const): Likewise.
19668         (native_interpret_vector): Likewise.  Change the size from an
19669         int to an unsigned int.
19670         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19671         TYPE_VECTOR_SUBPARTS.
19672         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19673         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19674         duplicating a non-constant operand into a variable-length vector.
19675         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19676         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19677         * ipa-icf.c (sem_variable::equals): Likewise.
19678         * match.pd: Likewise.
19679         * omp-simd-clone.c (simd_clone_subparts): Likewise.
19680         * print-tree.c (print_node): Likewise.
19681         * stor-layout.c (layout_type): Likewise.
19682         * targhooks.c (default_builtin_vectorization_cost): Likewise.
19683         * tree-cfg.c (verify_gimple_comparison): Likewise.
19684         (verify_gimple_assign_binary): Likewise.
19685         (verify_gimple_assign_ternary): Likewise.
19686         (verify_gimple_assign_single): Likewise.
19687         * tree-pretty-print.c (dump_generic_node): Likewise.
19688         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19689         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19690         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19691         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19692         (vect_shift_permute_load_chain): Likewise.
19693         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19694         (expand_vector_condition, optimize_vector_constructor): Likewise.
19695         (lower_vec_perm, get_compute_type): Likewise.
19696         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19697         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19698         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19699         (vect_recog_mask_conversion_pattern): Likewise.
19700         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19701         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19702         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19703         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19704         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19705         (vectorizable_shift, vectorizable_operation, vectorizable_store)
19706         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19707         (supportable_widening_operation): Likewise.
19708         (supportable_narrowing_operation): Likewise.
19709         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19710         Likewise.
19711         * varasm.c (output_constant): Likewise.
19713 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19714             Alan Hayward  <alan.hayward@arm.com>
19715             David Sherwood  <david.sherwood@arm.com>
19717         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19718         so that both the length == 3 and length != 3 cases set up their
19719         own permute vectors.  Add comments explaining why we know the
19720         number of elements is constant.
19721         (vect_permute_load_chain): Likewise.
19723 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19724             Alan Hayward  <alan.hayward@arm.com>
19725             David Sherwood  <david.sherwood@arm.com>
19727         * machmode.h (mode_nunits): Change from unsigned char to
19728         poly_uint16_pod.
19729         (ONLY_FIXED_SIZE_MODES): New macro.
19730         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19731         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19732         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19733         New typedefs.
19734         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19735         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19736         or if measurement_type is not polynomial.
19737         * genmodes.c (ZERO_COEFFS): New macro.
19738         (emit_mode_nunits_inline): Make mode_nunits_inline return a
19739         poly_uint16.
19740         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19741         Use ZERO_COEFFS when emitting initializers.
19742         * data-streamer.h (bp_pack_poly_value): New function.
19743         (bp_unpack_poly_value): Likewise.
19744         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19745         for GET_MODE_NUNITS.
19746         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19747         for GET_MODE_NUNITS.
19748         * tree.c (make_vector_type): Remove temporary shim and make
19749         the real function take the number of units as a poly_uint64
19750         rather than an int.
19751         (build_vector_type_for_mode): Handle polynomial nunits.
19752         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19753         * emit-rtl.c (const_vec_series_p_1): Likewise.
19754         (gen_rtx_CONST_VECTOR): Likewise.
19755         * fold-const.c (test_vec_duplicate_folding): Likewise.
19756         * genrecog.c (validate_pattern): Likewise.
19757         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19758         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19759         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19760         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19761         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19762         * rtlanal.c (subreg_get_info): Likewise.
19763         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19764         (vect_grouped_load_supported): Likewise.
19765         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19766         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19767         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19768         (simplify_const_unary_operation, simplify_binary_operation_1)
19769         (simplify_const_binary_operation, simplify_ternary_operation)
19770         (test_vector_ops_duplicate, test_vector_ops): Likewise.
19771         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19772         instead of CONST_VECTOR_NUNITS.
19773         * varasm.c (output_constant_pool_2): Likewise.
19774         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19775         explicit-encoded elements in the XVEC for variable-length vectors.
19777 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19779         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19781 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19782             Alan Hayward  <alan.hayward@arm.com>
19783             David Sherwood  <david.sherwood@arm.com>
19785         * coretypes.h (fixed_size_mode): Declare.
19786         (fixed_size_mode_pod): New typedef.
19787         * builtins.h (target_builtins::x_apply_args_mode)
19788         (target_builtins::x_apply_result_mode): Change type to
19789         fixed_size_mode_pod.
19790         * builtins.c (apply_args_size, apply_result_size, result_vector)
19791         (expand_builtin_apply_args_1, expand_builtin_apply)
19792         (expand_builtin_return): Update accordingly.
19794 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19796         * cse.c (hash_rtx_cb): Hash only the encoded elements.
19797         * cselib.c (cselib_hash_rtx): Likewise.
19798         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19799         CONST_VECTOR encoding.
19801 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19802             Jeff Law  <law@redhat.com>
19804         PR target/83641
19805         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19806         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19807         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19808         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19810         PR target/83641
19811         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19812         explicitly probe *sp in a noreturn function if there were any callee
19813         register saves or frame pointer is needed.
19815 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19817         PR debug/83621
19818         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19819         BLKmode for ternary, binary or unary expressions.
19821         PR debug/83645
19822         * var-tracking.c (delete_vta_debug_insn): New inline function.
19823         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19824         insns from get_insns () to NULL instead of each bb separately.
19825         Use delete_vta_debug_insn.  No longer static.
19826         (vt_debug_insns_local, variable_tracking_main_1): Adjust
19827         delete_vta_debug_insns callers.
19828         * rtl.h (delete_vta_debug_insns): Declare.
19829         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19830         instead of variable_tracking_main.
19832 2018-01-03  Martin Sebor  <msebor@redhat.com>
19834         PR tree-optimization/83603
19835         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19836         arguments past the endof the argument list in functions declared
19837         without a prototype.
19838         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19839         Avoid checking when arguments are null.
19841 2018-01-03  Martin Sebor  <msebor@redhat.com>
19843         PR c/83559
19844         * doc/extend.texi (attribute const): Fix a typo.
19845         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19846         issuing -Wsuggest-attribute for void functions.
19848 2018-01-03  Martin Sebor  <msebor@redhat.com>
19850         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19851         offset_int::from instead of wide_int::to_shwi.
19852         (maybe_diag_overlap): Remove assertion.
19853         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19854         * gimple-ssa-sprintf.c (format_directive): Same.
19855         (parse_directive): Same.
19856         (sprintf_dom_walker::compute_format_length): Same.
19857         (try_substitute_return_value): Same.
19859 2018-01-03  Jeff Law  <law@redhat.com>
19861         PR middle-end/83654
19862         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19863         non-constant residual for zero at runtime and avoid probing in
19864         that case.  Reorganize code for trailing problem to mirror handling
19865         of the residual.
19867 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19869         PR tree-optimization/83501
19870         * tree-ssa-strlen.c (get_string_cst): New.
19871         (handle_char_store): Call get_string_cst.
19873 2018-01-03  Martin Liska  <mliska@suse.cz>
19875         PR tree-optimization/83593
19876         * tree-ssa-strlen.c: Include tree-cfg.h.
19877         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19878         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19879         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19880         to false.
19881         (strlen_dom_walker::before_dom_children): Call
19882         gimple_purge_dead_eh_edges. Dump tranformation with details
19883         dump flags.
19884         (strlen_dom_walker::before_dom_children): Update call by adding
19885         new argument cleanup_eh.
19886         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19888 2018-01-03  Martin Liska  <mliska@suse.cz>
19890         PR ipa/83549
19891         * cif-code.def (VARIADIC_THUNK): New enum value.
19892         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19893         thunks.
19895 2018-01-03  Jan Beulich  <jbeulich@suse.com>
19897         * sse.md (mov<mode>_internal): Tighten condition for when to use
19898         vmovdqu<ssescalarsize> for TI and OI modes.
19900 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19902         Update copyright years.
19904 2018-01-03  Martin Liska  <mliska@suse.cz>
19906         PR ipa/83594
19907         * ipa-visibility.c (function_and_variable_visibility): Skip
19908         functions with noipa attribure.
19910 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19912         * gcc.c (process_command): Update copyright notice dates.
19913         * gcov-dump.c (print_version): Ditto.
19914         * gcov.c (print_version): Ditto.
19915         * gcov-tool.c (print_version): Ditto.
19916         * gengtype.c (create_file): Ditto.
19917         * doc/cpp.texi: Bump @copying's copyright year.
19918         * doc/cppinternals.texi: Ditto.
19919         * doc/gcc.texi: Ditto.
19920         * doc/gccint.texi: Ditto.
19921         * doc/gcov.texi: Ditto.
19922         * doc/install.texi: Ditto.
19923         * doc/invoke.texi: Ditto.
19925 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19927         * vector-builder.h (vector_builder::m_full_nelts): Change from
19928         unsigned int to poly_uint64.
19929         (vector_builder::full_nelts): Update prototype accordingly.
19930         (vector_builder::new_vector): Likewise.
19931         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19932         (vector_builder::operator ==): Likewise.
19933         (vector_builder::finalize): Likewise.
19934         * int-vector-builder.h (int_vector_builder::int_vector_builder):
19935         Take the number of elements as a poly_uint64 rather than an
19936         unsigned int.
19937         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19938         from unsigned int to poly_uint64.
19939         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19940         (vec_perm_indices::new_vector): Likewise.
19941         (vec_perm_indices::length): Likewise.
19942         (vec_perm_indices::nelts_per_input): Likewise.
19943         (vec_perm_indices::input_nelts): Likewise.
19944         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19945         number of elements per input as a poly_uint64 rather than an
19946         unsigned int.  Use the original encoding for variable-length
19947         vectors, rather than clamping each individual element.
19948         For the second and subsequent elements in each pattern,
19949         clamp the step and base before clamping their sum.
19950         (vec_perm_indices::series_p): Handle polynomial element counts.
19951         (vec_perm_indices::all_in_range_p): Likewise.
19952         (vec_perm_indices_to_tree): Likewise.
19953         (vec_perm_indices_to_rtx): Likewise.
19954         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19955         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19956         (tree_vector_builder::new_binary_operation): Handle polynomial
19957         element counts.  Return false if we need to know the number
19958         of elements at compile time.
19959         * fold-const.c (fold_vec_perm): Punt if the number of elements
19960         isn't known at compile time.
19962 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19964         * vec-perm-indices.h (vec_perm_builder): Change element type
19965         from HOST_WIDE_INT to poly_int64.
19966         (vec_perm_indices::element_type): Update accordingly.
19967         (vec_perm_indices::clamp): Handle polynomial element_types.
19968         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19969         (vec_perm_indices::all_in_range_p): Likewise.
19970         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19971         than shwi trees.
19972         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19973         polynomial vec_perm_indices element types.
19974         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19975         * fold-const.c (fold_vec_perm): Likewise.
19976         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19977         * tree-vect-generic.c (lower_vec_perm): Likewise.
19978         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19979         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19980         element type to HOST_WIDE_INT.
19982 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19983             Alan Hayward  <alan.hayward@arm.com>
19984             David Sherwood  <david.sherwood@arm.com>
19986         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19987         rather than an int.  Use plus_constant.
19988         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19989         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19991 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19992             Alan Hayward  <alan.hayward@arm.com>
19993             David Sherwood  <david.sherwood@arm.com>
19995         * calls.c (emit_call_1, expand_call): Change struct_value_size from
19996         a HOST_WIDE_INT to a poly_int64.
19998 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19999             Alan Hayward  <alan.hayward@arm.com>
20000             David Sherwood  <david.sherwood@arm.com>
20002         * calls.c (load_register_parameters): Cope with polynomial
20003         mode sizes.  Require a constant size for BLKmode parameters
20004         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
20005         forces a parameter to be padded at the lsb end in order to
20006         fill a complete number of words, require the parameter size
20007         to be ordered wrt UNITS_PER_WORD.
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         * reload1.c (spill_stack_slot_width): Change element type
20014         from unsigned int to poly_uint64_pod.
20015         (alter_reg): Treat mode sizes as polynomial.
20017 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20018             Alan Hayward  <alan.hayward@arm.com>
20019             David Sherwood  <david.sherwood@arm.com>
20021         * reload.c (complex_word_subreg_p): New function.
20022         (reload_inner_reg_of_subreg, push_reload): Use it.
20024 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20025             Alan Hayward  <alan.hayward@arm.com>
20026             David Sherwood  <david.sherwood@arm.com>
20028         * lra-constraints.c (process_alt_operands): Reject matched
20029         operands whose sizes aren't ordered.
20030         (match_reload): Refer to this check here.
20032 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20033             Alan Hayward  <alan.hayward@arm.com>
20034             David Sherwood  <david.sherwood@arm.com>
20036         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20037         that the mode size is in the set {1, 2, 4, 8, 16}.
20039 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20040             Alan Hayward  <alan.hayward@arm.com>
20041             David Sherwood  <david.sherwood@arm.com>
20043         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20044         Use plus_constant instead of gen_rtx_PLUS.
20046 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20047             Alan Hayward  <alan.hayward@arm.com>
20048             David Sherwood  <david.sherwood@arm.com>
20050         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20051         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20052         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20053         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20054         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20055         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20056         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20057         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20058         * config/i386/i386.c (ix86_push_rounding): ...this new function.
20059         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20060         a poly_int64.
20061         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20062         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20063         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20064         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20065         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20066         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20067         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20068         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20069         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20070         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20071         function.
20072         * expr.c (emit_move_resolve_push): Treat the input and result
20073         of PUSH_ROUNDING as a poly_int64.
20074         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20075         (emit_push_insn): Likewise.
20076         * lra-eliminations.c (mark_not_eliminable): Likewise.
20077         * recog.c (push_operand): Likewise.
20078         * reload1.c (elimination_effects): Likewise.
20079         * rtlanal.c (nonzero_bits1): Likewise.
20080         * calls.c (store_one_arg): Likewise.  Require the padding to be
20081         known at compile time.
20083 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20084             Alan Hayward  <alan.hayward@arm.com>
20085             David Sherwood  <david.sherwood@arm.com>
20087         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20088         Use plus_constant instead of gen_rtx_PLUS.
20090 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20091             Alan Hayward  <alan.hayward@arm.com>
20092             David Sherwood  <david.sherwood@arm.com>
20094         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20095         rather than an int.
20097 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20098             Alan Hayward  <alan.hayward@arm.com>
20099             David Sherwood  <david.sherwood@arm.com>
20101         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20102         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20103         via stack temporaries.  Treat the mode size as polynomial too.
20105 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20106             Alan Hayward  <alan.hayward@arm.com>
20107             David Sherwood  <david.sherwood@arm.com>
20109         * expr.c (expand_expr_real_2): When handling conversions involving
20110         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20111         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
20112         as a poly_uint64 too.
20114 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20115             Alan Hayward  <alan.hayward@arm.com>
20116             David Sherwood  <david.sherwood@arm.com>
20118         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20120 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20121             Alan Hayward  <alan.hayward@arm.com>
20122             David Sherwood  <david.sherwood@arm.com>
20124         * combine.c (can_change_dest_mode): Handle polynomial
20125         REGMODE_NATURAL_SIZE.
20126         * expmed.c (store_bit_field_1): Likewise.
20127         * expr.c (store_constructor): Likewise.
20128         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20129         and polynomial REGMODE_NATURAL_SIZE.
20130         (gen_lowpart_common): Likewise.
20131         * reginfo.c (record_subregs_of_mode): Likewise.
20132         * rtlanal.c (read_modify_subreg_p): Likewise.
20134 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20135             Alan Hayward  <alan.hayward@arm.com>
20136             David Sherwood  <david.sherwood@arm.com>
20138         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20139         numbers of elements.
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         * match.pd: Cope with polynomial numbers of vector elements.
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         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20152         in a POINTER_PLUS_EXPR.
20154 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20155             Alan Hayward  <alan.hayward@arm.com>
20156             David Sherwood  <david.sherwood@arm.com>
20158         * omp-simd-clone.c (simd_clone_subparts): New function.
20159         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20160         (ipa_simd_modify_function_body): Likewise.
20162 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20163             Alan Hayward  <alan.hayward@arm.com>
20164             David Sherwood  <david.sherwood@arm.com>
20166         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20167         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20168         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20169         (expand_vector_condition, vector_element): Likewise.
20170         (subparts_gt): New function.
20171         (get_compute_type): Use subparts_gt.
20172         (count_type_subparts): Delete.
20173         (expand_vector_operations_1): Use subparts_gt instead of
20174         count_type_subparts.
20176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20177             Alan Hayward  <alan.hayward@arm.com>
20178             David Sherwood  <david.sherwood@arm.com>
20180         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
20181         (vect_compile_time_alias): ...this new function.  Do the calculation
20182         on poly_ints rather than trees.
20183         (vect_prune_runtime_alias_test_list): Update call accordingly.
20185 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20186             Alan Hayward  <alan.hayward@arm.com>
20187             David Sherwood  <david.sherwood@arm.com>
20189         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20190         numbers of units.
20191         (vect_schedule_slp_instance): Likewise.
20193 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20194             Alan Hayward  <alan.hayward@arm.com>
20195             David Sherwood  <david.sherwood@arm.com>
20197         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
20198         constant and extern definitions for variable-length vectors.
20199         (vect_get_constant_vectors): Note that the number of units
20200         is known to be constant.
20202 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20203             Alan Hayward  <alan.hayward@arm.com>
20204             David Sherwood  <david.sherwood@arm.com>
20206         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
20207         of units as polynomial.  Choose between WIDE and NARROW based
20208         on multiple_p.
20210 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20211             Alan Hayward  <alan.hayward@arm.com>
20212             David Sherwood  <david.sherwood@arm.com>
20214         * tree-vect-stmts.c (simd_clone_subparts): New function.
20215         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
20217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20218             Alan Hayward  <alan.hayward@arm.com>
20219             David Sherwood  <david.sherwood@arm.com>
20221         * tree-vect-stmts.c (vectorizable_call): Treat the number of
20222         vectors as polynomial.  Use build_index_vector for
20223         IFN_GOMP_SIMD_LANE.
20225 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20226             Alan Hayward  <alan.hayward@arm.com>
20227             David Sherwood  <david.sherwood@arm.com>
20229         * tree-vect-stmts.c (get_load_store_type): Treat the number of
20230         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
20231         for variable-length vectors.
20232         (vectorizable_mask_load_store): Treat the number of units as
20233         polynomial, asserting that it is constant if the condition has
20234         already been enforced.
20235         (vectorizable_store, vectorizable_load): Likewise.
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-loop.c (vectorizable_live_operation): Treat the number
20242         of units as polynomial.  Punt if we can't tell at compile time
20243         which vector contains the final result.
20245 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20246             Alan Hayward  <alan.hayward@arm.com>
20247             David Sherwood  <david.sherwood@arm.com>
20249         * tree-vect-loop.c (vectorizable_induction): Treat the number
20250         of units as polynomial.  Punt on SLP inductions.  Use an integer
20251         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
20252         cast of such a series for variable-length floating-point
20253         reductions.
20255 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20256             Alan Hayward  <alan.hayward@arm.com>
20257             David Sherwood  <david.sherwood@arm.com>
20259         * tree.h (build_index_vector): Declare.
20260         * tree.c (build_index_vector): New function.
20261         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
20262         of units as polynomial, forcibly converting it to a constant if
20263         vectorizable_reduction has already enforced the condition.
20264         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
20265         to create a {1,2,3,...} vector.
20266         (vectorizable_reduction): Treat the number of units as polynomial.
20267         Choose vectype_in based on the largest scalar element size rather
20268         than the smallest number of units.  Enforce the restrictions
20269         relied on above.
20271 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20272             Alan Hayward  <alan.hayward@arm.com>
20273             David Sherwood  <david.sherwood@arm.com>
20275         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
20276         number of units as polynomial.
20278 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20279             Alan Hayward  <alan.hayward@arm.com>
20280             David Sherwood  <david.sherwood@arm.com>
20282         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
20283         * target.def (autovectorize_vector_sizes): Return the vector sizes
20284         by pointer, using vector_sizes rather than a bitmask.
20285         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
20286         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
20287         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20288         Likewise.
20289         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20290         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20291         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20292         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20293         * omp-general.c (omp_max_vf): Likewise.
20294         * omp-low.c (omp_clause_aligned_alignment): Likewise.
20295         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20296         * tree-vect-loop.c (vect_analyze_loop): Likewise.
20297         * tree-vect-slp.c (vect_slp_bb): Likewise.
20298         * doc/tm.texi: Regenerate.
20299         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20300         to a poly_uint64.
20301         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20302         the vector size as a poly_uint64 rather than an unsigned int.
20303         (current_vector_size): Change from an unsigned int to a poly_uint64.
20304         (get_vectype_for_scalar_type): Update accordingly.
20305         * tree.h (build_truth_vector_type): Take the size and number of
20306         units as a poly_uint64 rather than an unsigned int.
20307         (build_vector_type): Add a temporary overload that takes
20308         the number of units as a poly_uint64 rather than an unsigned int.
20309         * tree.c (make_vector_type): Likewise.
20310         (build_truth_vector_type): Take the number of units as a poly_uint64
20311         rather than an unsigned int.
20313 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20314             Alan Hayward  <alan.hayward@arm.com>
20315             David Sherwood  <david.sherwood@arm.com>
20317         * target.def (get_mask_mode): Take the number of units and length
20318         as poly_uint64s rather than unsigned ints.
20319         * targhooks.h (default_get_mask_mode): Update accordingly.
20320         * targhooks.c (default_get_mask_mode): Likewise.
20321         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20322         * doc/tm.texi: Regenerate.
20324 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20325             Alan Hayward  <alan.hayward@arm.com>
20326             David Sherwood  <david.sherwood@arm.com>
20328         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20329         * omp-general.c (omp_max_vf): Likewise.
20330         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20331         (expand_omp_simd): Handle polynomial safelen.
20332         * omp-low.c (omplow_simd_context): Add a default constructor.
20333         (omplow_simd_context::max_vf): Change from int to poly_uint64.
20334         (lower_rec_simd_input_clauses): Update accordingly.
20335         (lower_rec_input_clauses): Likewise.
20337 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20338             Alan Hayward  <alan.hayward@arm.com>
20339             David Sherwood  <david.sherwood@arm.com>
20341         * tree-vectorizer.h (vect_nunits_for_cost): New function.
20342         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20343         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20344         (vect_analyze_slp_cost): Likewise.
20345         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20346         (vect_model_load_cost): Likewise.
20348 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20349             Alan Hayward  <alan.hayward@arm.com>
20350             David Sherwood  <david.sherwood@arm.com>
20352         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20353         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20354         from an unsigned int * to a poly_uint64_pod *.
20355         (calculate_unrolling_factor): New function.
20356         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
20358 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20359             Alan Hayward  <alan.hayward@arm.com>
20360             David Sherwood  <david.sherwood@arm.com>
20362         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20363         from an unsigned int to a poly_uint64.
20364         (_loop_vec_info::slp_unrolling_factor): Likewise.
20365         (_loop_vec_info::vectorization_factor): Change from an int
20366         to a poly_uint64.
20367         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20368         (vect_get_num_vectors): New function.
20369         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20370         (vect_get_num_copies): Use vect_get_num_vectors.
20371         (vect_analyze_data_ref_dependences): Change max_vf from an int *
20372         to an unsigned int *.
20373         (vect_analyze_data_refs): Change min_vf from an int * to a
20374         poly_uint64 *.
20375         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20376         than an unsigned HOST_WIDE_INT.
20377         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20378         (vect_analyze_data_ref_dependence): Change max_vf from an int *
20379         to an unsigned int *.
20380         (vect_analyze_data_ref_dependences): Likewise.
20381         (vect_compute_data_ref_alignment): Handle polynomial vf.
20382         (vect_enhance_data_refs_alignment): Likewise.
20383         (vect_prune_runtime_alias_test_list): Likewise.
20384         (vect_shift_permute_load_chain): Likewise.
20385         (vect_supportable_dr_alignment): Likewise.
20386         (dependence_distance_ge_vf): Take the vectorization factor as a
20387         poly_uint64 rather than an unsigned HOST_WIDE_INT.
20388         (vect_analyze_data_refs): Change min_vf from an int * to a
20389         poly_uint64 *.
20390         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20391         vfm1 as a poly_uint64 rather than an int.  Make the same change
20392         for the returned bound_scalar.
20393         (vect_gen_vector_loop_niters): Handle polynomial vf.
20394         (vect_do_peeling): Likewise.  Update call to
20395         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20396         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20397         be constant.
20398         * tree-vect-loop.c (vect_determine_vectorization_factor)
20399         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20400         (vect_get_known_peeling_cost): Likewise.
20401         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20402         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20403         (vect_transform_loop): Likewise.  Use the lowest possible VF when
20404         updating the upper bounds of the loop.
20405         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
20406         rather than an int.
20407         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20408         polynomial unroll factors.
20409         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20410         (vect_make_slp_decision): Likewise.
20411         (vect_supported_load_permutation_p): Likewise, and polynomial
20412         vf too.
20413         (vect_analyze_slp_cost): Handle polynomial vf.
20414         (vect_slp_analyze_node_operations): Likewise.
20415         (vect_slp_analyze_bb_1): Likewise.
20416         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20417         than an unsigned HOST_WIDE_INT.
20418         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20419         (vectorizable_load): Handle polynomial vf.
20420         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20421         a poly_uint64.
20422         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20424 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20425             Alan Hayward  <alan.hayward@arm.com>
20426             David Sherwood  <david.sherwood@arm.com>
20428         * match.pd: Handle bit operations involving three constants
20429         and try to fold one pair.
20431 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20433         * tree-vect-loop-manip.c: Include gimple-fold.h.
20434         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20435         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
20436         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20437         Add a path that uses a step of VF instead of 1, but disable it
20438         for now.
20439         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20440         and niters_no_overflow parameters.  Update calls to
20441         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20442         Create a new SSA name if the latter choses to use a ste other
20443         than zero, and return it via niters_vector_mult_vf_var.
20444         * tree-vect-loop.c (vect_transform_loop): Update calls to
20445         vect_do_peeling, vect_gen_vector_loop_niters and
20446         slpeel_make_loop_iterate_ntimes.
20447         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20448         (vect_gen_vector_loop_niters): Update declarations after above changes.
20450 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
20452         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20453         128-bit round to integer instructions.
20454         (ceil<mode>2): Likewise.
20455         (btrunc<mode>2): Likewise.
20456         (round<mode>2): Likewise.
20458 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20460         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20461         unaligned VSX load/store on P8/P9.
20462         (expand_block_clear): Allow the use of unaligned VSX
20463         load/store on P8/P9.
20465 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20467         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20468         New function.
20469         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20470         swap associated with both a load and a store.
20472 2018-01-02  Andrew Waterman  <andrew@sifive.com>
20474         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20475         * config/riscv/riscv.md (clear_cache): Use it.
20477 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
20479         * web.c: Remove out-of-date comment.
20481 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20483         * expr.c (fixup_args_size_notes): Check that any existing
20484         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20485         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20486         (emit_single_push_insn): ...here.
20488 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20490         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20491         (const_vector_encoded_nelts): New function.
20492         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20493         (const_vector_int_elt, const_vector_elt): Declare.
20494         * emit-rtl.c (const_vector_int_elt_1): New function.
20495         (const_vector_elt): Likewise.
20496         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20497         of CONST_VECTOR_ELT.
20499 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20501         * expr.c: Include rtx-vector-builder.h.
20502         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20503         directly on the tree encoding.
20504         (const_vector_from_tree): Likewise.
20505         * optabs.c: Include rtx-vector-builder.h.
20506         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20507         sequence of "u" values.
20508         * vec-perm-indices.c: Include rtx-vector-builder.h.
20509         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20510         directly on the vec_perm_indices encoding.
20512 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20514         * doc/rtl.texi (const_vector): Describe new encoding scheme.
20515         * Makefile.in (OBJS): Add rtx-vector-builder.o.
20516         * rtx-vector-builder.h: New file.
20517         * rtx-vector-builder.c: Likewise.
20518         * rtl.h (rtx_def::u2): Add a const_vector field.
20519         (CONST_VECTOR_NPATTERNS): New macro.
20520         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20521         (CONST_VECTOR_DUPLICATE_P): Likewise.
20522         (CONST_VECTOR_STEPPED_P): Likewise.
20523         (CONST_VECTOR_ENCODED_ELT): Likewise.
20524         (const_vec_duplicate_p): Check for a duplicated vector encoding.
20525         (unwrap_const_vec_duplicate): Likewise.
20526         (const_vec_series_p): Check for a non-duplicated vector encoding.
20527         Say that the function only returns true for integer vectors.
20528         * emit-rtl.c: Include rtx-vector-builder.h.
20529         (gen_const_vec_duplicate_1): Delete.
20530         (gen_const_vector): Call gen_const_vec_duplicate instead of
20531         gen_const_vec_duplicate_1.
20532         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20533         (gen_const_vec_duplicate): Use rtx_vector_builder.
20534         (gen_const_vec_series): Likewise.
20535         (gen_rtx_CONST_VECTOR): Likewise.
20536         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20537         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20538         Build a new vector rather than modifying a CONST_VECTOR in-place.
20539         (handle_special_swappables): Update call accordingly.
20540         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20541         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20542         Build a new vector rather than modifying a CONST_VECTOR in-place.
20543         (handle_special_swappables): Update call accordingly.
20545 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20547         * simplify-rtx.c (simplify_const_binary_operation): Use
20548         CONST_VECTOR_ELT instead of XVECEXP.
20550 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20552         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20553         the selector elements to be different from the data elements
20554         if the selector is a VECTOR_CST.
20555         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20556         ssizetype for the selector.
20558 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20560         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20561         before testing each element individually.
20562         * tree-vect-generic.c (lower_vec_perm): Likewise.
20564 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20566         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20567         * selftest-run-tests.c (selftest::run_tests): Call it.
20568         * vector-builder.h (vector_builder::operator ==): New function.
20569         (vector_builder::operator !=): Likewise.
20570         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20571         (vec_perm_indices::all_from_input_p): New function.
20572         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20573         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20574         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20575         instead of reading the VECTOR_CST directly.  Detect whether both
20576         vector inputs are the same before constructing the vec_perm_indices,
20577         and update the number of inputs argument accordingly.  Use the
20578         utility functions added above.  Only construct sel2 if we need to.
20580 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20582         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20583         the broadcast of the low byte.
20584         (expand_mult_highpart): Use an explicit encoding for the permutes.
20585         * optabs-query.c (can_mult_highpart_p): Likewise.
20586         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20587         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20588         (vectorizable_bswap): Likewise.
20589         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20590         explicit encoding for the power-of-2 permutes.
20591         (vect_permute_store_chain): Likewise.
20592         (vect_grouped_load_supported): Likewise.
20593         (vect_permute_load_chain): Likewise.
20595 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20597         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20598         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20599         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20600         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20601         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20602         (vect_gen_perm_mask_any): Likewise.
20604 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20606         * int-vector-builder.h: New file.
20607         * vec-perm-indices.h: Include int-vector-builder.h.
20608         (vec_perm_indices): Redefine as an int_vector_builder.
20609         (auto_vec_perm_indices): Delete.
20610         (vec_perm_builder): Redefine as a stand-alone class.
20611         (vec_perm_indices::vec_perm_indices): New function.
20612         (vec_perm_indices::clamp): Likewise.
20613         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20614         (vec_perm_indices::new_vector): New function.
20615         (vec_perm_indices::new_expanded_vector): Update for new
20616         vec_perm_indices class.
20617         (vec_perm_indices::rotate_inputs): New function.
20618         (vec_perm_indices::all_in_range_p): Operate directly on the
20619         encoded form, without computing elided elements.
20620         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20621         encoding.  Update for new vec_perm_indices class.
20622         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20623         the given vec_perm_builder.
20624         (expand_vec_perm_var): Update vec_perm_builder constructor.
20625         (expand_mult_highpart): Use vec_perm_builder instead of
20626         auto_vec_perm_indices.
20627         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20628         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
20629         or double series encoding as appropriate.
20630         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20631         vec_perm_indices instead of auto_vec_perm_indices.
20632         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20633         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20634         (vect_permute_store_chain): Likewise.
20635         (vect_grouped_load_supported): Likewise.
20636         (vect_permute_load_chain): Likewise.
20637         (vect_shift_permute_load_chain): Likewise.
20638         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20639         (vect_transform_slp_perm_load): Likewise.
20640         (vect_schedule_slp_instance): Likewise.
20641         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20642         (vectorizable_mask_load_store): Likewise.
20643         (vectorizable_bswap): Likewise.
20644         (vectorizable_store): Likewise.
20645         (vectorizable_load): Likewise.
20646         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20647         vec_perm_indices instead of auto_vec_perm_indices.  Use
20648         tree_to_vec_perm_builder to read the vector from a tree.
20649         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20650         vec_perm_builder instead of a vec_perm_indices.
20651         (have_whole_vector_shift): Use vec_perm_builder and
20652         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
20653         truncation to calc_vec_perm_mask_for_shift.
20654         (vect_create_epilog_for_reduction): Likewise.
20655         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20656         from auto_vec_perm_indices to vec_perm_indices.
20657         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20658         instead of changing individual elements.
20659         (aarch64_vectorize_vec_perm_const): Use new_vector to install
20660         the vector in d.perm.
20661         * config/arm/arm.c (expand_vec_perm_d::perm): Change
20662         from auto_vec_perm_indices to vec_perm_indices.
20663         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20664         instead of changing individual elements.
20665         (arm_vectorize_vec_perm_const): Use new_vector to install
20666         the vector in d.perm.
20667         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20668         Update vec_perm_builder constructor.
20669         (rs6000_expand_interleave): Likewise.
20670         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20671         (rs6000_expand_interleave): Likewise.
20673 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20675         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20676         to qimode could truncate the indices.
20677         * optabs.c (expand_vec_perm_var): Likewise.
20679 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20681         * Makefile.in (OBJS): Add vec-perm-indices.o.
20682         * vec-perm-indices.h: New file.
20683         * vec-perm-indices.c: Likewise.
20684         * target.h (vec_perm_indices): Replace with a forward class
20685         declaration.
20686         (auto_vec_perm_indices): Move to vec-perm-indices.h.
20687         * optabs.h: Include vec-perm-indices.h.
20688         (expand_vec_perm): Delete.
20689         (selector_fits_mode_p, expand_vec_perm_var): Declare.
20690         (expand_vec_perm_const): Declare.
20691         * target.def (vec_perm_const_ok): Replace with...
20692         (vec_perm_const): ...this new hook.
20693         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20694         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20695         * doc/tm.texi: Regenerate.
20696         * optabs.def (vec_perm_const): Delete.
20697         * doc/md.texi (vec_perm_const): Likewise.
20698         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20699         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20700         expand_vec_perm for constant permutation vectors.  Assert that
20701         the mode of variable permutation vectors is the integer equivalent
20702         of the mode that is being permuted.
20703         * optabs-query.h (selector_fits_mode_p): Declare.
20704         * optabs-query.c: Include vec-perm-indices.h.
20705         (selector_fits_mode_p): New function.
20706         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20707         is defined, instead of checking whether the vec_perm_const_optab
20708         exists.  Use targetm.vectorize.vec_perm_const instead of
20709         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
20710         fit in the vector mode before using a variable permute.
20711         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20712         vec_perm_indices instead of an rtx.
20713         (expand_vec_perm): Replace with...
20714         (expand_vec_perm_const): ...this new function.  Take the selector
20715         as a vec_perm_indices rather than an rtx.  Also take the mode of
20716         the selector.  Update call to shift_amt_for_vec_perm_mask.
20717         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20718         Use vec_perm_indices::new_expanded_vector to expand the original
20719         selector into bytes.  Check whether the indices fit in the vector
20720         mode before using a variable permute.
20721         (expand_vec_perm_var): Make global.
20722         (expand_mult_highpart): Use expand_vec_perm_const.
20723         * fold-const.c: Includes vec-perm-indices.h.
20724         * tree-ssa-forwprop.c: Likewise.
20725         * tree-vect-data-refs.c: Likewise.
20726         * tree-vect-generic.c: Likewise.
20727         * tree-vect-loop.c: Likewise.
20728         * tree-vect-slp.c: Likewise.
20729         * tree-vect-stmts.c: Likewise.
20730         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20731         Delete.
20732         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20733         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20734         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20735         (aarch64_vectorize_vec_perm_const): ...this new function.
20736         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20737         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20738         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20739         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20740         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20741         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20742         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20743         into...
20744         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
20745         check for NEON modes.
20746         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20747         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20748         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20749         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20750         into...
20751         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
20752         the old VEC_PERM_CONST conditions.
20753         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20754         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20755         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20756         (ia64_vectorize_vec_perm_const_ok): Merge into...
20757         (ia64_vectorize_vec_perm_const): ...this new function.
20758         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20759         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20760         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20761         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20762         * config/mips/mips.c (mips_expand_vec_perm_const)
20763         (mips_vectorize_vec_perm_const_ok): Merge into...
20764         (mips_vectorize_vec_perm_const): ...this new function.
20765         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20766         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20767         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20768         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20769         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20770         (rs6000_expand_vec_perm_const): Delete.
20771         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20772         Delete.
20773         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20774         (altivec_expand_vec_perm_const_le): Take each operand individually.
20775         Operate on constant selectors rather than rtxes.
20776         (altivec_expand_vec_perm_const): Likewise.  Update call to
20777         altivec_expand_vec_perm_const_le.
20778         (rs6000_expand_vec_perm_const): Delete.
20779         (rs6000_vectorize_vec_perm_const_ok): Delete.
20780         (rs6000_vectorize_vec_perm_const): New function.
20781         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20782         an element count and rtx array.
20783         (rs6000_expand_extract_even): Update call accordingly.
20784         (rs6000_expand_interleave): Likewise.
20785         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20786         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20787         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20788         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20789         (rs6000_expand_vec_perm_const): Delete.
20790         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20791         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20792         (altivec_expand_vec_perm_const_le): Take each operand individually.
20793         Operate on constant selectors rather than rtxes.
20794         (altivec_expand_vec_perm_const): Likewise.  Update call to
20795         altivec_expand_vec_perm_const_le.
20796         (rs6000_expand_vec_perm_const): Delete.
20797         (rs6000_vectorize_vec_perm_const_ok): Delete.
20798         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
20799         reference to the SPE evmerge intructions.
20800         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20801         an element count and rtx array.
20802         (rs6000_expand_extract_even): Update call accordingly.
20803         (rs6000_expand_interleave): Likewise.
20804         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20805         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20806         new function.
20807         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20809 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20811         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20812         vector mode and that that mode matches the mode of the data
20813         being permuted.
20814         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20815         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
20816         directly using expand_vec_perm_1 when forcing selectors into
20817         registers.
20818         (expand_vec_perm_var): New function, split out from expand_vec_perm.
20820 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20822         * optabs-query.h (can_vec_perm_p): Delete.
20823         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20824         * optabs-query.c (can_vec_perm_p): Split into...
20825         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20826         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20827         particular selector is valid.
20828         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20829         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20830         (vect_grouped_load_supported): Likewise.
20831         (vect_shift_permute_load_chain): Likewise.
20832         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20833         (vect_transform_slp_perm_load): Likewise.
20834         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20835         (vectorizable_bswap): Likewise.
20836         (vect_gen_perm_mask_checked): Likewise.
20837         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
20838         implementations of variable permutation vectors into account
20839         when deciding which selector to use.
20840         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20841         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20842         with a false third argument.
20843         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20844         to test whether the constant selector is valid and can_vec_perm_var_p
20845         to test whether a variable selector is valid.
20847 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20849         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20850         * optabs-query.c (can_vec_perm_p): Likewise.
20851         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20852         instead of vec_perm_indices.
20853         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20854         (vect_gen_perm_mask_checked): Likewise,
20855         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20856         (vect_gen_perm_mask_checked): Likewise,
20858 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20860         * optabs-query.h (qimode_for_vec_perm): Declare.
20861         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20862         (qimode_for_vec_perm): ...this new function.
20863         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20865 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20867         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20868         does not have a conditional at the top.
20870 2018-01-02  Richard Biener  <rguenther@suse.de>
20872         * ipa-inline.c (big_speedup_p): Fix expression.
20874 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20876         PR target/81616
20877         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20878         for generic 4->6.
20880 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20882         PR target/81616
20883         Generic tuning.
20884         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20885         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20886         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20887         cond_taken_branch_cost 3->4.
20889 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
20891         PR tree-optimization/83581
20892         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20893         TODO_cleanup_cfg if any changes have been made.
20895         PR middle-end/83608
20896         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20897         convert_modes if target mode has the right side, but different mode
20898         class.
20900         PR middle-end/83609
20901         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20902         last argument when extracting from CONCAT.  If either from_real or
20903         from_imag is NULL, use expansion through memory.  If result is not
20904         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20905         the parts directly to inner mode, if even that fails, use expansion
20906         through memory.
20908         PR middle-end/83623
20909         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20910         check for bswap in mode rather than HImode and use that in expand_unop
20911         too.
20913 Copyright (C) 2018 Free Software Foundation, Inc.
20915 Copying and distribution of this file, with or without modification,
20916 are permitted in any medium without royalty provided the copyright
20917 notice and this notice are preserved.