S/390: Allow immediates in loc expander
[official-gcc.git] / gcc / ChangeLog
blobc76911db0aac0744985bfcfae996c0af5e0aa88e
1 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
3         * config/s390/predicates.md: Fix typo.
4         * config/s390/s390.md: Allow immediates for load on condition.
6 2018-11-05  Martin Liska  <mliska@suse.cz>
8         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
9         * bitmap.h (struct bitmap_usage): Likewise.
10         * ggc-common.c (SCALE): Remove.
11         (LABEL): Likewise.
12         (struct ggc_usage): Use SIZE_AMOUNT. And update
13         compare method.
14         * ggc-page.c (SCALE): Remove.
15         (STAT_LABEL): Remove.
16         (ggc_print_statistics): Use SIZE_AMOUNT.
17         * gimple.h (SCALE): Remove.
18         (LABEL): Likewise.
19         * input.c (ONE_K): Remove.
20         (ONE_M): Likewise.
21         (SCALE): Likewise.
22         (STAT_LABEL): Likewise.
23         (FORMAT_AMOUNT): Likewise.
24         (dump_line_table_statistics): Use SIZE_AMOUNT.
25         * mem-stats.h (struct mem_usage): Likewise.
26         * rtl.c (dump_rtx_statistics): Likewise.
27         (rtx_alloc_counts): Change type to size_t.
28         (rtx_alloc_sizes): Likewise.
29         (rtx_count_cmp): New.
30         (dump_rtx_statistics): Sort first based on counts.
31         * tree.c (tree_nodes_cmp): New.
32         (tree_codes_cmp): New.
33         (dump_tree_statistics): Sort first based on counts.
34         * system.h (ONE_K): New.
35         (ONE_M): Likewise.
36         (SIZE_SCALE): Likewise.
37         (SIZE_LABEL): Likewise.
38         (SIZE_AMOUNT): Likewise.
39         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
40         * tree-dfa.c (dump_dfa_stats): Likewise.
41         * tree-phinodes.c (phinodes_print_statistics): Likewise.
42         * tree-ssanames.c (ssanames_print_statistics): Likewise.
43         * tree.c (dump_tree_statistics): Likewise.
44         * vec.c (struct vec_usage): Likewise.
45         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
46         trigger a -Werror=format-overflow with
47         --enable-gather-detailed-stats.
49 2018-11-05  Martin Liska  <mliska@suse.cz>
51         * mem-stats.h (mem_alloc_description::release_instance_overhead):
52         Return T *.
53         * vec.c (struct vec_usage): Register m_element_size.
54         (vec_prefix::register_overhead): New arguments: elements and
55         element_size.
56         (vec_prefix::release_overhead): Subtract elements.
57         * vec.h (struct vec_prefix): Change signature.
58         (va_heap::reserve): Pass proper arguments.
59         (va_heap::release): Likewise.
61 2018-11-05  Martin Liska  <mliska@suse.cz>
63         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
64         style.
65         * vec.c: Likewise.
67 2018-11-05  Richard Biener  <rguenther@suse.de>
69         * tree-scalar-evolution.h (final_value_replacement_loop): Update
70         prototype.
71         * tree-scalar-evolution.c (final_value_replacement_loop): Return
72         whether anything was done.
73         (scev_const_prop): Remove constant propagation part, fold
74         remains into ...
75         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
76         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
77         conditionally.
79 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
81         PR tree-optimization/87859
82         * gimple-ssa-store-merging.c (struct merged_store_group): Add
83         only_constants and first_nonmergeable_order members.
84         (merged_store_group::merged_store_group): Initialize them.
85         (merged_store_group::do_merge): Clear only_constants member if
86         adding something other than INTEGER_CST store.
87         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
88         stores with order >= first_nonmergeable_order.  Use
89         merged_store->only_constants instead of always recomputing it.
90         Set merged_store->first_nonmergeable_order if we've skipped any
91         stores.  Attempt to merge overlapping INTEGER_CST stores that
92         we would otherwise skip.
94         PR sanitizer/87837
95         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
97 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
99         PR target/87853
100         * config/i386/emmintrin.h (__v16qs): New to cope with option
101         -funsigned-char.
102         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
103         (_mm_cmplt_epi8): Likewise.
104         (_mm_cmpgt_epi8): Likewise.
106 2018-11-05  Richard Biener  <rguenther@suse.de>
108         PR rtl-optimization/87852
109         * fwprop.c (use_killed_between): Only consider single-defs of the
110         use whose definition statement dominates the use.
112 2018-11-05  Martin Liska  <mliska@suse.cz>
114         PR web/87829
115         * doc/invoke.texi: Remove options that are
116         not disabled with -Os.
118 2018-11-05  Martin Liska  <mliska@suse.cz>
120         PR c/87811
121         * doc/extend.texi: Update constrain about the last argument
122         of __builtin_expect_with_probability.
124 2018-11-05  Martin Liska  <mliska@suse.cz>
126         PR c/87811
127         * predict.c (expr_expected_value_1): Verify
128         that last argument is a real constants and emit
129         error.
131 2018-11-05  Martin Liska  <mliska@suse.cz>
133         PR gcov-profile/77698
134         * ipa-profile.c (ipa_profile): Adjust hotness threshold
135         only in LTO mode.
137 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
139         PR tree-optimization/86572
140         * builtins.c (c_strlen): Handle negative offsets in a safe way.
142 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
144         PR tree-optimization/87672
145         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
146         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
148 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
150         PR middle-end/58372
151         * cfgexpand.c (pass_expand::execute): Move the call to
152         finish_eh_generation in front of the call to expand_stack_alignment.
154 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
156         * common/config/i386/i386-common.c (processor_alias_table): Add
157         znver2 entry.
158         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
159         (case ${target}): Add znver2.
160         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
161         -march=native recognize znver2 processors.
162         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
163         * config/i386/i386.c (m_znver2): New definition.
164         (m_ZNVER): New definition.
165         (m_AMD_MULTIPLE): Includes m_znver2.
166         (processor_cost_table): Add znver2 entry.
167         (processor_target_table): Add znver2 entry.
168         (get_builtin_code_for_version): Set priority for
169         PROCESSOR_ZNVER2.
170         (processor_model): Add M_AMDFAM17H_ZNVER2.
171         (arch_names_table): Ditto.
172         (ix86_reassociation_width): Include znver2.
173         * config/i386/i386.h (TARGET_znver2): New definition.
174         (struct ix86_size_cost): Add TARGET_ZNVER2.
175         (enum processor_type): Add PROCESSOR_ZNVER2.
176         * config/i386/i386.md (define_attr "cpu"): Add znver2.
177         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
178         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
179         (ix86_adjust_cost): Add znver2.
180         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
181         * gcc/doc/extend.texi: Add details about znver2.
182         * gcc/doc/invoke.texi: Add details about znver2.
184 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
186         PR target/87079
188         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
189         pattern.
191 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
193         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
194         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
196 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
198         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
199         shrink-wrapping when -mtrack-speculation.
201 2018-11-02  Richard Biener  <rguenther@suse.de>
203         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
204         (pop_cost_one_pair): Do not free pair.
205         (pop_best_coalesce): Likewise.
206         (create_coalesce_list): Initialize obstack.
207         (delete_coalesce_list): Free obstack.
208         (find_coalesce_pair): Obstack-allocate coalesce pairs.
209         (add_cost_one_coalesce): Likewise.
210         (struct live_track): Remove bitmap pointer indirections.
211         (new_live_track): Adjust.
212         (delete_live_track): Likewise.
213         (live_track_remove_partition): Likewise.
214         (live_track_add_partition): Likewise.
215         (live_track_live_p): Likewise.
216         (live_track_process_def): Likewise.
217         (live_track_clear_base_vars): Likewise.
219 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
221         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
222         * configure: Regenerate.
223         * config.in: Regenerate.
224         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
225         HAVE_AS_REGISTER_PSEUDO_OP guard.
226         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
227         !HAVE_AS_REGISTER_PSEUDO_OP support.
228         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
229         guard.
231 2018-11-02  Richard Biener  <rguenther@suse.de>
233         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
234         with is_type_die.
236 2018-11-02  Richard Biener  <rguenther@suse.de>
238         PR tree-optimization/87776
239         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
240         executable when iterating but running into rpo-vn-max-loop-depth
241         and not eliding the iteration.
243 2018-11-30  Jan Hubicka  <jh@suse.cz>
245         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
246         TYPE_DECL.
248 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
250         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
251         prototype.
252         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
253         Combine with rs6000_address_for_fpconvert.
254         (rs6000_address_for_fpconvert): Combine with
255         rs6000_force_indexed_or_indirect_mem.
256         (rs6000_expand_vector_init): Change function call from
257         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
258         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
259         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
260         (floatsi<mode>2_lfiwax_mem): Ditto.
261         (floatunssi<mode>2_lfiwzx): Ditto.
262         (floatunssi<mode>2_lfiwzx_mem): Ditto.
263         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
264         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
265         (fix_trunc<mode>si2_stfiwx): Ditto.
266         (fixuns_trunc<mode>si2_stfiwx): Ditto.
267         (float_<mode>si2_hw): Ditto.
268         (floatuns_<mode>si2_hw): Ditto.
269         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
270         (vsx_splat_<mode>): Ditto.
272 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
274         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
275         at end of assembler input text.
276         * configure: Regenerate.
278 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
280         PR tree-optimization/87826
281         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
282         negative or larger or equal to type's precision.
284 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
286         * opts.c (default_options_table): Do not enable
287         OPT_fdelayed_branch at -Og.
288         * doc/invoke.texi (-fdelayed-branch): Document it.
290 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
292         * optabs-libfuncs.c (build_libfunc_function_visibility):
293         New, split out from...
294         (build_libfunc_function): ... here.
295         (init_one_libfunc_visibility): New, split out from ...
296         (init_one_libfunc): ... here.
298         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
299         scratch register need not be early-clobber.  Document the reason
300         why we cannot use ST<OP>.
302 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
304         PR bootstrap/82856
305         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
306         line for second argument of AC_DEFINE_UNQUOTED.
307         * doc/install.texi (Tools/packages necessary for modifying GCC):
308         Update to autoconf 2.69 and automake 1.15.1.
309         * aclocal.m4, config.in, configure: Regenerate.
311 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
313         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
314         initialization.
316 2018-10-31  Martin Liska  <mliska@suse.cz>
318         PR driver/83193
319         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
320         Add new argument invalid_extension.
321         (aarch64_get_all_extension_candidates): New function.
322         (aarch64_rewrite_selected_cpu): Add NULL to function call.
323         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
324         new argument.
325         (aarch64_get_all_extension_candidates): New function.
326         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
327         argument invalid_extension.
328         (aarch64_parse_cpu): Likewise.
329         (aarch64_print_hint_for_extensions): New function.
330         (aarch64_validate_mcpu): Provide hint about invalid extension.
331         (aarch64_validate_march): Likewise.
332         (aarch64_handle_attr_arch): Pass new argument.
333         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
334         (aarch64_handle_attr_isa_flags): Likewise.
336 2018-10-31  Richard Biener  <rguenther@suse.de>
338         PR middle-end/70359
339         PR middle-end/86270
340         * tree-outof-ssa.c (insert_backedge_copies): Restrict
341         copy generation to useful cases.  Place the copy before
342         the definition of the backedge value when possible.
344 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
346         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
347         * config/arc/arc.c (arc_active_insn): New function.
348         (check_store_cacheline_hazard): Likewise.
349         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
350         (arc_override_options): Disable delay slot scheduler for older
351         A7.
352         (arc_store_addr_hazard_p): New implementation, old one renamed to
353         ...
354         (arc_store_addr_hazard_internal_p): Renamed.
355         (arc_reorg): Don't combine into brcc instructions which are part
356         of hardware hazard solution.
357         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
358         (tune_arc700): Likewise.
359         * config/arc/arc.opt (arc7xx): New tune value.
360         * config/arc/arc700.md: Improve A7 scheduler.
362 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
364         * config/arc/arc.c (arc_override_options): Remove
365         TARGET_COMPACT_CASESI.
366         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
367         (CASE_VECTOR_MODE): Likewise.
368         (CASE_VECTOR_PC_RELATIVE): Likewise.
369         (CASE_VECTOR_SHORTEN_MODE): Likewise.
370         (CASE_VECTOR_SHORTEN_MODE1): Delete.
371         (ADDR_VEC_ALIGN): Update.
372         (ASM_OUTPUT_CASE_LABEL): Undefine.
373         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
374         (TARGET_BI_BIH): Define.
375         (DEFAULT_BRANCH_INDEX): Likewise.
376         * config/arc/arc.md (casesi): Rework to accept BI/BIH
377         instructions, remove compact_casesi use case.
378         (casesi_compact_jump): Remove.
379         (casesi_dispatch): New pattern.
380         * config/arc/arc.opt: Add mbranch-index option. Deprecate
381         compact_casesi option.
382         * doc/invoke.texi: Document mbranch-index option.
384 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
386         * config/arc/arc.c (arc_get_tp): Remove function.
387         (arc_emit_call_tls_get_addr): Likewise.
388         (arc_call_tls_get_addr): New function.
389         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
390         * config/arc/arc.md (tls_load_tp_soft): Remove.
391         (tls_gd_get_addr): Likewise.
393 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
395         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
396         (mulsi3_600_lib): Remove pattern.
397         (umulsi3_highpart_600_lib_le): Likewise.
398         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
399         (umulsidi3): Remove call to umulsidi3_600_lib.
400         (umulsidi3_600_lib): Remove pattern.
401         (peephole2): Remove peephole using the above deprecated patterns.
403 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
405         PR target/87374
406         * config/arm/arm.c (arm_option_check_internal): Disable the combined
407         use of -mslow-flash-data and -mword-relocations.
408         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
409         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
410         flag_pic.
411         * doc/invoke.texi (-mword-relocations): Mention conflict with
412         -mslow-flash-data.
413         (-mslow-flash-data): Reciprocally.
415 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
417         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
418         16-byte modes held in GP registers to use an even regno.
420         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
421         (aarch64_atomic_ldop_supported_p): Remove.
422         (aarch64_gen_atomic_ldop): Remove.
423         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
424         Fully expand LSE operations here.
425         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
426         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
427         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
428         and use ATOMIC_LDOP instead; use register_operand for the input;
429         drop the split and emit insns directly.
430         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
431         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
432         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
434         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
435         (aarch64_gen_atomic_ldop): Don't call it.
436         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
437         Use aarch64_reg_or_zero.
438         (aarch64_atomic_exchange<ALLI>): Likewise.
439         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
440         operand 0; use aarch64_reg_or_zero for input; merge ...
441         (@aarch64_atomic_swp<ALLI>): ... this and remove.
443         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
444         (aarch64_split_compare_and_swap): Use it.
445         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
446         test oldval against the proper predicate.
447         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
448         Use nonmemory_operand for expected.
449         (cas_short_expected_pred): New.
450         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
451         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
452         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
453         (aarch64_plushi_operand): New.
455         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
456         Force oldval into the rval register for TARGET_LSE; emit the compare
457         during initial expansion so that it may be deleted if unused.
458         (aarch64_gen_atomic_cas): Remove.
459         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
460         Change =&r to +r for operand 0; use match_dup for operand 2;
461         remove is_weak and mod_f operands as unused.  Drop the split
462         and merge with...
463         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
464         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
465         (@aarch64_atomic_cas<GPI>): Similarly.
467 2018-10-31  Richard Biener  <rguenther@suse.de>
469         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
470         using ABSU_EXPR.
472 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
474         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
475         * config/aarch64/aarch64.md: Include saphira.md
476         * config/aarch64/saphira.md: New file for pipeline description.
478 2018-10-30  Martin Sebor  <msebor@redhat.com>
480         PR middle-end/87041
481         * gimple-ssa-sprintf.c (format_directive): Use %G to include
482         inlining context.
483         (sprintf_dom_walker::compute_format_length):
484         Avoid setting POSUNDER4K here.
485         (get_destination_size): Handle null argument values.
486         (get_user_idx_format): New function.
487         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
488         functions, including user-defined with attribute format printf.
489         Use %G to include inlining context.
490         Set POSUNDER4K here.
492 2018-10-30  Jan Hubicka  <jh@suse.cz>
494         * params.def (lto-partitions): Bump from 32 to 128.
496 2018-10-30  Jan Hubicka  <jh@suse.cz>
498         * tree.c
499         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
500         head in file.
501         (free_lang_data_in_type): Forward declare.
502         (fld_type_variant_equal_p): New function.
503         (fld_type_variant): New function
504         (fld_incomplete_types): New hash.
505         (fld_incomplete_type_of): New function
506         (fld_simplfied-type): New function.
507         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
508         (free_lang_data): Allocate and free fld_incomplete_type; update call
509         of free_lang_data_in_decl.
511 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
513         * gcov.c (output_lines): Remove duplicate line.
515 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
517         * config/rs6000/rs6000.md (bswapdi2): Force address into register
518         if not in indexed or indirect form.
519         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
520         (bswapdi2_store): Ditto.
521         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
522         helper function.
523         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
524         Prototype for helper function.
526 2018-10-30  Martin Sebor  <msebor@redhat.com>
528         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
529         (target, pragma GCC optimize, pragma GCC target): Ditto.
531 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
533         * doc/extend.texi: Fix prototype and description of
534         __builtin_expect_with_probability.
536 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
538         * cgraph.h (clone_function_name_1): Replaced by new
539           clone_function_name_numbered that takes name as string; for
540           privatize_symbol_name_1 use only.
541           (clone_function_name): Renamed to
542           clone_function_name_numbered to be explicit about numbering.
543           (clone_function_name): New two-argument function that does
544           not number its output.
545           (clone_function_name): New three-argument function that
546           takes a number to append to its output.
547         * cgraphclones.c (duplicate_thunk_for_node):
548           (clone_function_name_1): Renamed.
549           (clone_function_name_numbered): Two new functions.
550           (clone_function_name): Improved documentation.
551           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
552         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
553         * final.c (final_scan_insn_1): Use the new clone_function_name
554           without numbering.
555         * multiple_target.c (create_dispatcher_calls): Ditto.
556           (create_target_clone): Ditto.
557         * omp-expand.c (grid_expand_target_grid_body): Ditto.
558         * omp-low.c (create_omp_child_function_name): Ditto.
559         * omp-simd-clone.c (simd_clone_create): Ditto.
560         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
561           new clone_function_name without numbering.
563 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
565         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
566         Assert that the allocation size is not zero.
568 2018-10-30  Richard Biener  <rguenther@suse.de>
570         PR tree-optimization/87800
571         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
572         non-induction or reduction PHIs.
574 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
576         * config/aarch64/falkor-tag-collision-avoidance.c
577         (execute_tag_collision_avoidance): Call df_note_add_problem.
579 2018-10-30  Martin Liska  <mliska@suse.cz>
581         * doc/extend.texi: Fix typo in documentation
582         of __builtin_expect_with_probability.
584 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
586         PR c++/87721
587         * input.c (get_substring_ranges_for_loc): Detect if
588         linemap_resolve_location gives us a NULL map, and reject
589         this case.
591 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
593         * config.gcc (xstormy16-*-elf): Set tm_d_file.
595 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
596             Martin Sebor  <msebor@redhat.com>
597             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
599         * doc/ux.texi (Quoting): New subsection, adapted from material at
600         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
601         MartinSebor and ManuelLopezIbanez.
602         (Fix-it hints): Note that fix-it hints shouldn't be marked for
603         translation.
605 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
607         PR middle-end/87469
608         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
609         max value.
611 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
613         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
615 2018-10-29  Paul Koning  <ni1d@arrl.net>
617         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
619 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
621         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
622         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
623         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
624         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
625         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
626         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
627         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
628         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
629         Change 'vector' to '__vector'.
630         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
631         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
632         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
633         _mm_avg_pu16): Likewise.  And, whitespace corrections.
635 2018-10-29  Richard Biener  <rguenther@suse.de>
637         PR tree-optimization/87785
638         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
639         internal defs.
641 2018-10-29  Olivier Hainque  <hainque@adacore.com>
643         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
645 2018-10-29  Olivier Hainque  <hainque@adacore.com>
647         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
648         ports configuration macro, defaults to "gnu".
649         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
650         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
652 2018-10-29  Olivier Hainque  <hainque@adacore.com>
654         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
656 2018-10-29  Richard Biener  <rguenther@suse.de>
658         PR tree-optimization/87790
659         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
660         (vect_make_slp_decision): Adjust.
661         (vect_slp_analyze_bb_1): Likewise.
662         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
663         edges.
665 2018-10-29  Richard Biener  <rguenther@suse.de>
667         PR tree-optimization/87785
668         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
669         and processing.
670         (vect_build_slp_tree): Likewise.
671         (vect_gather_slp_loads): New function.
672         (vect_analyze_slp_instance): Gather loads separately from the
673         SLP tree build.
675 2018-10-29  Martin Liska  <mliska@suse.cz>
677         * Makefile.in: Make dependency to json.o.
678         * doc/gcov.texi: Document new JSON format, remove
679         old intermediate format documentation.
680         * gcov.c (struct function_info): Come up with m_name and
681         m_demangled_name.
682         (function_info::function_info): Initialize it.
683         (function_info::~function_info): Release it.
684         (main): Rename flag_intermediate_format to flag_json_format.
685         (print_usage): Describe --json-format.
686         (process_args): Set flag_json_format.
687         (output_intermediate_line): Remove.
688         (output_intermediate_json_line): Likewise.
689         (get_gcov_intermediate_filename): Return new extension
690         ".gcov.json.gz".
691         (output_intermediate_file): Implement JSON emission.
692         (output_json_intermediate_file): Implement JSON emission.
693         (generate_results): Use ::get_name for function name.
694         Handle JSON output file.
695         (read_graph_file): Use ::get_name instead of cplus_demangle.
696         (read_count_file): Likewise.
697         (solve_flow_graph): Likewise.
698         (add_line_counts): Likewise.
699         (accumulate_line_counts): Use new flag_json_format.
700         (output_function_details): Use ::get_name instead of cplus_demangle.
701         (output_lines): Likewise.
702         * json.cc (test_writing_literals): Add new tests.
703         * json.h (class literal): Add new boolean constructor.
705 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
707         PR rtl-optimization/87701
708         PR rtl-optimization/87780
709         * combine.c (make_more_copies): Rewrite.
711 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
713         * doc/generic.texi (ABSU_EXPR): Document.
714         * match.pd (absu(x)*absu(x) -> x*x): Handle.
715         (absu(absu(X)) -> absu(X)): Likewise.
716         (absu(-X) -> absu(X)): Likewise.
717         (absu(X)  where X is nonnegative -> X): Likewise.
719 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
721         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
722         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
723         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
724         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
725         (s-tm-texi): Also check timestamp on d-target.def.
726         (generated_files): Add TM_D_H and d-target-hooks-def.h.
727         (build/genhooks.o): Also depend on D_TARGET_DEF.
728         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
729         variables.
730         * config/aarch64/aarch64-d.c: New file.
731         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
732         Define.
733         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
734         prototype.
735         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
736         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
737         * config/arm/arm-d.c: New file.
738         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
739         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
740         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
741         * config/arm/t-arm (arm-d.o): New rule.
742         * config/default-d.c: New file.
743         * config/glibc-d.c: New file.
744         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
745         * config/i386/i386-d.c: New file.
746         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
747         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
748         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
749         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
750         * config/i386/t-i386 (i386-d.o): New rule.
751         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
752         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
753         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
754         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
755         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
756         * config/mips/mips-d.c: New file.
757         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
758         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
759         * config/mips/t-mips (mips-d.o): New rule.
760         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
761         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
762         * config/powerpcspe/powerpcspe-d.c: New file.
763         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
764         New prototype.
765         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
766         Support GNU D by using 0 as the language type.
767         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
768         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
769         * config/riscv/riscv-d.c: New file.
770         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
771         prototype.
772         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
773         * config/riscv/t-riscv (riscv-d.o): New rule.
774         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
775         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
776         * config/rs6000/rs6000-d.c: New file.
777         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
778         prototype.
779         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
780         Support GNU D by using 0 as the language type.
781         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
782         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
783         * config/s390/s390-d.c: New file.
784         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
785         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
786         * config/s390/t-s390 (s390-d.o): New rule.
787         * config/sparc/sparc-d.c: New file.
788         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
789         prototype.
790         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
791         * config/sparc/t-sparc (sparc-d.o): New rule.
792         * config/t-glibc (glibc-d.o): New rule.
793         * configure: Regenerated.
794         * configure.ac (tm_d_file): New variable.
795         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
796         * doc/contrib.texi (Contributors): Add self for the D frontend.
797         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
798         * doc/install.texi (Configuration): Mention libphobos as an option for
799         --enable-shared.  Mention d as an option for --enable-languages.
800         (Testing): Mention check-d as a target.
801         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
802         name suffixes.  Mention d as a -x option.
803         * doc/sourcebuild.texi (Top Level): Mention libphobos.
804         * doc/standards.texi (Standards): Add section on D language.
805         * doc/tm.texi: Regenerated.
806         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
807         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
808         * dwarf2out.c (is_dlang): New function.
809         (gen_compile_unit_die): Use DW_LANG_D for D.
810         (declare_in_namespace): Return module die for D, instead of adding
811         extra declarations into the namespace.
812         (gen_namespace_die): Generate DW_TAG_module for D.
813         (gen_decl_die): Handle CONST_DECLSs for D.
814         (dwarf2out_decl): Likewise.
815         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
816         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
817         kinds of aggregates.
818         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
819         * genhooks.c: Include d/d-target.def.
821 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
823         PR target/85669
824         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
825         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
826         (STACK_DYNAMIC_OFFSET): Likewise.
828 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
830         PR target/80024
831         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
832         error message.
834 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
836         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
837         return type and other typos.
839 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
841         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
842         a shorter sequence with fewer branches.
843         (emit_final_str_compare_gpr): Ditto.
845 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
847         * config/rs6000/tmmintrin.h: New file.
848         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
850 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
852         * config/rs6000/mmintrin.h: Enable 32bit compilation.
853         * config/rs6000/xmmintrin.h: Likewise.
855 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
857         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
859 2018-10-26  Richard Biener  <rguenther@suse.de>
861         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
862         and wrapper.
863         (vect_mark_slp_stmts_relevant): Likewise.
864         (vect_detect_hybrid_slp_stmts): Likewise.
865         (vect_bb_slp_scalar_cost): Likewise.
866         (vect_remove_slp_scalar_calls): Likewise.
868 2018-10-26  Jan Hubicka  <jh@suse.cz>
870         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
871         (warn_types_mismatch): Fix walk of DECL_NAME.
872         (odr_types_equivalent_p): Fix overactive assert.
874 2018-10-26  Richard Biener  <rguenther@suse.de>
876         PR tree-optimization/87105
877         * tree-vectorizer.h (_slp_tree::refcnt): New member.
878         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
879         refcnt.
880         (vect_create_new_slp_node): Initialize refcnt to one.
881         (bst_traits): Move.
882         (scalar_stmts_set_t, bst_fail): Remove.
883         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
884         (vect_build_slp_tree): Add bst_map argument and lookup
885         already created SLP nodes.
886         (vect_print_slp_tree): Handle a SLP graph, print SLP node
887         addresses.
888         (vect_slp_rearrange_stmts): Handle a SLP graph.
889         (vect_analyze_slp_instance): Adjust and free SLP nodes from
890         the CSE map.  Fix indenting.
891         (vect_schedule_slp_instance): Add short-cut.
893 2018-10-26  Martin Liska  <mliska@suse.cz>
895         PR testsuite/86158
896         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
897         addr_expr and not with pointers.
899 2018-10-26  Jan Hubicka  <jh@suse.cz>
901         * tree.c (free_lang_data_in_type): Only check main variants.
902         * ipa-devirt.c (warn_odr): Make static.
903         (types_same_for_odr): Drop strict variant.
904         (types_odr_comparable): Likewise.
905         (odr_or_derived_type_p): Look for main variants.
906         (odr_name_hasher::equal): Cleanup comment.
907         (odr_subtypes_equivalent): Add warn and warned arguments; check main
908         variants.
909         (type_variants_equivalent_p): break out from ...
910         (odr_types_equivalent): ... here; go for main variants where needed.
911         (warn_odr): ... here; turn static.
912         (warn_types_mismatch): Compare mangled names of main variants.
913         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
914         (type_with_linkage_p): Sanity check that we look at main variant.
915         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
916         * tree.h (types_same_for_odr): Drop strict argument.
918 2018-10-26  Richard Biener  <rguenther@suse.de>
920         PR tree-optimization/87746
921         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
922         Simplify and fix WRT strided store groups with size not
923         equal to step in element count.
924         (vect_analyze_group_access_1): Dump the whole group.
926 2018-10-25  Carl Love  <cel@us.ibm.com>
928         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
929         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
930         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
931         precicion entry for each overloaded builtin.
932         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
933         VSCEDPUO): Rename overloaded name.
934         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
935         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
936         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
937         define_expand for xscmpexqp instruction.
938         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
940 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
941             Jinsong Ji <jji@us.ibm.com>
943         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
944         function with vec_sl.
945         (_mm_slli_epi32): Likewise.
946         (_mm_slli_epi64): Likewise.
947         (_mm_srai_epi16): Replace deprecated function with vec_sra.
948         (_mm_srai_epi32): Likewise.
949         (_mm_srli_epi16): Replace deprecated function with vec_sr.
950         (_mm_srli_epi32): Likewise.
951         (_mm_srli_epi64): Likewise.
952         (_mm_sll_epi16): Replace deprecated function with vec_sl.
953         (_mm_sll_epi32): Likewise.
954         (_mm_sll_epi64): Likewise.
955         (_mm_sra_epi16): Replace deprecated function with vec_sra.
956         (_mm_sra_epi32): Likewise.
957         (_mm_srl_epi16): Replace deprecated function with vec_sr.
958         (_mm_srl_epi32): Likewise.
959         (_mm_srl_epi64): Likewise.
961 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
962             Jinsong Ji <jji@us.ibm.com>
964         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
965         comparison operators with vec_cmp* for compatibility due to
966         unfortunate history; clean up formatting and use types more
967         appropriately.
968         (_mm_sll_epi32): Likewise.
969         (_mm_sll_epi64): Likewise.
970         (_mm_srl_epi16): Likewise.
971         (_mm_srl_epi32): Likewise.
972         (_mm_srl_epi64): Likewise.
974 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
975             Jinsong Ji <jji@us.ibm.com>
977         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
978         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
979         __vector __bool int.  Use vec_cmpgt in preference to deprecated
980         function vec_vcmpgtfp.
981         (_mm_max_ps): Likewise.
983 2018-10-25  Jeff Law  <law@redhat.com>
985         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
986         if returning false.
988 2018-10-25  Martin Sebor  <msebor@redhat.com>
990         * doc/extend.texi (aligned): Expand attribute description.
991         (Alignment): Rename section.  Discuss function arguments.
993 2018-10-25  Jan Hubicka  <jh@suse.cz>
995         * ipa-devirt.c (main_odr_variant): Remove.
996         (hash_odr_name, types_same_for_odr, types_odr_comparable,
997         odr_name_hasher::equal, odr_subtypes_equivalent_p):
998         Drop use of main_odr_variant.
999         (add_type_duplicate): Silence confused warnings on integer types.
1000         (get_odr_type): Always look for main variant.
1001         (register_odr_type): Simplify.
1003 2018-10-25  Richard Biener  <rguenther@suse.de>
1005         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
1006         Initialize ng to silence error with release checking bootstrap.
1008 2018-10-25  Richard Biener  <rguenther@suse.de>
1010         * tree-if-conv.c: Include tree-ssa-sccvn.h.
1011         (tree_if_conversion): Run CSE on the if-converted loop body.
1013 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
1015         * config/s390/constraints.md (ZL): New constraint.
1016         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
1017         operands.
1018         * config/s390/s390.md (movdi_larl): Remove.
1019         (movdi_64): Add the LARL alternative.
1021 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
1023         PR bootstrap/87747
1024         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
1025         (RTX_CODE_HWINT_P): New macro.
1026         (rtx_code_size): Use RTX_CODE_HWINT_P ().
1028 2018-10-25  Jan Hubicka  <jh@suse.cz>
1030         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
1031         is anonymous.
1033 2018-10-25  Richard Biener  <rguenther@suse.de>
1035         PR tree-optimization/87665
1036         PR tree-optimization/87745
1037         * tree-vectorizer.h (get_earlier_stmt): Remove.
1038         (get_later_stmt): Pick up UID from the original non-pattern stmt.
1040 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
1042         * options.texi (Deprecated): Move list to Var section.
1044 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
1045             Jinsong Ji <jji@us.ibm.com>
1047         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
1048         __vector long to __vector long long.
1049         (_mm_cvtpd_ps): Likewise.
1050         (_mm_cvttpd_epi32): Likewise.
1051         (_mm_cvtpi32_pd): Likewise.
1052         (_mm_unpackhi_epi64): Likewise.
1053         (_mm_unpacklo_epi64): Likewise.
1055 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
1057         PR rtl-optimization/87720
1058         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
1060 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
1062         * gimple-ssa-isolate-paths.c
1063         (find_implicit_erroneous_behavior): Do not change code if the
1064         pass is running for warnings only.
1065         (find_explicit_erroneous_behavior): Likewise.
1067 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
1069         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
1070         Define as rs6000_mangle_decl_assembler_name.
1071         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
1072         long double to IEEE long double, switch the names of the long
1073         double built-in functions to be <func>f128 instead of <func>l.
1075 2018-10-24  Martin Sebor  <msebor@redhat.com>
1077         * doc/extend.texi (nonnull): List no-argument form.  Reference
1078         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
1080 2018-10-24  Richard Biener  <rguenther@suse.de>
1082         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
1084 2018-10-24  Martin Liska  <mliska@suse.cz>
1086         PR tree-optimization/84436
1087         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
1088         Remove.
1089         (switch_conversion::contains_linear_function_p): New.
1090         (switch_conversion::build_one_array): Support linear
1091         transformation on input.
1092         * tree-switch-conversion.h (struct switch_conversion): Add
1093         contains_linear_function_p declaration.
1095 2018-10-24  Richard Biener  <rguenther@suse.de>
1097         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
1098         if its argument is CONSTANT_CLASS_P.
1100 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
1102         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
1103         it is wrong for forward declarations.
1105 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1107         * config/s390/s390.c (s390_check_qrst_address): Add the missing
1108         SYMBOL_REF_P () check.
1110 2018-10-24  Richard Biener  <rguenther@suse.de>
1112         PR tree-optimization/87105
1113         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
1114         dump classification.
1115         (vect_analyze_data_ref_accesses): Handle duplicate loads and
1116         stores by splitting the affected group after the fact.
1117         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
1118         fail the SLP build because of size constraints.
1120 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1122         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
1123         * configure: Regenerate.
1124         * config.in: Regenerate.
1125         * varasm.c (mergeable_string_section): Use readonly_data_section
1126         if linker doesn't support SHF_MERGE with alignment > 8.
1127         (mergeable_constant_section): Likewise.
1129 2018-10-24  Richard Biener  <rguenther@suse.de>
1131         PR tree-optimization/84013
1132         * tree-ssa-structalias.c (struct msdi_data): New struct for
1133         marshalling data to walk_stmt_load_store_ops.
1134         (maybe_set_dependence_info): Refactor as callback for
1135         walk_stmt_load_store_ops.
1136         (compute_dependence_clique): Set restrict info on all stmt kinds.
1138 2018-10-24  Martin Liska  <mliska@suse.cz>
1140         * cgraph.c (cgraph_node::dump):
1141         Remove reduntant dumps and make tp_first_run dump more compact.
1143 2018-10-24  Richard Biener  <rguenther@suse.de>
1145         PR tree-optimization/87665
1146         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
1147         to reflect reality.
1149 2018-10-12  Jeff Law  <law@redhat.com>
1151         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
1152         for H8/S.
1154 2018-10-23  Richard Biener  <rguenther@suse.de>
1156         * tree-vrp.c (add_assert_info): Guard dump_printf with
1157         dump_enabled_p.
1158         * gimple-ssa-evrp-analyze.c
1159         (evrp_range_analyzer::record_ranges_from_incoming_edge):
1160         Use value_range::ignore_equivs_equal_p.
1162 2018-10-23  Richard Biener  <rguenther@suse.de>
1164         PR tree-optimization/87105
1165         PR tree-optimization/87608
1166         * passes.def (pass_all_early_optimizations): Add early phi-opt
1167         after dce.
1168         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
1169         addition to debug stmts.
1170         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
1171         and abs replacement early.
1172         * tree-cfg.c (gimple_empty_block_p): Likewise.
1174 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
1176         PR target/86383
1177         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
1178         specified to configure.
1179         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
1181 2018-10-23  Richard Biener  <rguenther@suse.de>
1183         PR tree-optimization/87700
1184         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
1186 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
1188         PR target/87674
1189         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
1190         second argument from __mmask16 to __mmask8.
1191         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
1192         _mm_mask_packs_epi32): Likewise.
1193         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
1194         Likewise.
1195         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
1197 2018-10-23  Richard Biener  <rguenther@suse.de>
1199         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
1201 2018-10-23  Richard Biener  <rguenther@suse.de>
1203         PR tree-optimization/86144
1204         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
1205         over simd attribute.
1207 2018-10-23  Richard Biener  <rguenther@suse.de>
1209         PR tree-optimization/87693
1210         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
1211         the case we do not find the taken edge.
1213 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
1214             Jinsong Ji  <jji@us.ibm.com>
1216         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
1217         (_mm_store_pd): Use unaligned vector type for pointer cast.
1218         (_mm_maskmoveu_si128): Likewise.
1219         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
1220         (_mm_store_ps): Use unaligned vector type for pointer cast.
1222 2018-10-22  Paul Koning  <ni1d@arrl.net>
1224         * symtab.c (symtab_node::increase_alignment): Correct max
1225         alignment check.
1227 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
1229         PR tree-optimization/87633
1230         * match.pd: Do not generate unordered integer comparisons.
1232 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
1234         PR rtl-optimization/87600
1235         * combine.c: Add include of expr.h.
1236         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
1237         register to a pseudo.
1238         (make_more_copies): New function, add a copy to a new pseudo after
1239         the moves from hard registers into pseudos.
1240         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
1241         later.  Call make_more_copies.
1243 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
1245         * lra-constraints.c (process_alt_operands): New local array,
1246         matching_early_clobber.  Check matching_early_clobber before
1247         decrementing reject, and set matching_early_clobber after.
1249 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
1251         PR target/87598
1252         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
1253         call output_addr_const and hope for the best.
1255 2018-10-22  Richard Biener  <rguenther@suse.de>
1257         * gimple-ssa-evrp-analyze.c
1258         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
1259         smarter about what ranges to use.
1260         * tree-vrp.c (add_assert_info): Dump here.
1261         (register_edge_assert_for_2): Instead of here at multiple but
1262         not all places.
1264         * gcc.dg/tree-ssa/evrp12.c: New testcase.
1265         * gcc.dg/predict-6.c: Adjust.
1266         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
1267         * gcc.dg/tree-ssa/vrp02.c: Likewise.
1268         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
1270 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
1271         Richard Biener  <rguenther@suse.de>
1273         * bitmap.h: Update data structure documentation, including a
1274         description of bitmap views as either linked-lists or splay trees.
1275         (struct bitmap_element_def): Update comments for splay tree bitmaps.
1276         (struct bitmap_head_def): Likewise.
1277         (bitmap_list_view, bitmap_tree_view): New prototypes.
1278         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
1279         tree_form fields.
1280         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
1281         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
1282         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1283         released bitmap element here.
1284         (bitmap_element_free): Remove.
1285         (bitmap_elt_clear_from): Work on splay tree bitmaps.
1286         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
1287         this function similar ones such that linked-list bitmap implementation
1288         functions are grouped.
1289         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1290         and moved for grouping.
1291         (bitmap_list_insert_element_after): Renamed from
1292         bitmap_elt_insert_after, and moved for grouping.
1293         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1294         (bitmap_tree_link_left, bitmap_tree_link_right,
1295         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1296         bitmap_tree_link_element, bitmap_tree_unlink_element,
1297         bitmap_tree_find_element): New functions for splay-tree bitmap
1298         implementation.
1299         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1300         Renamed and moved, see above entries.
1301         (bitmap_tree_listify_from): New function to convert part of a splay
1302         tree bitmap to a linked-list bitmap.
1303         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1304         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1305         (bitmap_find_bit): Remove.
1306         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1307         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1308         Handle splay tree bitmaps.
1309         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1310         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1311         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1312         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1313         bitmap_intersect_compl_p, bitmap_ior_and_compl,
1314         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1315         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
1316         corresponding changes to use linked-list specific bitmap_element
1317         manipulation functions as applicable for efficiency.
1318         (bitmap_tree_to_vec): New function.
1319         (debug_bitmap_elt_file): New function split out from ...
1320         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
1321         (bitmap_print): Likewise.
1323         PR tree-optimization/63155
1324         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1325         SSA edge worklists.
1326         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1327         in tree-view.
1329 2018-10-22  Martin Liska  <mliska@suse.cz>
1331         PR tree-optimization/87686
1332         Revert
1333         2018-08-29  Martin Liska  <mliska@suse.cz>
1335         * tree-switch-conversion.c (switch_conversion::expand):
1336         Strenghten assumption about gswitch statements.
1338 2018-10-22  Martin Liska  <mliska@suse.cz>
1340         * ipa-icf.c (sem_item::compare_attributes): Remove.
1341         (sem_item::compare_referenced_symbol_properties): Use
1342         attribute_list_equal instead.
1343         (sem_function::equals_wpa): Likewise.
1344         * ipa-icf.h: Remove compare_attributes.
1346 2018-10-22  Richard Biener  <rguenther@suse.de>
1348         PR middle-end/87682
1349         * mem-stats.h (mem_usage::operator==): Fix pasto.
1351 2018-10-22  Richard Biener  <rguenther@suse.de>
1353         PR tree-optimization/87640
1354         * tree-vrp.c (set_value_range_with_overflow): Decompose
1355         incomplete result.
1356         (extract_range_from_binary_expr_1): Adjust.
1358 2018-10-22  Martin Jambor  <mjambor@suse.cz>
1360         * tree-eh.h (stmt_could_throw_p): Add function parameter.
1361         (stmt_can_throw_external): Likewise.
1362         (stmt_can_throw_internal): Likewise.
1363         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1364         (lower_eh_constructs_2): Likewise.
1365         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1366         (stmt_can_throw_external): Likewise.
1367         (stmt_can_throw_internal): Likewise.
1368         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1369         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1370         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1371         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1372         (pass_lower_eh_dispatch::execute): Pass cfun to
1373         stmt_can_throw_external.
1374         (cleanup_empty_eh): Likewise.
1375         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1376         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1377         stmt_can_throw_external instead of pushing it to cfun.
1378         (symbol_table::create_edge): Likewise.
1379         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1380         stmt_can_throw_internal.
1381         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1382         to stmt_could_throw_p.
1383         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1384         stmt_can_throw_internal.
1385         (pass_store_merging::execute): Likewise.
1386         * gimple-ssa-strength-reduction.c
1387         (find_candidates_dom_walker::before_dom_children): Pass cfun to
1388         stmt_could_throw_p.
1389         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1390         stmt_can_throw_internal.
1391         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1392         to stmt_can_throw_external.
1393         (check_stmt): Pass cfun to stmt_could_throw_p.
1394         (check_stmt): Pass cfun to stmt_can_throw_external.
1395         (pass_nothrow::execute): Likewise.
1396         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1397         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1398         stmt_can_throw_internal.
1399         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1400         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1401         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1402         * tree-complex.c (expand_complex_libcall): Pass cfun to
1403         stmt_could_throw_p and to stmt_can_throw_internal.
1404         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1405         * tree-inline.c (copy_edges_for_bb): Likewise.
1406         (maybe_move_debug_stmts_to_successors): Likewise.
1407         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1408         stmt_could_throw_p.
1409         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1410         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1411         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1412         stmt_can_throw_internal.
1413         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1414         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1415         stmt_could_throw_p.
1416         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1417         stmt_can_throw_internal.
1418         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1419         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1420         stmt_could_throw_p.
1421         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1422         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1423         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1424         (convert_mult_to_fma_1): Likewise.
1425         (convert_to_divmod): Likewise.
1426         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1427         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1428         * tree-ssa-propagate.c
1429         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1430         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1431         (maybe_optimize_range_tests): Likewise.
1432         (linearize_expr_tree): Likewise.
1433         (reassociate_bb): Likewise.
1434         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1435         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1436         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1437         (handle_char_store): Likewise.
1438         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1439         stmt_can_throw_internal.
1440         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1441         stmt_could_throw_p.
1442         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1443         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1444         (vectorizable_simd_clone_call): Likewise.
1445         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1446         (gimple_stringop_fixed_value): Likewise.
1448 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
1450         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1451         literal pool references.
1452         (s390_check_qrst_address): Adapt to the new behavior of
1453         s390_loadrelative_operand_p ().
1455 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
1457         PR target/72782
1458         * config/i386/sse.md (*andnot<mode>3_bcst): New.
1460 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
1462         PR target/72782
1463         * config/i386/sse.md (*<code><mode>3_bcst): New.
1465 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
1467         PR target/72782
1468         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1469         V4DI, V16SI and V8DI.
1470         (*sub<mode>3<mask_name>_bcst): New.
1471         (*add<mode>3<mask_name>_bcst): Likewise.
1473 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
1474             Jinsong Ji  <jji@us.ibm.com>
1476         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1477         __m64 with __vector unsigned long long for compatibility.
1478         (_mm_movemask_epi8): Likewise.
1479         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1480         (_mm_cvttps_pi32): Likewise.
1481         (_mm_cvtpi32_ps): Likewise.
1482         (_mm_cvtps_pi16): Likewise.
1483         (_mm_loadh_pi): Likewise.
1484         (_mm_storeh_pi): Likewise.
1485         (_mm_movehl_ps): Likewise.
1486         (_mm_movelh_ps): Likewise.
1487         (_mm_loadl_pi): Likewise.
1488         (_mm_storel_pi): Likewise.
1489         (_mm_movemask_ps): Likewise.
1490         (_mm_shuffle_pi16): Likewise.
1492 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1494         PR target/72782
1495         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1496         __builtin_ia32_vfnmsubpd512_mask.
1497         (_mm512_mask_fnmsub_round_pd): Likewise.
1498         (_mm512_fnmsub_pd): Likewise.
1499         (_mm512_mask_fnmsub_pd): Likewise.
1500         (_mm512_maskz_fnmsub_round_pd): Use
1501         __builtin_ia32_vfnmsubpd512_maskz.
1502         (_mm512_maskz_fnmsub_pd): Likewise.
1503         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1504         (_mm512_mask_fnmsub_round_ps): Likewise.
1505         (_mm512_fnmsub_ps): Likewise.
1506         (_mm512_mask_fnmsub_ps): Likewise.
1507         (_mm512_maskz_fnmsub_round_ps): Use
1508         __builtin_ia32_vfnmsubps512_maskz.
1509         (_mm512_maskz_fnmsub_ps): Likewise.
1510         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1511         __builtin_ia32_vfnmsubpd256_mask.
1512         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1513         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1514         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1515         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1516         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1517         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1518         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1519         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1520         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1521         __builtin_ia32_vfnmsubpd.
1522         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1523         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1524         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1525         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1526         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1527         * config/i386/i386-builtin.def: Add
1528         __builtin_ia32_vfnmsubpd256_mask,
1529         __builtin_ia32_vfnmsubpd256_maskz,
1530         __builtin_ia32_vfnmsubpd128_mask,
1531         __builtin_ia32_vfnmsubpd128_maskz,
1532         __builtin_ia32_vfnmsubps256_mask,
1533         __builtin_ia32_vfnmsubps256_maskz,
1534         __builtin_ia32_vfnmsubps128_mask,
1535         __builtin_ia32_vfnmsubps128_maskz,
1536         __builtin_ia32_vfnmsubpd512_mask,
1537         __builtin_ia32_vfnmsubpd512_maskz,
1538         __builtin_ia32_vfnmsubps512_mask,
1539         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1540         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1541         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1542         __builtin_ia32_vfnmsubpd256.
1543         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1544         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1545         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1546         Likewise.
1547         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1548         Likewise.
1549         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1550         Likewise.
1551         (fmai_vmfnmsub_<mode><round_name>): Likewise.
1553 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1555         PR target/72782
1556         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1557         __builtin_ia32_vfnmaddpd512_mask.
1558         (_mm512_mask_fnmadd_round_pd): Likewise.
1559         (_mm512_fnmadd_pd): Likewise.
1560         (_mm512_mask_fnmadd_pd): Likewise.
1561         (_mm512_maskz_fnmadd_round_pd): Use
1562         __builtin_ia32_vfnmaddpd512_maskz.
1563         (_mm512_maskz_fnmadd_pd): Likewise.
1564         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1565         (_mm512_mask_fnmadd_round_ps): Likewise.
1566         (_mm512_fnmadd_ps): Likewise.
1567         (_mm512_mask_fnmadd_ps): Likewise.
1568         (_mm512_maskz_fnmadd_round_ps): Use
1569         __builtin_ia32_vfnmaddps512_maskz.
1570         (_mm512_maskz_fnmadd_ps): Likewise.
1571         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1572         __builtin_ia32_vfnmaddpd256_mask.
1573         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1574         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1575         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1576         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1577         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1578         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1579         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1580         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1581         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1582         __builtin_ia32_vfnmaddpd.
1583         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1584         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1585         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1586         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1587         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1588         * config/i386/i386-builtin.def: Add
1589         __builtin_ia32_vfnmaddpd256_mask,
1590         __builtin_ia32_vfnmaddpd256_maskz,
1591         __builtin_ia32_vfnmaddpd128_mask,
1592         __builtin_ia32_vfnmaddpd128_maskz,
1593         __builtin_ia32_vfnmaddps256_mask,
1594         __builtin_ia32_vfnmaddps256_maskz,
1595         __builtin_ia32_vfnmaddps128_mask,
1596         __builtin_ia32_vfnmaddps128_maskz,
1597         __builtin_ia32_vfnmaddpd512_mask,
1598         __builtin_ia32_vfnmaddpd512_maskz,
1599         __builtin_ia32_vfnmaddps512_mask,
1600         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1601         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1602         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1603         __builtin_ia32_vfnmaddpd256.
1604         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1605         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1606         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1607         Likewise.
1608         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1609         Likewise.
1610         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1611         Likewise.
1612         (fmai_vmfnmadd_<mode><round_name>): Likewise.
1614 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1616         PR target/72782
1617         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1618         __builtin_ia32_vfmsubpd512_mask.
1619         (_mm512_mask_fmsub_round_pd): Likewise.
1620         (_mm512_fmsub_pd): Likewise.
1621         (_mm512_mask_fmsub_pd): Likewise.
1622         (_mm512_maskz_fmsub_round_pd): Use
1623         __builtin_ia32_vfmsubpd512_maskz.
1624         (_mm512_maskz_fmsub_pd): Likewise.
1625         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1626         (_mm512_mask_fmsub_round_ps): Likewise.
1627         (_mm512_fmsub_ps): Likewise.
1628         (_mm512_mask_fmsub_ps): Likewise.
1629         (_mm512_maskz_fmsub_round_ps): Use
1630         __builtin_ia32_vfmsubps512_maskz.
1631         (_mm512_maskz_fmsub_ps): Likewise.
1632         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1633         __builtin_ia32_vfmsubpd256_mask.
1634         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1635         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1636         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1637         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1638         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1639         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1640         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1641         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1642         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1643         __builtin_ia32_vfmsubpd.
1644         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1645         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1646         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1647         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1648         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1649         * config/i386/i386-builtin.def: Add
1650         __builtin_ia32_vfmsubpd256_mask,
1651         __builtin_ia32_vfmsubpd256_maskz,
1652         __builtin_ia32_vfmsubpd128_mask,
1653         __builtin_ia32_vfmsubpd128_maskz,
1654         __builtin_ia32_vfmsubps256_mask,
1655         __builtin_ia32_vfmsubps256_maskz,
1656         __builtin_ia32_vfmsubps128_mask,
1657         __builtin_ia32_vfmsubps128_maskz,
1658         __builtin_ia32_vfmsubpd512_mask,
1659         __builtin_ia32_vfmsubpd512_maskz,
1660         __builtin_ia32_vfmsubps512_mask,
1661         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1662         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1663         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1664         __builtin_ia32_vfmsubpd256.
1665         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1666         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1667         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1668         Likewise.
1669         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1670         Likewise.
1671         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1672         Likewise.
1673         (fmai_vmfmsub_<mode><round_name>): Likewise.
1675 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1677         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1678         Remove plus.  Renamed to ...
1679         (*sub<mode>3<mask_name>_bcst): This.
1680         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1681         (*add<mode>3<mask_name>_bcst): This.
1683 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1685         PR target/72782
1686         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1688 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1690         PR target/87662
1691         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1692         (_mm_or_epi32): Likewise.
1693         (_mm256_xor_epi32): Likewise.
1694         (_mm_xor_epi32): Likewise.
1695         (_mm256_or_epi64): Likewise.
1696         (_mm_or_epi64): Likewise.
1697         (_mm256_xor_epi64): Likewise.
1698         (_mm_xor_epi64): Likewise.
1700 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
1702         PR target/72782
1703         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1705 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
1707         PR middle-end/87647
1708         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1710 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
1712         * doc/ux.texi: Move @section directly after @node.
1714 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
1716         PR middle-end/85488
1717         PR middle-end/87649
1718         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1719         depend closely nested inside of loop with ordered clause with
1720         a parameter.
1722 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
1724         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1725         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1726         * doc/ux.texi: New file.
1728 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
1730         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1731         be the first CR field allocated.
1733 2018-10-19  Richard Biener  <rguenther@suse.de>
1735         PR target/87657
1736         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1737         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1739 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
1741         PR target/72782
1742         * config/i386/sse.md
1743         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1744         (*add<mode>3<mask_name>_bcst_2): Likewise.
1746 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
1748         * config/i386/sse.md
1749         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1750         Replace nonimmediate_operand with register_operand.
1751         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1752         Likewise.
1753         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1754         Likewise.
1756 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1758         PR rtl-optimization/87596
1759         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1760         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1761         for instructions in FROM..TO range.
1763 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
1765         * cfgexpand.c (expand_one_var): Use specific wording in error message
1766         for non-local frame variables.
1767         * stor-layout.c (layout_decl): Do not issue a warning for them.
1769 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
1771         * haifa-sched.c (priority): Add force_recompute parameter.
1772         (apply_replacement): Call priority () with force_recompute = true.
1773         (restore_pattern): Likewise.
1775 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1777         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1778         HOST_BITS_PER_WIDE_INT.
1779         (test_vector_ops_duplicate): Likewise.
1781 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1783         PR target/72782
1784         * config/i386/sse.md (VF_AVX512): New.
1785         (avx512bcst): Likewise.
1786         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1787         Likewise.
1788         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1789         Likewise.
1790         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1791         Likewise.
1793 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
1795         * doc/invoke.texi (-dumpversion): Improve grammar.
1796         (-dumpfullversion): Make more consistent with -dumpversion.
1798 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
1800         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1801         Set JUMP_LABEL to the jump insn.
1802         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1803         Predict emitted jump and add label to jump insn.
1805 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
1807         PR tree-optimization/87562
1808         * input.c (get_substring_ranges_for_loc): Use
1809         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1810         getting the linemap for the endpoint.  Verify that it's either
1811         in the same linemap as the start point's spelling location, or
1812         at least in the same file.
1814 2018-10-18  Richard Biener  <rguenther@suse.de>
1816         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1817         feed width-specific load/store costs through ix86_vec_cost.
1818         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1819         (k8_cost): Likewise.
1820         (bdver_cost): Likewise.
1821         (znver1_cost): Likewise.
1822         (btver1_cost): Likewise.
1823         (btver2_cost): Likewise.
1825 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1827         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1828         to simplify subreg of vec_merge.
1830 2018-10-18  Richard Biener  <rguenther@suse.de>
1832         * config/i386/i386.c: Fix costing of vector FMA.
1834 2018-10-18  Richard Biener  <rguenther@suse.de>
1836         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1837         and argument.
1838         (ix86_builtin_vectorization_cost): For vec_construct properly
1839         cost insertion into SSE regs.
1840         (...): Adjust calls to ix86_vec_cost.
1842 2018-10-18  Richard Biener  <rguenther@suse.de>
1844         PR middle-end/87087
1845         Revert
1846         2018-02-07  Richard Biener  <rguenther@suse.de>
1848         PR tree-optimization/84204
1849         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1850         this place.
1852 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1854         PR target/87537
1855         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1856         of vec_duplicate.
1857         (test_vector_ops_duplicate): Add test for a scalar subreg of a
1858         VEC_MERGE of a VEC_DUPLICATE.
1860 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
1862         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1863         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1864         * doc/standards.texi (C Language): Document C2X.
1865         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1866         (rl78_option_override): Handle "GNU C2X" language name.
1868 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
1870         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1871         Document C17 as published in 2018.
1873 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
1875         PR middle-end/87623
1876         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1877         bail out if both sides do not have the same storage order.
1879 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
1881         * bitmap.c (bitmap_head::dump): New.
1882         * bitmap.h (bitmap_head): Add dump().
1883         * gimple-ssa-evrp-analyze.c
1884         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1885         (evrp_range_analyzer::set_ssa_range_info): Same.
1886         (evrp_range_analyzer::record_ranges_from_phis): Same.
1887         (evrp_range_analyzer::record_ranges_from_stmt): Same.
1888         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1889         * gimple-ssa-sprintf.c (get_int_range): Same.
1890         (format_integer): Same.
1891         (sprintf_dom_walker::handle_gimple_call): Same.
1892         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1893         (ipcp_vr_lattice::top_p): Same.
1894         (ipcp_vr_lattice::bottom_p): Same.
1895         (ipcp_vr_lattice::set_to_bottom): Same.
1896         (ipa_vr_operation_and_type_effects): Same.
1897         (propagate_vr_across_jump_function): Same.
1898         (ipcp_store_vr_results): Same.
1899         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1900         (ipa_print_node_jump_functions_for_edge): Same.
1901         (ipa_get_value_range): Same.
1902         (ipa_compute_jump_functions_for_edge): Same.
1903         (ipa_write_jump_function): Same.
1904         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1905         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1906         Same.
1907         * vr-values.c (set_value_range_to_nonnegative): Same.
1908         (set_value_range_to_truthvalue): Same.
1909         (vr_values::get_value_range): Same.
1910         (vr_values::set_defs_to_varying): Same.
1911         (vr_values::update_value_range): Same.
1912         (symbolic_range_based_on_p): Same.
1913         (vr_values::op_with_boolean_value_range_p): Same.
1914         (vr_values::extract_range_for_var_from_comparison_expr): Same.
1915         (vr_values::extract_range_from_ssa_name): Same.
1916         (vr_values::extract_range_from_binary_expr): Same.
1917         (vr_values::extract_range_from_unary_expr): Same.
1918         (vr_values::extract_range_from_cond_expr): Same.
1919         (vr_values::extract_range_from_comparison): Same.
1920         (vr_values::check_for_binary_op_overflow): Same.
1921         (vr_values::extract_range_basic): Same.
1922         (vr_values::extract_range_from_assignment): Same.
1923         (compare_ranges): Same.
1924         (compare_range_with_value): Same.
1925         (vr_values::adjust_range_with_scev): Same.
1926         (vrp_valueize): Same.
1927         (vrp_valueize_1): Same.
1928         (vr_values::get_vr_for_comparison): Same.
1929         (vr_values::compare_name_with_value): Same.
1930         (vr_values::compare_names): Same.
1931         (vr_values::vrp_evaluate_conditional): Same.
1932         (find_case_label_ranges): Same.
1933         (vr_values::vrp_visit_switch_stmt): Same.
1934         (vr_values::extract_range_from_phi_node): Same.
1935         (vr_values::simplify_div_or_mod_using_ranges): Same.
1936         (vr_values::simplify_bit_ops_using_ranges): Same.
1937         (test_for_singularity): Same.
1938         (range_fits_type_p): Same.
1939         (vr_values::simplify_cond_using_ranges_1): Same.
1940         (vr_values::simplify_switch_using_ranges): Same.
1941         (vr_values::simplify_float_conversion_using_ranges): Same.
1942         (vr_values::two_valued_val_range_p): Same.
1943         (vr_values::add_equivalence): Move to value_range::equiv_add.
1944         * vr-values.h (vr_values::add_equivalence): Remove.
1945         (VR_INITIALIZER): Remove.
1946         * tree-vrp.c (value_range::set): New.
1947         (value_range::equiv_add): New.
1948         (value_range::value_range): New.
1949         (value_range::deep_copy): New.
1950         (value_range::check): New.
1951         (value_range::equal_p): New.
1952         (value_range::ignore_equivs_equal_p): New.
1953         (value_range::operator==): New.
1954         (value_range::operator!=): New.
1955         (value_range::symbolic_p): New.
1956         (value_range::numeric_p): New.
1957         (value_range::set_undefined): New.
1958         (value_range::set_varying): New.
1959         (value_range::may_contain_p): New.
1960         (value_range::equiv_clear): New.
1961         (value_range::singleton_p): New.
1962         (value_range::intersect): New.
1963         (value_range::dump): New.
1964         (value_range::set_and_canonicalize): New.
1965         (set_value_range): Adjust for value_range API.
1966         (set_value_range_to_undefined): Same.
1967         (set_value_range_to_varying): Same.
1968         (set_and_canonicalize_value_range): Same.
1969         (set_value_range_to_nonnull): Same.
1970         (set_value_range_to_null): Same.
1971         (range_is_null): Same.
1972         (range_is_nonnull): Same.
1973         (range_int_cst_p): Same.
1974         (range_int_cst_singleton_p): Same.
1975         (symbolic_range_p): Same.
1976         (range_includes_zero_p): Same.
1977         (value_range_constant_singleton): Same.
1978         (vrp_set_zero_nonzero_bits): Same.
1979         (ranges_from_anti_range): Same.
1980         (extract_range_into_wide_ints): Same.
1981         (extract_range_from_multiplicative_op): Same.
1982         (set_value_range_with_overflow): Same.
1983         (extract_range_from_binary_expr_1): Same.
1984         (extract_range_from_unary_expr): Same.
1985         (dump_value_range): Same.
1986         (debug_value_range): Same.
1987         (vrp_prop::check_array_ref): Same.
1988         (vrp_prop::check_mem_ref): Same.
1989         (vrp_prop::vrp_initialize): Same.
1990         (vrp_prop::visit_stmt): Same.
1991         (intersect_ranges): Same.
1992         (vrp_prop::visit_phi): Same.
1993         (vrp_prop::vrp_finalize): Same.
1994         (determine_value_range_1): Same.
1995         (determine_value_range): Same.
1996         (vrp_intersect_ranges_1): Rename to...
1997         (vrp_intersect_1): this.
1998         (vrp_intersect_ranges): Rename to...
1999         (value_range::intersect_helper): ...this.
2000         (vrp_meet_1): Rename to...
2001         (value_range::union_helper): ...this.
2002         (vrp_meet): Rename to...
2003         (value_range::union_): ...this.
2004         (copy_value_range): Remove.
2005         * tree-vrp.h (struct value_range): Rewrite into a proper class.
2006         (value_range::vrtype): New.
2007         (value_range::type): New.
2008         (value_range::equiv): New.
2009         (value_range::min): New.
2010         (value_range::max): New.
2011         (value_range::varying_p): New.
2012         (value_range::undefined_p): New.
2013         (value_range::null_p): New.
2014         (value_range::equiv_add): New.
2015         (copy_value_range): Remove.
2017 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
2019         * Makefile.in (SELFTEST_TARGETS): New.
2020         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
2021         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2022         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
2023         c/Make-lang.in.
2024         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
2025         (selftest-c++-gdb, selftest-c++-valgrind): Move to
2026         cp/Make-lang.in.
2027         * configure: Regenerate.
2028         * configure.ac (selftest_languages): New.
2030 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
2032         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
2033         overflow wraps argument.
2034         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
2035         wide_int_range_multiplicative_op.
2036         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
2037         overflow wraps argument.
2038         (wide_int_range_multiplicative_op): Same.
2039         (wide_int_range_lshift): Same.
2040         (wide_int_range_div): Same.
2041         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
2042         (wide_int_range_lshift): Same.
2043         (wide_int_range_div): Same.
2045 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
2047         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
2048         use sign as argument.
2049         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
2050         wide_int_range_shift_undefined_p.
2052 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2054         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
2055         Rename to...
2056         (@despeculate_copy<ALLI_TI:mode>): ... This.
2057         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
2058         switch statement.
2060 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2062         * config.gcc: Obsolete *-*-solaris2.10*.
2063         * doc/install.texi (Specific, *-*-solaris2*): Document it.
2065 2018-10-12  Jeff Law  <law@redhat.com>
2067         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
2068         reg + sym +- const_int addressing modes.
2070 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
2072         * common.opt (fdiagnostics-minimum-margin-width=): New option.
2073         * diagnostic-show-locus.c (layout::layout): Apply the minimum
2074         margin width.
2075         (layout::start_annotation_line): Only print up to 3 of the
2076         margin character, to avoid touching the left-hand side.
2077         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
2078         minimum margin width, as set by test_diagnostic_context's ctor.
2079         (selftest::test_fixit_insert_containing_newline): Likewise.
2080         (selftest::test_fixit_insert_containing_newline_2): Likewise.
2081         (selftest::test_line_numbers_multiline_range): Clear
2082         dc.min_margin_width.
2083         * diagnostic.c (diagnostic_initialize): Initialize
2084         min_margin_width.
2085         * diagnostic.h (struct diagnostic_context): Add field
2086         "min_margin_width".
2087         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
2088         * opts.c (common_handle_option): Handle
2089         OPT_fdiagnostics_minimum_margin_width_.
2090         * selftest-diagnostic.c
2091         (selftest::test_diagnostic_context::test_diagnostic_context):
2092         Initialize min_margin_width to 6.
2093         * toplev.c (general_init): Initialize global_dc->min_margin_width.
2095 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
2097         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
2098         Fix usage of "error_at_rich_loc" in the comment.
2100 2018-10-15  Renlin Li  <renlin.li@arm.com>
2102         PR target/87563
2103         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
2104         if-conversioned loop when it contains ifn with types not
2105         supported by backend.
2106         * internal-fn.c (expand_direct_optab_fn): Add an assert.
2107         (direct_internal_fn_supported_p): New helper function.
2108         * internal-fn.h (direct_internal_fn_supported_p): Declare.
2110 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
2112         PR target/87572
2113         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2114         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2115         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2117 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
2119         PR tree-optimization/87022
2120         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
2121         bits in dist vector rather than the first one.
2123 2018-10-15  Richard Biener  <rguenther@suse.de>
2125         PR middle-end/87610
2126         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2127         (visit_loadstore): When a used restrict tag escaped verify that
2128         the points-to solution of "other" pointers do not include
2129         escaped.
2130         (compute_dependence_clique): If a used restrict tag escaped
2131         communicated that down to visit_loadstore.
2133 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
2135         * config/s390/s390.c (s390_expand_vec_init): Force vector element
2136         into reg if it isn't a general operand.
2138 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
2140         PR target/87599
2141         * config/i386/sse.md (*vec_dupv2di): Add register source to
2142         movddup.
2144 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
2146         PR target/87572
2147         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2148         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
2149         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2150         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2152 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
2154         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
2155         (notice_args_size): Set it in the current trace if no insn that can
2156         throw internally has been seen yet.
2157         (connect_traces): When connecting args_size between traces, allow the
2158         incoming values not to match if there is an insn setting it before the
2159         first insn that can throw internally; in that case, force the creation
2160         of a CFI note on this latter insn.
2162 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
2164         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
2165         the base class, because using the injected-class-name was not clearly
2166         specified until DR 176.
2168 2018-10-12  Paul Koning  <ni1d@arrl.net>
2170         * config/pdp11/pdp11.md (doloop_end): New expander.
2171         (doloop_end_insn): renamed from "doloop_end".
2172         (addqi3): New pattern.
2173         (subqi3): New pattern.
2174         * config/pdp11/predicates.md (incdec_operand): New predicate.
2176 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
2178         PR middle-end/81376
2179         * real.c (format_helper::can_represent_integral_type_p): New function
2180         * real.h (format_helper::can_represent_integral_type_p): Ditto.
2181         * match.pd: New pattern.
2183 2018-10-12  Alexandre Oliva <oliva@adacore.com>
2185         * configure.ac: Introduce --enable-large-address-aware
2186         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
2187         * doc/install.texi: Document it.
2188         * configure, config.in: Rebuilt.
2189         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
2190         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
2191         (LINK_SPEC): Insert it.
2192         * config/i386/mingw-w64.h: Likewise.
2194         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
2196 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
2198         PR rtl-optimization/87600
2199         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
2201 2018-10-12  Paul Koning  <ni1d@arrl.net>
2203         * doc/md.texi (doloop_end): Document that the pattern code may
2204         need to check operand mode.
2206 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
2208         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
2209         to zero-extend between int and floating-point registers.
2210         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
2211         ldp into floating-point registers.  Add type and arch attributes.
2212         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
2213         Use f_loads for type attribute.
2215 2018-10-11  Martin Sebor  <msebor@redhat.com>
2217         * doc/extend.texi (attribute packed): Correct typos.
2219 2018-10-11  Martin Sebor  <msebor@redhat.com>
2221         * doc/extend.texi (attribute flatten): Mention interaction with
2222         noinline.
2224 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
2226         PR target/87156
2227         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
2228         Set new_decl virtual flag to zero.
2230 2018-10-11  Martin Sebor  <msebor@redhat.com>
2232         PR middle-end/87593
2233         * doc/extend.texi (attribute format_arg): Discuss using multiple
2234         attributes on a single function.
2236 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
2238         PR tree-optimization/86829
2239         * match.pd (sin (atan (x))): New simplification rules.
2240         (cos (atan (x))): Likewise.
2241         * real.c (build_sinatan_real): New function.
2242         * real.h (build_sinatan_real): Prototype.
2244 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
2246         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
2247         function.
2248         (fold_mergeeo_helper): New helper function.
2249         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
2250         intrinsics.  Correct some whitespace indentation issues.
2252 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
2254         PR target/87511
2255         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2256         Use HOST_WIDE_INT_1U for shift.
2258 2018-10-11  Doug Rupp  <rupp@adacore.com>
2259             Olivier Hainque  <hainque@adacore.com>
2261         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
2262         Pass --relax to the linker for RTPs.
2263         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
2265 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
2266             Jan Hubicka  <jh@suse.cz>
2267             Martin Jambor  <mjambor@suse.cz>
2269         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
2270         the same elements are repeated rather than printing all of them.
2271         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
2272         "repeated" elements.
2273         * read-rtl-function.c (test_loading_repeat): New function.
2274         (read_rtl_function_c_tests): Call test_loading_repeat.
2275         * rtl-tests.c (test_dumping_repeat): New function.
2276         (rtl_tests_c_tests): Call test_dumping_repeat.
2278 2018-10-11  Richard Biener  <rguenther@suse.de>
2280         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
2281         bdver?_cost): Unify to ...
2282         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2283         * config/i386/i386.c (processor_cost_table): Adjust.
2285 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
2287         PR middle-end/87574
2288         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2289         the thunk when expanding to GIMPLE.
2291 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2293         * varasm.c (mergeable_string_section): Don't try to move zero-length
2294         strings to the merge section.
2296 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
2298         PR target/87573
2299         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2301 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
2303         PR target/87550
2304         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2305         to special_args set.
2307 2018-10-10  Richard Biener  <rguenther@suse.de>
2309         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2310         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2311         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2312         and recursing and pattern terminating the recursion on SSE
2313         vector width using ix86_expand_reduc.
2314         (reduc_sminmax_scal_<mode>): Split into part reducing to half
2315         width and recursing and SSE2 vector variant doing the final
2316         reduction with ix86_expand_reduc.
2317         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2318         with terminating the recursion at AVX level, splitting that
2319         to SSE there.
2321 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
2323         * genmatch.c (error_cb): Rename to...
2324         (diagnostic_cb): ...this, converting int params to enums.
2325         (fatal_at): Update for renaming.
2326         (warning_at): Likewise.
2327         (main): Likewise.
2328         * input.c (selftest::ebcdic_execution_charset::apply):
2329         Update for renaming of...
2330         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2331         to...
2332         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2333         converting level and reason to enums.
2334         (class selftest::lexer_error_sink): Rename to...
2335         (class selftest::lexer_test_options): ...this, renaming field
2336         "m_errors" to "m_diagnostics".
2337         (selftest::lexer_test_options::apply): Update for renaming of...
2338         (selftest::lexer_test_options::on_error): ...this, renaming to...
2339         (selftest::lexer_test_options::on_diagnostic): ...this
2340         converting level and reason to enums.
2341         (selftest::test_lexer_string_locations_raw_string_unterminated):
2342         Update for renamings.
2343         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2344         "reason".
2346 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
2348         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2349         * config/rs6000/pmmintrin.h: New file.
2351 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
2353         PR tree-optimization/86659
2354         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2356 2018-10-09  Richard Biener  <rguenther@suse.de>
2358         PR tree-optimization/63155
2359         * tree-ssa-structalias.c: Include tree-ssa.h.
2360         (get_constraint_for_ssa_var): For undefs return nothing_id.
2361         (find_func_aliases): Cleanup PHI handling.
2363 2018-10-09  Richard Biener  <rguenther@suse.de>
2365         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2366         replacements.
2368 2018-10-09  Martin Liska  <mliska@suse.cz>
2370         * asan.c (asan_emit_stack_protection): If a stack variable
2371         is located in a same file as current function, then emit
2372         line info into variable definition string.
2374 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
2376         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2377         information.
2379 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
2381         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2382         on the thunk.
2384 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
2386         PR tree-optimization/86659
2387         * gimple-match.h (struct gimple_match_op): Add reverse field.
2388         (gimple_match_op::set_op): New overloaded method.
2389         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2390         the REF_REVERSE_STORAGE_ORDER flag on the value.
2391         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2392         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2393         
2394 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
2396         PR middle-end/63155
2397         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2398         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2400 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
2402         PR target/87517
2403         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2404         Defined with __builtin_ia32_vfmaddsubpd512_mask.
2406 2018-10-08  Richard Biener  <rguenther@suse.de>
2408         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2409         cost the same as AVX128 ones.
2411 2018-10-08  Paul Koning  <ni1d@arrl.net>
2413         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2414         (expand_block_move): New function.
2415         * config/pdp11/pdp11.c (output_block_move): Remove.
2416         (expand_block_move): New function.
2417         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2418         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2419         (*movmemhi1): Remove.
2421 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
2423         * config/s390/2827.md: Increase latencies for some FP instructions.
2425 2018-10-08  Richard Biener  <rguenther@suse.de>
2427         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2428         Open a dump scope.
2429         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2430         * tree-vectorizer.h (dump_stmt_cost): Adjust.
2431         (add_stmt_cost): Dump return value of the hook.
2433 2018-10-08  Richard Biener  <rguenther@suse.de>
2435         PR tree-optimization/63155
2436         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2437         (ssa_propagation_engine::ssa_propagate): Remove redundant
2438         bitmap bit clearing.
2440 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
2442         PR rtl-optimization/86939
2443         PR rtl-optimization/87479
2444         * ira.h (non_conflicting_reg_copy_p): New prototype.
2445         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2446         (make_hard_regno_dead): Don't add conflicts for register
2447         ignore_reg_for_conflicts.
2448         (make_object_dead): Likewise.
2449         (non_conflicting_reg_copy_p): New function.
2450         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2451         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2452         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2453         (make_hard_regno_dead): Don't add conflicts for register
2454         ignore_reg_for_conflicts.  Remove special conflict handling of
2455         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
2456         check_pic_pseudo_p and update callers.
2457         (mark_pseudo_dead): Don't add conflicts for register
2458         ignore_reg_for_conflicts.
2459         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2461 2018-10-05  Andrew Waterman  <andrew@sifive.com>
2462             Jim Wilson  <jimw@sifive.com>
2464         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2465         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
2466         new pattern using HONOR_SNANS that emits one extra instruction.
2468 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
2470         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2471         patterns): Merge SI and DI patterns to a GPR pattern.
2472         (unnamed define_insn and define_split for record form of that): Merge
2473         to a single define_insn_and_split pattern.
2475 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
2477         PR c++/56856
2478         * input.c (expand_location_to_spelling_point): Add param "aspect"
2479         and use rather than hardcoding LOCATION_ASPECT_CARET.
2480         (get_substring_ranges_for_loc): Handle the case of a single token
2481         within a macro expansion.
2482         * input.h (expand_location_to_spelling_point): Add "aspect" param,
2483         defaulting to LOCATION_ASPECT_CARET.
2485 2018-10-05  Paul Koning  <ni1d@arrl.net>
2487         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2488         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2489         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2490         (pdp11_guard_type): New function.
2492 2018-10-05  Paul Koning  <ni1d@arrl.net>
2494         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2495         * config/pdp11/pdp11.opt (mfloat32): Remove.
2496         (mfloat64): Remove.
2497         * doc/invoke.texi (pdp11 -mfloat32): Remove:
2498         (pdp11 -mfloat64): Remove.
2500 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
2502         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2503         (*cmp<mode>_cc_i387): Ditto.
2504         (*cmpu<mode>_cc_i387): Ditto.
2505         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2506         * config/i386/i386.c (ix86_expand_fp_compare): Remove
2507         "scratch" argument.
2508         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2509         Emit x86_sahf_1 pattern.
2510         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2511         (ix86_expand_carry_flag_compare): Ditto.
2513 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
2515         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2516         to reg_or_0_operand.  Add "C" constraint.
2517         (*cmpxf_cc_i387): Ditto.
2518         (*cmp<mode>_i387): Change operand 2 predicate
2519         to nonimm_or_0_operand.  Add "C" constraint.
2520         (*cmp<mode>_cc_i387): Ditto.
2521         (*cmp<mode>_0_i387): Remove insn pattern.
2522         (*cmp<mode>_0_cc_i387): Ditto.
2524 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
2526         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2527         * config/i386/predicates.md (nonimm_or_0_operand): Rename
2528         from vector_move_operand.  Update all uses.
2530 2018-10-05  Martin Sebor  <msebor@redhat.com>
2532         PR tree-optimization/87490
2533         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2534         consistently.
2536 2018-10-05  Richard Biener  <rguenther@suse.de>
2538         PR tree-optimization/63155
2539         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2540         vertical space in dumpfiles.
2541         * tree-ssa-propagate.h
2542         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2543         * tree-ssa-propagate.c (cfg_blocks_back): New global.
2544         (ssa_edge_worklist_back): Likewise.
2545         (curr_order): Likewise.
2546         (cfg_blocks_get): Remove abstraction.
2547         (cfg_blocks_add): Likewise.
2548         (cfg_blocks_empty_p): Likewise.
2549         (add_ssa_edge): Add to current or next worklist based on
2550         RPO index.
2551         (add_control_edge): Likewise.
2552         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2553         into ...
2554         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
2555         iteration from CFG and SSA edge worklist so we process
2556         everything in RPO order, prioritizing forward progress
2557         over iteration.
2558         (ssa_prop_init): Allocate new worklists, do not dump
2559         immediate uses.
2560         (ssa_prop_fini): Free new worklists.
2562 2018-10-05  Richard Biener  <rguenther@suse.de>
2564         * tree-core.h (tree_block::abstract_flag): Remove.
2565         (tree_block::block_num): Make full 32bits.
2566         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2567         * tree.h (BLOCK_ABSTRACT): Remove.
2568         * dwarf2out.c (gen_lexical_block_die): Remove dead code
2569         resulting from BLOCK_ABSTRACT being always false.
2570         (gen_inlined_subroutine_die): Likewise.
2571         (gen_block_die): Likewise.
2572         * tree.c (block_ultimate_origin): Likewise.
2573         * tree-pretty-print.c (dump_block_node): Remove code dealing
2574         with BLOCK_ABSTRACT.
2575         * tree-ssa-live.c (dump_scope_block): Likewise.
2576         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2577         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2579 2018-10-05   Richard Biener  <rguenther@suse.de>
2581         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2582         is asked for initialize mode to the component mode of the
2583         vector type.
2585 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
2587         PR target/87522
2588         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2589         assembler for -mavx.
2590         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2592 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
2594         PR target/87509
2595         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2596         RS6000_BTM_DFP.
2597         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2598         to be DImode.  When using mffscrn, force the operand to a register.
2600 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
2602         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2603         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2604         X87MODEF mode iterator.
2605         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2606         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2607         X87MODEF mode iterator.
2609 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
2611         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2612         -Wno-prio-ctor-dtor.
2614 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2616         * Makefile.in (OBJS): Add opt-problem.o.
2617         * dump-context.h: Include "selftest.h.
2618         (selftest::temp_dump_context): New forward decl.
2619         (class dump_context): Make friend of class
2620         selftest::temp_dump_context.
2621         (dump_context::dump_loc_immediate): New decl.
2622         (class dump_pretty_printer): Move here from dumpfile.c.
2623         (class temp_dump_context): Move to namespace selftest.
2624         (temp_dump_context::temp_dump_context): Add param
2625         "forcibly_enable_dumping".
2626         (selftest::verify_dumped_text):
2627         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2628         (selftest::verify_item):
2629         (ASSERT_IS_TEXT): Move here from dumpfile.c.
2630         (ASSERT_IS_TREE): Likewise.
2631         (ASSERT_IS_GIMPLE): Likewise.
2632         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2633         to...
2634         (dump_context::dump_loc_immediate): ...this new function.
2635         (class dump_pretty_printer): Move to dump-context.h.
2636         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2637         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2638         (temp_dump_context::temp_dump_context): Move to "selftest"
2639         namespace.  Add param "forcibly_enable_dumping", and use it to
2640         conditionalize the use of m_pp;
2641         (selftest::verify_dumped_text): Make non-static.
2642         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2643         (selftest::verify_item): Make non-static.
2644         (ASSERT_IS_TEXT): Move to dump-context.h.
2645         (ASSERT_IS_TREE): Likewise.
2646         (ASSERT_IS_GIMPLE): Likewise.
2647         (selftest::test_capture_of_dump_calls): Pass "true" for new
2648         param of temp_dump_context.
2649         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2650         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
2651         TDF_COMPARE_DEBUG.
2652         * opt-problem.cc: New file.
2653         * opt-problem.h: New file.
2654         * optinfo-emit-json.cc
2655         (selftest::test_building_json_from_dump_calls): Pass "true" for
2656         new param of temp_dump_context.
2657         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2658         (optinfo::emit_for_opt_problem): New function.
2659         (optinfo::emit): Clarity which emit_item is used.
2660         * optinfo.h (optinfo::get_dump_location): New accessor.
2661         (optinfo::emit_for_opt_problem): New decl.
2662         (optinfo::emit): Make const.
2663         * selftest-run-tests.c (selftest::run_tests): Call
2664         selftest::opt_problem_cc_tests.
2665         * selftest.h (selftest::opt_problem_cc_tests): New decl.
2666         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2667         bool to opt_result, converting fprintf messages to
2668         opt_result::failure_at calls.  Add "stmt" param for use by the
2669         failure_at calls.
2670         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2671         (runtime_alias_check_p): Convert return type from bool to
2672         opt_result, converting dump_printf calls to
2673         opt_result::failure_at, using the statement DDR_A for their
2674         location.
2675         (find_data_references_in_stmt): Convert return type from bool to
2676         opt_result, converting "return false" to opt_result::failure_at
2677         with a new message.
2678         * tree-data-ref.h: Include "opt-problem.h".
2679         (dr_analyze_innermost): Convert return type from bool to opt_result,
2680         and add a const gimple * param.
2681         (find_data_references_in_stmt): Convert return type from bool to
2682         opt_result.
2683         (runtime_alias_check_p): Likewise.
2684         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2685         dr_analyze_innermost.
2686         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2687         Convert return type from bool to opt_result, adding a message for
2688         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2689         (vect_analyze_data_ref_dependence): Convert return type from bool
2690         to opt_result.  Change sense of return type from "false"
2691         effectively meaning "no problems" to "false" meaning a problem,
2692         so that "return false" becomes "return opt_result::success".
2693         Convert "return true" calls to opt_result::failure_at, using
2694         the location of statement A rather than vect_location.
2695         (vect_analyze_data_ref_dependences): Convert return type from bool
2696         to opt_result.
2697         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2698         calls to opt_result::failure_at, using the stmt location rather
2699         than vect_location.
2700         (vect_verify_datarefs_alignment): Convert return type from bool
2701         to opt_result.
2702         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
2703         into multiple more-tightly-scoped copies.
2704         (vect_analyze_data_refs_alignment): Convert return type from bool
2705         to opt_result.
2706         (vect_analyze_data_ref_accesses): Likewise, converting a
2707         "return false" to a "return opt_result::failure_at", adding a
2708         new message.
2709         (vect_prune_runtime_alias_test_list): Convert return type from
2710         bool to opt_result, converting dump_printf_loc to
2711         opt_result::failure_at.  Add a %G to show the pertinent statement,
2712         and use the stmt's location rather than vect_location.
2713         (vect_find_stmt_data_reference): Convert return type from
2714         bool to opt_result, converting dump_printf_loc to
2715         opt_result::failure_at, using stmt's location.
2716         (vect_analyze_data_refs):  Convert return type from bool to
2717         opt_result.  Convert "return false" to "return
2718         opt_result::failure_at", adding messages as needed.
2719         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2720         type from bool to opt_result.
2721         (vect_determine_vf_for_stmt): Likewise.
2722         (vect_determine_vectorization_factor): Likewise, converting
2723         dump_printf_loc to opt_result::failure_at, using location of phi
2724         rather than vect_location.
2725         (vect_analyze_loop_form_1): Convert return type from bool to
2726         opt_result, converting dump_printf_loc calls, retaining the use of
2727         vect_location.
2728         (vect_analyze_loop_form): Convert return type from loop_vec_info
2729         to opt_loop_vec_info.
2730         (vect_analyze_loop_operations): Convert return type from bool to
2731         opt_result, converting dump_printf_loc calls, using the location
2732         of phi/stmt rather than vect_location where available.  Convert
2733         various "return false" to "return opt_result::failure_at" with
2734         "unsupported phi" messages.
2735         (vect_get_datarefs_in_loop): Convert return type from bool to
2736         opt_result.  Add a message for the
2737         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2738         (vect_analyze_loop_2): Convert return type from bool to
2739         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
2740         each "goto again;", adding new messages where needed.
2741         Add "unsupported grouped {store|load}" messages.
2742         (vect_analyze_loop): Convert return type from loop_vec_info to
2743         opt_loop_vec_info.
2744         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2745         bool to opt_result.
2746         * tree-vect-stmts.c (process_use): Likewise, converting
2747         dump_printf_loc call and using stmt location, rather than
2748         vect_location.
2749         (vect_mark_stmts_to_be_vectorized): Likeise.
2750         (vect_analyze_stmt): Likewise, adding a %G.
2751         (vect_get_vector_types_for_stmt): Convert return type from bool to
2752         opt_result, converting dump_printf_loc calls and using stmt
2753         location, rather than vect_location.
2754         (vect_get_mask_type_for_stmt): Convert return type from tree to
2755         opt_tree, converting dump_printf_loc calls and using stmt location.
2756         * tree-vectorizer.c: Include "opt-problem.h.
2757         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2758         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
2759         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
2760         enabled, use it to report at the top level "couldn't vectorize
2761         loop" followed by the problem.
2762         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2763         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2764         to opt_result.
2765         (vect_analyze_stmt): Likewise.
2766         (vect_get_vector_types_for_stmt): Likewise.
2767         (tree vect_get_mask_type_for_stmt): Likewise.
2768         (vect_analyze_data_ref_dependences): Likewise.
2769         (vect_enhance_data_refs_alignment): Likewise.
2770         (vect_analyze_data_refs_alignment): Likewise.
2771         (vect_verify_datarefs_alignment): Likewise.
2772         (vect_analyze_data_ref_accesses): Likewise.
2773         (vect_prune_runtime_alias_test_list): Likewise.
2774         (vect_find_stmt_data_reference): Likewise.
2775         (vect_analyze_data_refs): Likewise.
2776         (vect_analyze_loop): Convert return type from loop_vec_info to
2777         opt_loop_vec_info.
2778         (vect_analyze_loop_form): Likewise.
2779         (vect_analyze_slp): Convert return type from bool to opt_result.
2781 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2783         * doc/invoke.texi (-fopt-info): Document new "internals"
2784         sub-option.
2785         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2786         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2787         MSG_ALL_KINDS.
2788         (optinfo_verbosity_options): Add "internals".
2789         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2790         (dump_context::apply_dump_filter_p): New member function.
2791         (dump_context::dump_loc): Use apply_dump_filter_p rather than
2792         explicitly masking the dump_kind.
2793         (dump_context::begin_scope): Increment the scope depth first.  Use
2794         apply_dump_filter_p rather than explicitly masking the dump_kind.
2795         (dump_context::emit_item): Use apply_dump_filter_p rather than
2796         explicitly masking the dump_kind.
2797         (dump_dec): Likewise.
2798         (dump_hex): Likewise.
2799         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2800         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2801         (opt_info_switch_p): Update handling of default
2802         MSG_OPTIMIZED_LOCATIONS to cope with default of
2803         MSG_PRIORITY_USER_FACING.
2804         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2805         masking the dump_kind.
2806         (selftest::test_capture_of_dump_calls): Update test_dump_context
2807         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2808         than MSG_ALL.  Generalize scope test to be run at all four
2809         combinations of with/without MSG_PRIORITY_USER_FACING and
2810         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2811         for each of the two values.
2812         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2813         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
2814         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2815         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2816         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2817         with MSG_PRIORITY_*.
2818         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2819         dump messages as MSG_PRIORITY_USER_FACING.
2820         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2821         about the interaction with MSG_PRIORITY_*.
2823 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2825         * varasm.c (output_constant): Add new parameter merge_strings.
2826         Make strings properly zero terminated in merge string sections.
2827         (mergeable_string_section): Don't fail if the last char is non-zero.
2828         (assemble_variable_contents): Handle merge string sections.
2829         (assemble_variable): Likewise.
2830         (assemble_constant_contents): Likewise.
2831         (output_constant_def_contents): Likewise.
2832         (output_constructor_array_range,
2833         output_constructor_regular_field): Adjust call to output_constant.
2834         (output_object_block): Adjust call to assemble_constant_contents
2835         and assemble_variable_contents.
2837 2018-10-04  Martin Liska  <mliska@suse.cz>
2839         PR c/87483
2840         * cgraphunit.c (process_function_and_variable_attributes):
2841         Warn about a function with alias attribute and a body.
2843 2018-10-04  Martin Liska  <mliska@suse.cz>
2845         PR ipa/82625
2846         * multiple_target.c (redirect_to_specific_clone): New function.
2847         (ipa_target_clone): Use it.
2848         * tree-inline.c: Fix comment.
2850 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2852         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2853         fields.
2854         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2855         (gcc::dump_manager::register_pass): New member function, adapted
2856         from loop body in gcc::pass_manager::register_pass, adding a
2857         call to update_dfi_for_opt_info.
2858         (gcc::dump_manager::opt_info_enable_passes): Store the
2859         -fopt-info options into the new fields.  Move the loop
2860         bodies into...
2861         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2862         function.
2863         * dumpfile.h (struct opt_pass): New forward decl.
2864         (gcc::dump_manager::register_pass): New decl.
2865         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2866         (class gcc::dump_manager): Add fields "m_optgroup_flags",
2867         "m_optinfo_flags", and "m_optinfo_filename".
2868         * passes.c (gcc::pass_manager::register_pass): Move all of the
2869         dump-handling code to gcc::dump_manager::register_pass.
2871 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
2873         PR rtl-optimization/87466
2874         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2875         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2876         * doc/tm.texi: Regenerate.
2877         * ira-lives.c (process_bb_node_lives): Use the new target hook.
2878         * lra-lives.c (process_bb_lives): Likewise.
2879         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2880         Define.
2882 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
2884         * params.c (add_params): Fix initialization.
2886 2018-10-04  Martin Liska  <mliska@suse.cz>
2888         PR gcov-profile/84107
2889         * tree-profile.c (init_ic_make_global_vars):
2890         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2891         Come up with new ic_tuple* variables.  Emit
2892         __gcov_indirect_call{,_topn} variables.
2893         (gimple_gen_ic_profiler): Access the variable
2894         and emit gimple.
2895         (gimple_gen_ic_func_profiler): Access
2896         __gcov_indirect_call.callee field.
2897         (gimple_init_gcov_profiler): Use ptr_type_node.
2898         * value-prof.c (gimple_ic): Use ptr_type_node.
2900 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2902         PR tree-optimization/85787
2903         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2904         into this function and add support for detecting multiple phis.
2905         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2907 2018-10-04  Martin Liska  <mliska@suse.cz>
2909         PR ipa/87491
2910         * ipa-inline.c (inline_to_all_callers_1):
2911         Call ultimate_alias_target for node being inlined.
2913 2018-10-03  Jeff Law  <law@redhat.com>
2915         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2916         target's wchar_t.
2917         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2918         * tree.h (get_typenode_from_name): Prototype.
2920 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
2922         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2923         Change operand 2 predicate to nonimmediate_operand.
2924         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2926 2018-10-03  Martin Sebor  <msebor@redhat.com>
2927             Jeff Law  <law@redhat.com>
2929         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2930         initialize it.
2931         (get_string_length): Detect unterminated arrays.
2932         (format_string): Same.
2933         (format_directive): Warn about unterminated arrays.
2934         (handle_gimple_call): Mark statements with no_warning as needed.
2936 2018-10-03  Jim Wilson  <jimw@sifive.com>
2938         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2939         also define __riscv_abi_rve.  Delete trailing white space.
2941 2018-10-03  Paul Koning  <ni1d@arrl.net>
2943         Enable LRA register allocator for PDP11.
2944         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2945         (R): Likewise.
2946         (D): Likewise.
2947         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2948         * config/pdp11/pdp11.opt (-mlra): New option.
2949         * doc/invoke.texi (PDP-11 Options): Document -mlra.
2951 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
2953         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2954         (*<absneg:code>extend<mode>xf2): Ditto.
2956 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
2958         PR tree-optimization/87415
2959         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2960         precision fields.
2962 2018-10-02  Jeff Law  <law@redhat.com>
2964         * gimple-fold.c (get_range_strlen): Only set *nonstr when
2965         an unterminated string is discovered.  Bubble up range
2966         even for unterminated strings.
2967         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2968         indicates the string was not terminated via NONSTR.
2970 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
2972         * tree-vrp.c (extract_range_from_unary_expr): Special case all
2973         pointer conversions.
2974         Do not do anything special for anti-ranges.
2976 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
2978         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2979         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2981 2018-10-03  Martin Liska  <mliska@suse.cz>
2983         PR gcov-profile/86109
2984         * coverage.c (coverage_begin_function): Do not
2985         mark lambdas as artificial.
2986         * tree-core.h (struct GTY): Remove tm_clone_flag
2987         and introduce new lambda_function.
2988         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2990 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2992         PR target/87474
2993         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2994         P8_VECTOR and VSX are enabled.
2996 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
2998         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2999         0x3907 as CPU model number.
3001 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
3003         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
3004         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
3005         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
3006         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
3007         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
3008         * config/s390/s390.md: Likewise. Rename also the cpu attribute
3009         value from arch12 to z14.
3011 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
3013         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
3014         (isinfxf2): Ditto.
3015         (isinf<mode>2): Ditto.
3017 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
3019         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
3020         before emitting fxam.  Perform calculations in XFmode.
3022 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
3024         * match.pd (((X /[ex] A) +- B) * A): New transformation.
3026 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
3028         PR middle-end/87319
3029         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
3030         * tree.c (signed_or_unsigned_type_for): Handle complex.
3032 2018-10-02  Jeff Law  <law@redhat.com>
3034         * gimple-fold.c (get_range_strlen): Remove dead code.
3036 2018-10-02  Martin Sebor  <msebor@redhat.com>
3037             Jeff Law  <law@redhat.com>
3039         * builtins.c (unterminated_array): Add new arguments.
3040         If argument is not terminated, bubble up size and exact
3041         state to callers.
3042         (expand_builtin_strnlen): Detect, avoid expanding
3043         and diagnose unterminated arrays.
3044         (c_strlen): Fill in offset of start of unterminated strings.
3045         * builtins.h (unterminated_array): Update prototype.
3047 2018-10-02  Richard Biener  <rguenther@suse.de>
3049         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
3050         of haddv4df, first reduce to SSE width and exploit the fact
3051         that we only need element zero with the reduction result.
3052         (reduc_plus_scal_v2df): Likewise.
3054 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
3056         * dojump.h (do_jump): Delete.
3057         (do_jump_1): Likewise.
3058         (split_comparison): Move around.
3059         * dojump.c (do_jump): Make static.
3060         (do_jump_1): Likewise.
3061         (jumpifnot): Move around.
3062         (jumpifnot_1): Likewise.
3063         (jumpif): Likewise.
3064         (jumpif_1): Likewise.
3065         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
3067 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
3069         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
3070         insns in the delay slot and add_insn_after for the jump insn.
3072 2018-10-02  Richard Biener  <rguenther@suse.de>
3074         * tree-inline.c (expand_call_inline): Use the location of
3075         the callee declaration for the inline-entry marker.
3076         * final.c (notice_source_line): Remove special-casing of
3077         NOTE_INSN_INLINE_ENTRY.
3079 2018-10-01  Carl Love  <cel@us.ibm.com>
3081         PR 69431
3082         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
3083         (__builtin_mtfsb0): New.
3084         (__builtin_mtfsb1): New.
3085         ( __builtin_set_fpscr_rn): New.
3086         (__builtin_set_fpscr_drn): New.
3087         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
3088         (rs6000_expand_set_fpscr_rn_builtin): Add.
3089         (rs6000_expand_set_fpscr_drn_builtin): Add.
3090         (rs6000_expand_builtin): Add case statement entries for
3091         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
3092         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
3093         RS6000_BUILTIN_MFFSL.
3094         (rs6000_init_builtins): Add ftype initialization and def_builtin
3095         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
3096         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
3097         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
3098         rs6000_mffscdrn): Add define_insn.
3099         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
3100         * doc/extend.texi: Add documentation for the builtins.
3102 2018-10-01  Richard Biener  <rguenther@suse.de>
3104         PR tree-optimization/87465
3105         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
3106         causing branch miscounts.
3108 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3110         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
3111         aarch64_option_default_param):  New.
3112         (params.h): Include.
3113         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
3114         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
3115         stack-clash protection validation code.
3117 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3119         * params.c (validate_param): New.
3120         (add_params): Use it.
3121         (set_param_value): Refactor param validation into validate_param.
3122         (diagnostic.h): Include.
3123         * diagnostic.h (diagnostic_ready_p): New.
3125 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3127         * params.c (set_param_value):
3128         Add index of parameter being validated.
3129         * common/common-target.def (option_validate_param): New.
3130         * common/common-targhooks.h (default_option_validate_param): New.
3131         * common/common-targhooks.c (default_option_validate_param): New.
3132         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
3133         * doc/tm.texi: Regenerate.
3135 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3137         PR target/86486
3138         * config/aarch64/aarch64.c (aarch64_override_options_internal):
3139         Add validation for stack-clash parameters and set defaults.
3141 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3143         PR target/86486
3144         * configure.ac: Add stack-clash-protection-guard-size.
3145         * doc/install.texi: Document it.
3146         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
3147         * params.def: Update comment for guard-size.
3148         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
3149         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
3150         * configure: Regenerate.
3152 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3154         PR target/86486
3155         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
3156         STACK_DYNAMIC_OFFSET): New.
3157         * config/aarch64/aarch64.c (aarch64_layout_frame):
3158         Update outgoing args size.
3159         (aarch64_stack_clash_protection_alloca_probe_range,
3160         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3162 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3164         PR target/86486
3165         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
3166         probe ranges.
3167         * target.def (stack_clash_protection_alloca_probe_range): New.
3168         (stack_clash_protection_final_dynamic_probe): Remove.
3169         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
3170         (default_stack_clash_protection_final_dynamic_probe): Remove.
3171         * targhooks.c: Likewise.
3172         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3173         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
3174         * doc/tm.texi: Regenerate.
3176 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3178         PR target/86486
3179         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
3180         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
3181         aarch64_clamp_to_uimm12_shift): New.
3182         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
3183         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
3185 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3187         PR target/86486
3188         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
3190 2018-10-01  Jeff Law  <law@redhat.com>
3191             Richard Sandiford <richard.sandiford@linaro.org>
3192             Tamar Christina  <tamar.christina@arm.com>
3194         PR target/86486
3195         * config/aarch64/aarch64.md
3196         (probe_stack_range): Add k (SP) constraint.
3197         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
3198         STACK_CLASH_MAX_UNROLL_PAGES): New.
3199         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
3200         stack probes for stack clash.
3201         (aarch64_allocate_and_probe_stack_space): New.
3202         (aarch64_expand_prologue): Use it.
3203         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
3204         (aarch64_sub_sp): Add emit_move_imm optional param.
3206 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
3208         PR tree-optimization/87261
3209         * match.pd: Remove trailing whitespace.
3210         Add (x & y) | ~(x | y) -> ~(x ^ y),
3211         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
3213 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
3215         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
3216         constraints.
3217         (ashlsi3_insn): Update instruction constraints.
3218         (ashrsi3_insn): Likewise.
3219         (rotrsi3): Likewise.
3220         (add_shift): Likewise.
3221         * config/arc/constraints.md (Csz): New 32 bit constraint. It
3222         avoids placing in the limm field small constants which, otherwise,
3223         could end into a small instruction.
3225 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
3227         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
3228         destination register is not odd-even.
3229         (umaddsidi4_split): Likewise.
3231 2018-10-01  Richard Biener  <rguenther@suse.de>
3233         * tree-inline.c (expand_call_inline): Store origin of fn
3234         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
3235         * tree.c (block_ultimate_origin): Simplify and do some
3236         checking.
3238 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
3240         * config/i386/mmx.md (EMMS): New int iterator.
3241         (emms): New int attribute.
3242         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
3243         EMMS int iterator.  Explicitly declare clobbers.
3244         (mmx_emms): Remove expander.
3245         (mmx_femms): Ditto.
3246         * config/i386/predicates.md (emms_operation): Remove predicate.
3247         (vzeroall_pattern): New predicate.
3248         (vzeroupper_pattern): Rename from vzeroupper_operation.
3249         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
3250         vzeroupper_pattern and vzeroall_pattern predicates.
3252 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
3254         PR rtl-optimization/86939
3255         * ira-lives.c (make_hard_regno_born): Rename from this...
3256         (make_hard_regno_live): ... to this.  Remove update to conflict
3257         information.  Update function comment.
3258         (make_hard_regno_dead): Add conflict information update.  Update
3259         function comment.
3260         (make_object_born): Rename from this...
3261         (make_object_live): ... to this.  Remove update to conflict information.
3262         Update function comment.
3263         (make_object_dead):  Add conflict information update.  Update function
3264         comment.
3265         (mark_pseudo_regno_live): Call make_object_live.
3266         (mark_pseudo_regno_subword_live): Likewise.
3267         (mark_hard_reg_dead): Update function comment.
3268         (mark_hard_reg_live): Call make_hard_regno_live.
3269         (process_bb_node_lives): Likewise.
3270         * lra-lives.c (make_hard_regno_born): Rename from this...
3271         (make_hard_regno_live): ... to this.  Remove update to conflict
3272         information.  Remove now uneeded check_pic_pseudo_p argument.
3273         Update function comment.
3274         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
3275         to conflict information.  Update function comment.
3276         (mark_pseudo_live): Remove update to conflict information.  Update
3277         function comment.
3278         (mark_pseudo_dead): Add conflict information update.
3279         (mark_regno_live): Call make_hard_regno_live.
3280         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
3281         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
3283 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
3285         PR target/87370
3286         * config/i386/i386.c (construct_container): Use TImode for
3287         BLKmode values in 2 integer registers.
3289 2018-09-29  Jeff Law  <law@redhat.com>
3291         * builtins.c (unterminated_array): Pass in c_strlen_data * to
3292         c_strlen rather than just a tree *.
3293         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3294         Update recursive calls appropriately.  If caller did not provide a
3295         suitable data pointer, create a local one.  When a non-terminated
3296         string is discovered, bubble up information about the string via the
3297         c_strlen_data object.
3298         * builtins.h (c_strlen): Update prototype.
3299         (c_strlen_data): New structure.
3300         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3301         For a type 2 call, if c_strlen indicates a non-terminated string
3302         use the length of the non-terminated string.
3303         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3305 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
3307         PR target/87467
3308         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3309         __m512d type for __A argument rather than __m512.
3311 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
3313         * match.pd (simple_comparison): Don't optimize if either operand is
3314         a function pointer when target needs function pointer canonicalization.
3316 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
3318         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3319         power5 .. power9 to remove indirection.
3320         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3321         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3322         ASM_CPU_476_SPEC): Delete.
3323         (ASM_CPU_SPEC): Adjust.
3324         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3325         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3327 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
3329         * config.in: Delete HAVE_AS_DCI.
3330         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3331         * config/rs6000/rs6000.h: Ditto.
3332         * configure.ac: Delete HAVE_AS_DCI.
3333         * configure: Regenerate.
3335 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
3337         * config.in (HAVE_AS_LWSYNC): Delete.
3338         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3339         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3340         do it as a .long .
3341         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3342         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3343         as a .long .
3344         * configure.ac: Delete HAVE_AS_LWSYNC.
3345         * configure: Regenerate.
3347 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
3348             Pierre-Marie de Rodat  <derodat@adacore.com>
3350         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3351         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3352         (cgraph_node::create_thunk): Add indirect_offset parameter.
3353         (thunk_adjust): Likewise.
3354         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3355         and initialize the corresponding field with it.
3356         (cgraph_node::dump): Dump indirect_offset field.
3357         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3358         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3359         (thunk_adjust): Add indirect_offset parameter and deal with it.
3360         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3361         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
3362         or if the thunk is external or local.  Fix formatting.  Do not chain
3363         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
3364         if any, in the GIMPLE representation.
3365         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3366         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3367         (input_node): Read indirect_offset field.
3368         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3369         call to thunk_adjust.
3370         * tree-nested.c (struct nesting_info): Add thunk_p field.
3371         (create_nesting_tree): Set it.
3372         (convert_all_function_calls): Copy static chain from targets to thunks.
3373         (finalize_nesting_tree_1): Return early for thunks.
3374         (unnest_nesting_tree_1): Do not finalize thunks.
3375         (gimplify_all_functions): Do not gimplify thunks.
3377 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
3379         * opt-suggestions.c (option_proposer::build_option_suggestions):
3380         Release "option_values".
3382 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
3384         * coverage.c (get_coverage_counts): Convert problem-reporting dump
3385         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3386         * dumpfile.c (kind_as_string): New function.
3387         (dump_loc): Rather than a hardcoded prefix of "note: ", use
3388         kind_as_string to vary the prefix based on dump_kind.
3389         (selftest::test_capture_of_dump_calls): Update for above.
3391 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
3393         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3394         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
3396 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
3398         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3399         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3400         INVALID_REGNUM instead of FPSR_REG.
3401         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3402         * config/i386/i386.md: Update comment of FP compares.
3403         (fldenv): Do not clobber FPSR_REG.
3405 2018-09-28  Richard Biener  <rguenther@suse.de>
3407         * tree.h (BLOCK_ORIGIN): New.
3408         * omp-expand.c (grid_expand_target_grid_body): Assign
3409         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3410         * tree-inline.c (remap_block): Likewise.
3411         * auto-profile.c (get_function_decl_from_block): Simplify
3412         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3413         * langhooks.c (lhd_print_error_function): Likewise.
3414         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3415         Likewise.
3416         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3417         * tree.c (block_nonartificial_location): Likewise.
3418         (block_ultimate_origin): Likewise.
3419         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
3420         no longer needed LTO case.
3422 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
3423             Jan Hubicka  <jh@suse.cz>
3424             Martin Jambor  <mjambor@suse.cz>
3426         * simplify-rtx.c (simplify_merge_mask): New function.
3427         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3428         same masks are used in op1 or op2.
3429         (test_vec_merge): New function.
3430         (test_vector_ops): Call test_vec_merge.
3432 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
3434         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3435         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3436         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3437         (cypress_costs): Set it.
3438         (supersparc_costs): Likewise.
3439         (hypersparc_costs): Likewise.
3440         (leon_cost): Likewise.
3441         (leon3_costs): Likewise.
3442         (sparclet_costs): Likewise.
3443         (ultrasparc_costs): Likewise.
3444         (ultrasparc_costs): Likewise.
3445         (niagara_costs): Likewise.
3446         (niagara2_costs): Likewise.
3447         (niagara3_costs): Likewise.
3448         (niagara4_costs): Likewise.
3449         (niagara7_costs): Likewise.
3450         (m8_costs): Likewise.
3451         (TARGET_CAN_FOLLOW_JUMP): Define.
3452         (pass_work_around_errata::gate): Minor tweak.
3453         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3454         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3455         Automaitcally clear MASK_FSMULD mask for V7 processors.
3456         (sparc_can_follow_jump): New static function.
3457         (output_ubranch): Deal with CROSSING_JUMP_P.
3458         (sparc_use_sched_lookahead): Rewrite using switch statement.
3459         (sparc_issue_rate): Reorder.
3460         (sparc_branch_cost): New function.
3462 2018-09-27  Martin Sebor  <msebor@redhat.com>
3464         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3465         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3466         (int_fits_type_p): Same.
3468 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
3470         * config/i386/i386.md (FPCR_REG): Remove.
3471         (UNSPEC_FLDCW): Remove.
3472         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3473         (x86_fldcw_1): Remove insn pattern.
3474         (fnstenv): Do not clobber FPCR_REG.
3475         (fldenv): Ditto.
3476         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3477         (CALL_USED_REGISTERS): Ditto.
3478         (REG_ALLOC_ORDER): Ditto.
3479         (REG_CLASS_CONTENTS): Ditto.
3480         (HI_REGISTER_NAMES): Ditto.
3481         (ADDITIONAL_REGISTER_NAMES): Use defines instead
3482         of numerical constants.
3483         * config/i386/i386.c (regclass_map): Remove fpsr register.
3484         (dbx_register_map): Ditto.
3485         (dbx64_register_map): Ditto.
3486         (svr4_dbx_register_map): Ditto.
3487         (print_reg): Do not handle FPCR_REG.
3489 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
3491         PR target/87149
3492         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3493         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3494         Delete, always treat as true.
3495         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3496         Ditto.  Simplify remaining code.
3497         * config/powerpcspe/powerpcspe.h: Ditto.
3498         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3499         Simplify remaining code.
3500         (rs6000_expand_builtin): Ditto.
3501         * config/rs6000/rs6000.h: Ditto.
3502         * configure.ac: Ditto.
3503         * configure: Regenerate.
3505 2018-09-27  Martin Liska  <mliska@suse.cz>
3507         * coverage.c (get_coverage_counts): Revert the formatting
3508         of missing profile opt info.
3510 2018-09-27  Richard Biener  <rguenther@suse.de>
3512         PR debug/37801
3513         PR debug/87440
3514         * dwarf2out.c (set_block_origin_self): Do not mark outermost
3515         block as we do not output that.
3516         (gen_inlined_subroutine_die): Elide the originally outermost
3517         block, matching what we do for concrete instances.
3518         (decls_for_scope): Add parameter specifying whether to recurse
3519         to subblocks.
3521 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
3522             Tom de Vries  <tom@codesourcery.com>
3524         PR 82089
3526         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3527         STORE_FLAG_VALUE == 1.
3529 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
3531         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3532         constant definitions.
3533         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3534         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3535         ("speculation_barrier"): New expander definition.
3537 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
3539         PR gcov-profile/86957
3540         * common.opt: New warning option -Wmissing-profile.
3541         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3542         * doc/invoke.texi: Document -Wmissing-profile.
3544 2018-09-26  Jim Wilson  <jimw@sifive.com>
3546         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3547         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3549 2018-09-26  Martin Sebor  <msebor@redhat.com>
3551         * tree.c (zerop): Change return type to bool.
3552         (integer_zerop, integer_onep, integer_each_onep): Same.
3553         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3554         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3555         (real_onep, real_minus_onep, chain_index): Same.
3556         (print_type_hash_statistics, type_list_equal): Same.
3557         * tree.h (zerop): Same.
3558         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3559         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3560         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3561         (real_onep, real_minus_onep, chain_index): Same.
3562         (print_type_hash_statistics, type_list_equal): Same.
3564 2018-09-26  Jim Wilson  <jimw@sifive.com>
3566         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3568 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
3570         PR target/87414
3571         * config/i386/i386.c: Include debug.h and dwarf2out.h.
3572         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3573         call.
3575 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
3577         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3579 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
3581         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3582         and FP_SECOND_SSE_REGS.
3583         (REG_CLASS_NAMES): Ditto.
3584         (REG_CLASS_CONTENTS): Ditto.
3585         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3586         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3587         (ix86_preferred_output_reload_class): Ditto.
3588         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3589         clobber constraint to "=&f".
3590         (fix_truncdi_i387): Ditto.
3591         (lrintxfdi2): Ditto.
3592         (fistdi2_<rounding>): Ditto.
3593         (fpremxf4_i387): Change "=u" constraint to "=f".
3594         (fprem1xf4_i387): Ditto.
3595         (sincosxf3): Ditto.
3596         (fptanxf4_i387): Ditto.
3597         (fxtractxf3_i387): Ditto.
3598         (fscalexf4_i387): Ditto.
3599         (atan2xf3): Change "u" constraint to "f".
3600         (fyl2xxf3_i387): Ditto.
3601         (fyl2xp1xf3_i387): Ditto.
3603 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
3605         PR target/87439
3606         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3607         for removed I387_MASK_PM entity.
3610 2018-09-26  Jeff Law  <law@redhat.com>
3611         Revert
3612         2018-09-26  Alexey Neyman  <stilor@att.net>
3614         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3615         headers are no longer pulled in by <isl/val.h>.
3617 2018-09-26  Richard Biener  <rguenther@suse.de>
3619         PR debug/87443
3620         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3621         or concrete instance DIE to the tree.  Create abstract origin
3622         attributes also for concrete instances.
3624 2018-09-26  Alexey Neyman  <stilor@att.net>
3626         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3627         headers are no longer pulled in by <isl/val.h>.
3629 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
3631         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3632         Use new helper functions.
3633         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3634         Use new helper functions.
3635         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3636         aarch_mm_needs_release): New declarations.
3637         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3638         aarch_mm_needs_release): New.
3640 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3642         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3643         (arm32_output_mi_thunk): Deal with long calls.
3645 2018-09-26  Richard Biener  <rguenther@suse.de>
3647         PR debug/87428
3648         PR debug/87362
3649         * tree-inline.c (expand_call_inline): When the location
3650         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3651         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3652         the inserted BLOCK to make inlined_function_outer_scope_p
3653         recognize it.
3654         * dwarf2out.c (add_call_src_coords_attributes): Do not add
3655         coords for reserved locations.
3657 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
3659         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3660         (*call_indirect_nonlocal_sysv<mode>): Ditto.
3661         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3662         (*sibcall_nonlocal_sysv<mode>): Ditto.
3663         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3664         (<bd>_<mode>): Ditto.
3665         (<bd>tf_<mode>): Ditto.
3667 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
3669         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3670         control string as a list of templates instead of as C code.
3671         (*altivec_movti): Ditto.
3672         * config/rs6000/darwin.md (movdf_low_di): Ditto.
3674 2018-09-25  Jim Wilson  <jimw@sifive.com>
3676         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3677         when target symbol is weak.
3679 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3681         PR c/87387
3682         * builtins.c (unterminated_array): Simplify.
3683         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
3684         where pointer arithmetic is safe.
3686 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
3688         PR target/86987
3689         * config/rs6000/altivec.md (altivec_vspltb): Use
3690         const_0_to_15_operand instead of u5bit_cint_operand.
3691         (*altivec_vspltb_internal): Ditto.
3692         (altivec_vspltb_direct): Ditto.
3693         (altivec_vsplth): Use const_0_to_7_operand instead of
3694         u5bit_cint_operand.
3695         (*altivec_vsplth_internal): Ditto.
3696         (altivec_vsplth_direct): Ditto.
3697         (altivec_vspltw): Use const_0_to_3_operand instead of
3698         u5bit_cint_operand.
3699         (*altivec_vspltw_internal): Ditto.
3700         (altivec_vspltw_direct): Ditto.
3701         (altivec_vspltsf): Ditto.
3702         (*altivec_vspltsf_internal): Ditto.
3703         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3704         various splats with the proper size immediate.  Reorder the various
3705         cases by ascending size of immediate, and put all such together.
3707 2018-09-25  Richard Biener  <rguenther@suse.de>
3709         PR debug/83941
3710         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3711         GC-ification.
3712         (maybe_create_die_with_external_ref): Do not create
3713         DW_TAG_imported_unit here.
3714         (add_abstract_origin_attribute): Handle external BLOCK refs.
3715         (dwarf2out_abstract_function): Simplify LTO case.
3716         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3717         rather than using maybe_create_die_with_external_ref.
3719 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
3721         PR target/71278
3722         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3723         (frndintxf2_mask_pm_i387): Ditto.
3724         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3725         Enable for !flag_trapping_math.
3726         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3727         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3728         Change operand 1 predicate to nonimmediate_operand.
3729         (attr "i387_cw"): Remove mask_pm.
3730         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3731         (enum ix86_entity): Remove I387_MASK_PM.
3732         * config/i386/i386.c (ix86_i387_mode_needed): Do not
3733         handle I387_MASK_PM.
3734         (ix86_mode_needed): Ditto.
3735         (ix86_mode_after): Ditto.
3736         (ix86_mode_entry): Ditto.
3737         (ix86_mode_exit): Ditto.
3738         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3740 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
3742         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3743         to_update_switch_stmts to vNULL instead of calling create on them
3744         immediately.
3746 2018-09-25  Richard Biener  <rguenther@suse.de>
3748         PR tree-optimization/87402
3749         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3750         (visit_phi): Re-instantiate handling of supposed to be VARYING
3751         but non-VARYING backedge value.
3753 2018-09-25  Richard Biener  <rguenther@suse.de>
3755         PR debug/83941
3756         * dwarf2out.c (struct sym_off_pair): New.
3757         (external_die_map): New global.
3758         (lookup_decl_die): When in LTO create DIEs lazily from the
3759         external_die_map.
3760         (lookup_block_die): New function, create DIEs lazily in LTO.
3761         (equate_block_to_die): New function.
3762         (dwarf2out_die_ref_for_decl): During WPA get the association
3763         from the external DIE map.
3764         (dwarf2out_register_external_die): Record mapping into the
3765         external DIE map.
3766         (maybe_create_die_with_external_ref): New function split out from
3767         DIE generation part of old dwarf2out_register_external_die.
3768         (add_abstract_origin_attribute): Do not return the DIE.  When
3769         in LTO reference externals directly.
3770         (dwarf2out_abstract_function): When in LTO ignore calls for
3771         decls with external DIEs (already present abstract instances).
3772         (gen_call_site_die): Adjust.
3773         (add_high_low_attributes): Likewise.
3774         (gen_lexical_block_die): Likewise.
3775         (gen_inlined_subroutine_die): Likewie.
3776         (gen_block_die): Likewise.
3777         (dwarf2out_inline_entry): Likewise.
3778         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3779         DIEs.
3781 2018-09-25  Martin Liska  <mliska@suse.cz>
3783         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3784         integers and not by a float value.
3786 2018-09-25  Martin Liska  <mliska@suse.cz>
3788         PR fortran/87394
3789         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3790         instead of NULL.
3791         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3792         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3793         * godump.c (go_format_type): Remove extra parenthesis.
3795 2018-09-25  Martin Liska  <mliska@suse.cz>
3797         * alias.c (set_dest_equal_p): Remove unused function.
3798         * config/i386/i386.c (def_builtin_pure2): Likewise.
3799         * diagnostic-show-locus.c (class layout): Remove
3800         unused field.
3801         (layout::layout): Likewise here.
3802         * dump-context.h (class temp_dump_context): Likewise.
3803         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3804         (add_AT_loclistsptr): Likewise.
3805         (add_AT_offset): Likewise.
3806         (get_AT_hi_pc): Likewise.
3807         (is_comdat_die): Likewise.
3808         (type_is_enum): Likewise.
3809         (ceiling): Likewise.
3810         (add_AT_vms_delta): Likewise.
3811         (is_class_die): Likewise.
3812         * edit-context.c (class line_event): Remove unused field.
3813         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3814         unused function.
3815         * ipa-cp.c (ipa_get_vr_lat): Likewise.
3816         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3817         (ok_for_base_p_nonstrict): Likewise.
3818         * tree-chrec.c (is_not_constant_evolution): Likewise.
3819         (chrec_fold_poly_cst): Likewise.
3820         * tree-if-conv.c (has_pred_critical_p): Likewise.
3821         * tree-ssa-coalesce.c (print_exprs): Likewise.
3822         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3823         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3824         * tree-vrp.c (value_ranges_intersect_p): Likewise.
3825         (value_range_nonnegative_p): Likewise.
3827 2018-09-25  Martin Liska  <mliska@suse.cz>
3829         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3830         Do not handle "GNU Pascal".
3831         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3832         Likewise.
3833         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3834         from documentation. Likewise.
3835         * dbxout.c (dbxout_range_type): Likewise.
3836         * doc/cpp.texi: Likewise.
3837         * doc/extend.texi: Likewise.
3838         * doc/frontends.texi: Likewise.
3839         * doc/invoke.texi: Remove Pascal entry.
3840         * tree.def (CLEANUP_POINT_EXPR): Likewise.
3841         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3843 2018-09-25  Martin Liska  <mliska@suse.cz>
3845         PR middle-end/86078
3846         * doc/invoke.texi: Document all parameters and remove default
3847         of the parameters.
3849 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
3851         PR bootstrap/87417
3852         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3853         contains HOST_WIDE_INTs when computing its size.
3855 2018-09-24  Jim Wilson  <jimw@sifive.com>
3857         PR target/87391
3858         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3859         not TARGET_RVE.
3860         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3862 2018-09-24  Andrew Pinski  <apinski@marvell.com>
3864         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3865         access prev before checking it for NULLness in the
3866         AARCH64_FUSE_CMP_BRANCH case.
3868 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
3870         PR target/82699
3871         * config/i386/i386.c (rest_of_insert_endbranch): Set
3872         endbr_queued_at_entrance to true and don't insert ENDBR if
3873         x86_function_profiler will be called.
3874         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3875         is true.
3876         * config/i386/i386.h (machine_function): Add
3877         endbr_queued_at_entrance.
3879 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3881         * genattrtab.c (mk_attr_alt): Use alternative_mask.
3882         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3883         types.
3884         (check_attr_test): Use alternative_mask.
3885         (get_attr_value): Likewise.
3886         (compute_alternative_mask): Use alternative_mask and XWINT.
3887         (make_alternative_compare): Use alternative_mask.
3888         (attr_alt_subset_p): Use XWINT.
3889         (attr_alt_subset_of_compl_p): Likewise.
3890         (attr_alt_intersection): Use alternative_mask and XWINT.
3891         (attr_alt_union): Likewise.
3892         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3893         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3894         (simplify_test_exp): Use alternative_mask and XWINT.
3895         (write_test_expr): Use alternative_mask and XWINT, adjust bit
3896         number calculation to support 64 bits.  Generate code that
3897         checks 64-bit masks.
3898         (main): Use alternative_mask.
3899         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3901 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3903         PR target/80080
3904         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3905         RETURN+USE when returning via %r14.
3907 2018-09-24  Martin Liska  <mliska@suse.cz>
3909         * gcov.c (output_lines): Print colorization legend
3910         for both flag_use_colors and flag_use_hotness_colors.
3911         Reword the help.
3913 2018-09-24  Martin Liska  <mliska@suse.cz>
3915         * coverage.c (get_coverage_counts): Use warning_at
3916         with current_function_decl location. Use %qD in warning
3917         message.
3919 2018-09-24  Martin Liska  <mliska@suse.cz>
3921         * memory-block.h (memory_block_pool::release): Annotate with
3922         valgrind that the memory is not accessible.
3924 2018-09-24  Martin Liska  <mliska@suse.cz>
3926         PR sanitizer/85774
3927         * asan.c: Make asan_handled_variables extern.
3928         * asan.h: Likewise.
3929         * cfgexpand.c (expand_stack_vars): Make sure
3930         a representative is unpoison if another
3931         variable in the partition is handled by
3932         use-after-scope sanitization.
3934 2018-09-24  Richard Biener  <rguenther@suse.de>
3936         PR tree-optimization/63155
3937         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3938         the worklist when the edge of the respective argument isn't
3939         executable.
3941 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3943         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3944         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3945         (MASK_CLASS_P): Update for rename.
3946         (MAYBE_MASK_CLASS_P): Ditto.
3947         (REG_CLASS_NAMES): Update.
3948         (REG_CLASS_CONTENT): Update.
3949         * config/i386/i386.c (regclass_map): Update for MASK_REG
3950         and ALL_MASK_REGS rename.
3951         * config/i386/constraints.md (Yk): Update for rename.
3952         (k): Ditto.
3954 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3956         * config/i386/i386.h (enum reg_class): Remove
3957         EVEX_SSE_REGS and MOD4_SSE_REGS.
3958         (REG_CLASS_NAMES): Update.
3959         (REG_CLASS_CONTENT): Update.
3960         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3961         registers as ALL_SSE_REGS.
3962         (ix86_additional_allocno_class_p): Remove.
3963         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3964         (ix86_register_priority): Lower priority of EVEX SSE registers.
3965         Use IN_RANGE macro where appropriate.
3966         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3967         AVX-5124VNNIW checks.
3968         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3969         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3970         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3971         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3972         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3973         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3974         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3975         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3976         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3977         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3978         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3979         * config/i386/constraints.md (Yh): Remove.
3981 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3983         * config/i386/i386.c (regclass_map): Declare integer REX registers
3984         as GENERAL_REGS.
3986 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
3988         * doc/service.texi (Service): Switch the fsf.org link to https.
3990 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3992         PR target/86798
3993         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3994         Define to speculation_safe_value_not_needed.
3996 2018-09-21  Florian Weimer  <fweimer@redhat.com>
3998         PR middle-end/81035
3999         * doc/extend.texi (Common Function Attributes): Mention that
4000         noreturn suppresses tail call optimization.
4002 2018-09-21  Jeff Law  <law@redhat.com>
4004         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
4005         vr_values::cleanup_edges_and_switches.
4006         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
4007         vr_values class.
4008         (identify_jump_threads): Remove EDGE_IGNORE handling.
4009         (execute_vrp): Move handling of to_remove_edges and
4010         to_update_switch_stmts into vr_values class member functions.
4011         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
4012         (to_update_switch_stmts): Likewise.
4013         * vr-values.c: Include cfghooks.h.
4014         (vr_values::vr_values): Initialize to_remove_edges and
4015         to_update_switch_stmts.
4016         (vr_values::~vr_values): Verify to_remove_edges and
4017         to_update_switch_stmts are empty.
4018         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
4019         (vr_values::cleanup_edges_and_switches): New member function.
4020         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
4021         function.  Add new data members.
4023 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
4025         PR tree-optimization/87309
4026         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
4027         calls with pflags and alt_flags.
4028         (selftest::test_capture_of_dump_calls): Add test of interaction of
4029         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
4031 2018-09-21  Olivier Hainque  <hainque@adacore.com>
4033         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
4035 2018-09-21  Olivier Hainque  <hainque@adacore.com>
4037         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
4039 2018-09-21  Olivier Hainque  <hainque@adacore.com>
4041         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
4042         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
4043         (VXWORKS_LIBS_RTP): Minor reordering.
4045 2018-09-21  Olivier Hainque  <hainque@adacore.com>
4047         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
4048         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
4050 2018-09-21  Olivier Hainque  <hainque@adacore.com>
4052         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
4053         (PTRDIFF_TYPE): Likewise.
4055 2018-09-21  Olivier Hainque  <hainque@adacore.com>
4057         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
4058         triplet, similar to support for VxWorks7.
4059         * config/vxworks-dummy.h: Provide a default definition
4060         of TARGET_VXWORKS64 to 0.
4062 2018-09-21  Olivier Hainque  <hainque@adacore.com>
4064         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
4065         * config/vxworks-dummy.h: here.
4067 2018-09-21  Olivier Hainque  <hainque@adacore.com>
4069         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
4071 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
4072             Bo Zhou  <zbo.zhou@hisilicon.com>
4074         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
4075         * config/aarch64/aarch64-tune.md: Regenerated.
4076         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
4077         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
4078         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
4080 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
4081             Julian Brown  <julian@codesourcery.com>
4083         * builtins.c (get_builtin_sync_mem): Handle address spaces.
4085 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
4087         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
4088         if the call takes a static chain.
4090 2018-09-21  Martin Liska  <mliska@suse.cz>
4092         * auto-profile.c (autofdo_source_profile::read): Do not
4093         set sum_all.
4094         (read_profile): Do not add working sets.
4095         (read_autofdo_file): Remove sum_all.
4096         (afdo_callsite_hot_enough_for_early_inline): Remove const
4097         qualifier.
4098         * coverage.c (struct counts_entry): Remove gcov_summary.
4099         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
4100         do not support GCOV_TAG_PROGRAM_SUMMARY.
4101         (get_coverage_counts): Remove summary and expected
4102         arguments.
4103         * coverage.h (get_coverage_counts): Likewise.
4104         * doc/gcov-dump.texi: Remove -w option.
4105         * gcov-dump.c (dump_working_sets): Remove.
4106         (main): Do not support '-w' option.
4107         (print_usage): Likewise.
4108         (tag_summary): Likewise.
4109         * gcov-io.c (gcov_write_summary): Do not dump
4110         histogram.
4111         (gcov_read_summary): Likewise.
4112         (gcov_histo_index): Remove.
4113         (gcov_histogram_merge): Likewise.
4114         (compute_working_sets): Likewise.
4115         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
4116         it not obsolete.
4117         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
4118         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
4119         (GCOV_HISTOGRAM_SIZE): Remove.
4120         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
4121         (struct gcov_summary): Simplify rapidly just
4122         to runs and sum_max fields.
4123         (gcov_histo_index): Remove.
4124         (NUM_GCOV_WORKING_SETS): Likewise.
4125         (compute_working_sets): Likewise.
4126         * gcov-tool.c (print_overlap_usage_message): Remove
4127         trailing empty line.
4128         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
4129         (output_lines): Remove program related line.
4130         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
4131         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
4132         histogram.
4133         (input_profile_summary): Do not read it.
4134         (merge_profile_summaries): And do not merge it.
4135         (input_symtab): Do not call removed function.
4136         * modulo-sched.c (sms_schedule): Do not print sum_max.
4137         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
4138         removed when histogram method was invented.
4139         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
4140         mode.
4141         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
4142         GCOV coding style.
4143         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
4144         and dump selected value.
4145         * profile.c (add_working_set): Remove.
4146         (get_working_sets): Likewise.
4147         (find_working_set): Likewise.
4148         (get_exec_counts): Do not work with working sets.
4149         (read_profile_edge_counts): Do not inform as sum_max is removed.
4150         (compute_branch_probabilities): Likewise.
4151         (compute_value_histograms): Remove argument for call of
4152         get_coverage_counts.
4153         * profile.h: Do not make gcov_summary const.
4155 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
4157         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
4159 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
4161         PR tree-optimization/86990
4162         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
4163         Check that the entire merged store group is made of constants only for
4164         overlapping stores.
4166 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
4168         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
4169         (VTABLE_VERIFICATION_SPEC): Likewise.
4170         (SANITIZER_EARLY_SPEC): Likewise.
4171         (SANITIZER_SPEC): Likewise.
4172         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
4173         * doc/invoke.texi (Link Options): Document -r.
4175 2018-09-20  Richard Biener <rguenther@suse.de>
4177         PR middle-end/87054
4178         * gimplify.c (gimplify_expr): Retain alignment of
4179         addressable lvalue in dereference.
4181 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
4183         PR bootstrap/87013
4184         * configure.ac: Check for .loc is_stmt support.
4185         * configure, config.in: Rebuilt.
4186         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
4187         if not supported.
4189 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
4191         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
4192         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
4193         -misel=no.
4195 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
4197         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4198         VECTOR_OTHER.
4199         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
4200         case VECTOR_OTHER.
4202 2018-09-20  Marek Polacek  <polacek@redhat.com>
4204         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
4206 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
4208         PR tree-optimization/87288
4209         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
4210         into account when determining PEELING_FOR_NITERS.
4212 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
4214         PR tree-optimization/86877
4215         * tree-vect-loop.c (vect_analyze_loop_2): Call
4216         vect_verify_datarefs_alignment.
4218 2018-09-19  Marek Polacek  <polacek@redhat.com>
4220         * doc/invoke.texi: Document -Wclass-conversion.
4222 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
4224         * config/pa/pa.c (pa_adjust_priority): Delete.
4225         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
4227         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
4228         (atomic_storehi): Likewise.
4229         (atomic_storesi): Likewise.
4230         (atomic_loaddi): Restore compare and swap exchange loop code.
4232 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
4234         PR rtl-optimization/86902
4235         * combine.c (try_combine): When changing the CC mode used, don't change
4236         an unrelated mode in other_insn to that new CC mode.
4238 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
4240         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
4241         with %T in place of calls to dump_generic_expr.
4242         (prune_runtime_alias_test_list): Likewise.
4243         (create_runtime_alias_checks): Likewise.
4244         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
4245         (vect_analyze_data_ref_dependence): Likewise.
4246         (vect_slp_analyze_data_ref_dependence): Likewise.
4247         (vect_record_base_alignment): Likewise.  Use %G in place of call
4248         to dump_gimple_stmt.
4249         (vect_compute_data_ref_alignment): Likewise.
4250         (verify_data_ref_alignment): Likewise.
4251         (vect_find_same_alignment_drs): Likewise.
4252         (vect_analyze_group_access_1): Likewise.
4253         (vect_analyze_data_ref_accesses): Likewise.
4254         (dependence_distance_ge_vf): Likewise.
4255         (dump_lower_bound): Likewise.
4256         (vect_prune_runtime_alias_test_list): Likewise.
4257         (vect_find_stmt_data_reference): Likewise.
4258         (vect_analyze_data_refs): Likewise.
4259         (vect_create_addr_base_for_vector_ref): Likewise.
4260         (vect_create_data_ref_ptr): Likewise.
4261         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
4262         (vect_can_advance_ivs_p): Likewise.
4263         (vect_update_ivs_after_vectorizer): Likewise.
4264         (vect_gen_prolog_loop_niters): Likewise.
4265         (vect_prepare_for_masked_peels): Likewise.
4266         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4267         (vect_determine_vectorization_factor): Likewise.
4268         (vect_is_simple_iv_evolution): Likewise.
4269         (vect_analyze_scalar_cycles_1): Likewise.
4270         (vect_analyze_loop_operations): Likewise.
4271         (report_vect_op): Likewise.
4272         (vect_is_slp_reduction): Likewise.
4273         (check_reduction_path): Likewise.
4274         (vect_is_simple_reduction): Likewise.
4275         (vect_create_epilog_for_reduction): Likewise.
4276         (vect_finalize_reduction:): Likewise.
4277         (vectorizable_induction): Likewise.
4278         (vect_transform_loop_stmt): Likewise.
4279         (vect_transform_loop): Likewise.
4280         (optimize_mask_stores): Likewise.
4281         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
4282         (vect_split_statement): Likewise.
4283         (vect_recog_over_widening_pattern): Likewise.
4284         (vect_recog_average_pattern): Likewise.
4285         (vect_determine_min_output_precision_1): Likewise.
4286         (vect_determine_precisions_from_range): Likewise.
4287         (vect_determine_precisions_from_users): Likewise.
4288         (vect_mark_pattern_stmts): Likewise.
4289         (vect_pattern_recog_1): Likewise.
4290         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4291         (vect_record_max_nunits): Likewise.
4292         (vect_build_slp_tree_1): Likewise.
4293         (vect_build_slp_tree_2): Likewise.
4294         (vect_print_slp_tree): Likewise.
4295         (vect_analyze_slp_instance): Likewise.
4296         (vect_detect_hybrid_slp_stmts): Likewise.
4297         (vect_detect_hybrid_slp_1): Likewise.
4298         (vect_slp_analyze_operations): Likewise.
4299         (vect_slp_analyze_bb_1): Likewise.
4300         (vect_transform_slp_perm_load): Likewise.
4301         (vect_schedule_slp_instance): Likewise.
4302         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4303         (vect_mark_stmts_to_be_vectorized): Likewise.
4304         (vect_init_vector_1): Likewise.
4305         (vect_get_vec_def_for_operand): Likewise.
4306         (vect_finish_stmt_generation_1): Likewise.
4307         (vect_check_load_store_mask): Likewise.
4308         (vectorizable_call): Likewise.
4309         (vectorizable_conversion): Likewise.
4310         (vectorizable_operation): Likewise.
4311         (vectorizable_load): Likewise.
4312         (vect_analyze_stmt): Likewise.
4313         (vect_is_simple_use): Likewise.
4314         (vect_get_vector_types_for_stmt): Likewise.
4315         (vect_get_mask_type_for_stmt): Likewise.
4316         * tree-vectorizer.c (increase_alignment): Likewise.
4318 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
4320         * doc/rtl.texi: Adjust vec_select description.
4321         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4322         non-constant selectors.
4324 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
4326         * config/aarch64/aarch64-protos.h
4327         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4328         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4329         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4330         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4331         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4332         (AARCH64_FL_PROFILE): Move index so flags are ordered.
4333         (AARCH64_ISA_RCPC8_4): New flag.
4334         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4335         to aarch64_offset_9bit_signed_unscaled_p.
4336         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4337         and use stlur.
4338         * config/aarch64/constraints.md (Ust): New constraint.
4339         * config/aarch64/predicates.md.
4340         (aarch64_9bit_offset_memory_operand): New predicate.
4341         (aarch64_rcpc_memory_operand): New predicate.
4343 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
4345         PR rtl-optimization/87361
4346         * rtlanal.c (nonzero_bits1): Revert accidental change.
4348 2018-09-19  Richard Biener  <rguenther@suse.de>
4350         PR tree-optimization/87349
4351         PR tree-optimization/87342
4352         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4354 2018-09-18  Marek Polacek  <polacek@redhat.com>
4356         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4357         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4359 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
4361         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4363 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
4365         PR rtl-optimization/86882
4366         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4368 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
4370         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4371         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4373 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
4375         PR other/87353
4376         * doc/invoke.texi (Link Options): Fix formatting and grammar.
4378 2018-09-18  Richard Biener  <rguenther@suse.de>
4380         PR middle-end/63155
4381         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4382         (compute_samebase_partition_bases): Likewise.
4383         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4384         (gimple_can_coalesce_p): Simplify.
4386 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
4388         Handle a library implementation of ffs calling __builtin_ffs.
4389         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4390         (mmix_init_libfuncs): New function: make __builtin_ffs expand
4391         to __ffsdi2.
4393 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
4395         * diagnostic-show-locus.c (class layout_range): Add field
4396         "m_original_idx".
4397         (layout_range::layout_range): Add "original_idx" param and use it
4398         to initialize new field.
4399         (make_range): Use 0 for original_idx.
4400         (layout::layout): Pass in index to calls to
4401         maybe_add_location_range.
4402         (layout::maybe_add_location_range): Add param "original_idx" and
4403         pass it on to layout_range.
4404         (layout::print_any_labels): Pass on range->m_original_idx to
4405         get_text call.
4406         (gcc_rich_location::add_location_if_nearby): Use 0 for
4407         original_idx.
4408         * gcc-rich-location.h (text_range_label::get_text): Update for new
4409         param.
4410         (range_label_for_type_mismatch::get_text): Likewise.
4412 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
4414         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4416 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
4418         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4419         format_string_diagnostic_t.
4420         (fmtwarn_n): Likewise.
4421         * substring-locations.c
4422         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4423         (format_warning_n_va): Convert to...
4424         (format_string_diagnostic_t::emit_warning_n_va): ...this.
4425         (format_warning_va): Convert to...
4426         (format_string_diagnostic_t::emit_warning_va): ...this.
4427         (format_warning_at_substring): Convert to...
4428         (format_string_diagnostic_t::emit_warning): ...this.
4429         (format_warning_at_substring_n): Convert to...
4430         (format_string_diagnostic_t::emit_warning_n): ...this.
4431         * substring-locations.h (class format_string_diagnostic_t): New
4432         class.
4433         (format_warning_va): Convert to
4434         format_string_diagnostic_t::emit_warning_va.
4435         (format_warning_n_va): Convert to
4436         format_string_diagnostic_t::emit_warning_n_va.
4437         (format_warning_at_substring): Convert to
4438         format_string_diagnostic_t::emit_warning.
4439         (format_warning_at_substring_n): Convert to
4440         format_string_diagnostic_t::emit_warning_n.
4442 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
4443             Bernd Schmidt <bernds_cb1@t-online.de>
4445         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4446         SImode args.
4448 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
4450         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4451         operand 0 predicate to nonimmediate operand.
4452         (rint<mode>2_frndint): Remove insn pattern.
4453         (rint<mode>2): Change operand 1 predicate to general_operand.
4454         Extend operand 1 to XFmode and generate rintxf2 insn.
4455         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4456         Do not use X87MODEF mode macro.
4457         (frndintxf2_<rounding>_i387): Rename from
4458         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
4459         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4460         to XFmode and generate significandxf3 insn.
4462 2018-09-17  Richard Biener  <rguenther@suse.de>
4464         PR tree-optimization/87328
4465         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4466         visiting unexecutable backedges when not iterating.
4467         (do_rpo_vn): Mark all edges not executable even when not
4468         iterating.
4470 2018-09-17  Martin Jambor  <mjambor@suse.cz>
4472         PR c/63886
4473         * doc/invoke.texi (Warning Options): Likewise.
4475 2018-09-17  Richard Biener  <rguenther@suse.de>
4477         PR tree-optimization/87301
4478         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4479         clean EH info from leftover copy assignments.
4481 2018-09-17  Martin Liska  <mliska@suse.cz>
4483         PR gcov-profile/85871
4484         * gcov.c (output_intermediate_file): Fix out of bounds
4485         access.
4487 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
4489         * config/arc/arc.c: Object attributes for core4 not reflected
4490         correctly.
4491         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4492         core3).
4494 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
4496         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4498 2018-09-17  Martin Liska  <mliska@suse.cz>
4500         * doc/gcov.texi: Document new option --use-hotness-colors.
4501         * gcov.c (struct source_info): Declare new field.
4502         (source_info::source_info): Set default for maximum_count.
4503         (print_usage): Add new -q option.
4504         (process_args): Process it.
4505         (accumulate_line_info): Save src->maximum_count.
4506         (output_line_beginning): Make color line number if
4507         flag_use_hotness_colors is set.
4508         (output_line_details): Pass default argument value.
4509         (output_lines): Pass src->maximum_count.
4511 2018-09-17  Martin Liska  <mliska@suse.cz>
4513         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4514         Use processor_names table.
4515         * config/i386/i386.c (ix86_default_align): Use
4516         processor_cost_table for alignment values.
4517         (ix86_option_override_internal): Use processor_names.
4518         (ix86_function_specific_print): Likewise.
4519         * config/i386/i386.h (struct processor_costs):
4520         Add alignment values.
4521         (struct ptt): Remove and replace with const char *.
4522         * config/i386/x86-tune-costs.h (struct processor_costs):
4523         Declare default alignments for all costs.
4525 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
4527         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4528         symbolics or VR_VARYING ranges for ABS_EXPR.
4529         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4530         when range will wrap.
4532 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
4534         PR middle-end/86864
4535         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4536         before and after a JUMP_TABLE_DATA.
4538 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
4540         PR middle-end/87188
4541         * dojump.c (do_compare_and_jump): Canonicalize function pointers
4542         when one operand is a function pointer.  Use POINTER_TYPE_P and
4543         FUNC_OR_METHOD_TYPE_P.
4544         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4545         * fold-const.c (build_range_check): Likewise.
4546         * match.pd (simple_comparison): Likewise.
4548 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
4550         PR c/82967
4551         * spellcheck.c (get_edit_distance_cutoff): New function.
4552         (selftest::test_edit_distance_unit_test_oneway): Rename to...
4553         (selftest::test_get_edit_distance_one_way): ...this.
4554         (selftest::test_get_edit_distance_unit): Rename to...
4555         (selftest::test_get_edit_distance_both_ways): ...this.
4556         (selftest::test_edit_distances): Move tests to this new function,
4557         and test some more pairs of strings.  Update for above renaming.
4558         (selftest::get_old_cutoff): New function.
4559         (selftest::test_get_edit_distance_cutoff): New function.
4560         (selftest::assert_suggested_for): New function.
4561         (ASSERT_SUGGESTED_FOR): New macro.
4562         (selftest::assert_not_suggested_for): New function.
4563         (ASSERT_NOT_SUGGESTED_FOR): New macro.
4564         (selftest::test_suggestions): New function.
4565         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4566         tests to selftest::test_edit_distances and call it.  Add calls to
4567         selftest::test_get_edit_distance_cutoff and
4568         selftest::test_suggestions.
4569         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4570         (best_match::consider): Replace hard-coded cutoff calculation with
4571         a call to...
4572         (best_match::get_cutoff): New declaration.
4573         (best_match::get_best_meaningful_candidate): Likewise.
4575 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4577         * builtins.c (fold_builtin_strlen): Remove TODO comment.
4579 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4581         revert:
4582         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4584         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4585         terminated string literal.
4587 2018-09-14  Martin Sebor  <msebor@redhat.com>
4589         * builtins.c (unterminated_array): Handle ARRAY_REF.
4590         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4591         * builtins.h (unterminated_array): Declare extern.
4592         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4593         arrays.
4594         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4595         calls.
4597 2018-09-14  Martin Sebor  <msebor@redhat.com>
4598             Jeff Law  <law@redhat.com>
4600         * builtins.c (unterminated_array): New.
4601         (expand_builtin_strcpy): Adjust.
4602         (expand_builtin_strcpy_args): Detect unterminated arrays.
4603         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
4604         unterminated arrays.
4605         * gimple-fold.h (get_maxval_strlen): Add argument.
4606         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4608         * gimple-fold.c (get_range_strlen): Add argument.
4609         (get_maxval_strlen): Adjust.
4610         * gimple-fold.h (get_range_strlen): Add argument.
4612 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
4614         * config/i386/movdirintrin.h: Fix copyright year.
4616 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
4618         * reg-stack.c: Include regs.h.
4619         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4620         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4621         FIRST_STACK_REG, not DFmode.
4622         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4623         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
4624         (change stack): Default register mode to the reg_raw_mode of
4625         FIRST_STACK_REG, not DFmode.
4626         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4627         (*swapxf): Rename from swapxf.
4629 2018-09-14  Carl Love  <cel@us.ibm.com>
4631         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4632         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4634 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
4636         PR target/87224
4637         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4638         alternatives.
4640 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
4642         PR target/85628
4643         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4645 2018-09-14  Jason Merrill  <jason@redhat.com>
4647         Fix --enable-gather-detailed-mem-stats.
4648         * hash-table.c (hash_table_usage): Change from variable to function.
4649         * hash-table.h: Adjust.
4650         * Makefile.in: Add missing dependencies on hash-table.h.
4652 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4654         PR tree-optimization/87259
4655         PR lto/87283
4656         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4657         execute_cse_reciprocals_1 has tried transforming.
4659 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
4661         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4662         VR_VARYING for PLUS/MINUS_EXPR.
4664 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
4666         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4667         formatting.
4669 2018-09-14  Richard Biener  <rguenther@suse.de>
4671         PR middle-end/63155
4672         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4673         bits for the merged partition.
4675 2018-09-13  Martin Sebor  <msebor@redhat.com>
4676             Bernd Edlinger  <bernd.edlinger@hotmail.de>
4678         * builtins.h (c_srlen): Add argument.
4679         * builtins.c (warn_string_no_nul): New function.
4680         (c_strlen): Add argument and use it.  Update recursive calls.
4681         Pass DECL argument to string_constant to get info on non
4682         terminated strings.  Update *NONSTR as needed.
4683         (fold_builtin_strlen): Add argument to calls to c_strlen.
4684         Warn for unterminated arrays.
4685         (warn_string_no_null): Add prototype.
4686         * expr.c (string_constant): Update arguments.  Update recursive
4687         calls appropriately.  Detect missing NUL terminator and outermost
4688         declaration its missing in.
4689         Improve checks for arrays with nonzero lower bound or elements
4690         that are not a single byte.  Simplify offset computation.
4691         Simplify checks for non-NUL terminated strings.
4692         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4693         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4695 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4697         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4698         correctly.
4699         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
4700         argument.  Fix range checks.
4701         * fold-const.h (c_getstr): Adjust protoype.
4702         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4703         string is constant but contains no NUL byte.
4705         * expr.c (string_constant): Adjust function comment.
4706         Remove bogus check for zero termination.
4708         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4710         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4711         (get_constant_size): Don't make STRING_CSTs larger than they are.
4712         (check_string_literal): New check function for STRING_CSTs.
4713         (output_constant): Use it.
4715 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
4717         PR target/86812
4718         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4720 2018-09-13  Richard Biener  <rguenther@suse.de>
4722         PR tree-optimization/87263
4723         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4724         (struct unwind_state): Add max_rpo field.
4725         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4726         Compute max_rpo, the max RPO number a block can be backwards reached
4727         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
4728         separating it from the iterating mode.
4730 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
4732         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4733         (rfs_decision): New scheduling decision.
4735 2018-09-13  Richard Biener  <rguenther@suse.de>
4737         PR bootstrap/87134
4738         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4739         (vn_nary_op_insert_pieces_predicated): Do not write useless
4740         valid_dominated_by_p entry outside of the allocated storage.
4742 2018-09-13  Omar Sandoval  <osandov@osandov.com>
4743             Tom de Vries  <tdevries@suse.de>
4745         PR debug/86985
4746         * dwarf2out.c (is_c): New function.
4747         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4749 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
4751         PR target/85628
4752         * config/aarch64/aarch64.md (*aarch64_bfxil):
4753         Define.
4754         * config/aarch64/constraints.md (Ulc): Define.
4755         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4756         Define.
4757         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4758         New function.
4760 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
4762         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4763         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4764         aarch64_layout_frame call.
4765         (aarch64_expand_epilogue): Likewise.
4766         (aarch64_initial_elimination_offset): Likewise.
4767         (aarch64_get_separate_components): Likewise.
4768         (aarch64_use_return_insn_p): Likewise.
4769         (aarch64_layout_frame): Remove unneeded check.
4771 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4773         * configure.ac: Only append
4774         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4775         gcc_config_arguments if it was never reconfigured or last reconfigure
4776         was with different arguments.
4777         * configure: Regenerated.
4779 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4780             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4782         PR middle-end/87290
4783         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4784         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4786 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4788         PR tree-optimization/87287
4789         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4790         X % C == 0 to X % (unsigned) C == 0 optimization to ...
4791         * match.pd (X % C == 0): ... here.  New optimization.
4793 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4795         PR middle-end/82853
4796         * expr.h (maybe_optimize_mod_cmp): Declare.
4797         * expr.c (mod_inv): New function.
4798         (maybe_optimize_mod_cmp): New function.
4799         (do_store_flag): Use it.
4800         * cfgexpand.c (expand_gimple_cond): Likewise.
4802 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
4803             Julian Brown  <julian@codesourcery.com>
4805         PR middle-end/86336
4806         * gimplify.c (gimplify_scan_omp_clauses): Set
4807         target_firstprivatize_array_bases in OpenACC parallel and kernels
4808         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4809         OpenACC data regions.
4811 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
4813         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4814         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4816 2018-09-12  Richard Biener  <rguenther@suse.de>
4818         PR tree-optimization/87280
4819         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4820         edge but unreachable target.
4821         (do_rpo_vn): For conservatively handling a PHI only mark
4822         the backedge executable but not the block reachable.
4824 2018-09-12  Richard Biener  <rguenther@suse.de>
4826         PR tree-optimization/87266
4827         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4828         visited blocks.
4830 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
4832         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4833         constants.
4834         ("trunc<BFP:mode><DFP_ALL:mode>2")
4835         ("trunc<DFP_ALL:mode><BFP:mode>2")
4836         ("extend<BFP:mode><DFP_ALL:mode>2")
4837         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4838         according to the target operand type.
4840 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4841             Andreas Krebbel  <krebbel@linux.ibm.com>
4843         PR tree-optimization/86844
4844         * gimple-ssa-store-merging.c
4845         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4846         there are any overlapping stores in between them, make sure they are
4847         also coalesced or we give up completely.
4849 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4851         PR middle-end/87248
4852         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4853         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
4855 2018-09-12  Tom de Vries  <tdevries@suse.de>
4857         * common.opt (gdescribe-dies): Add option.
4858         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4859         attribute for artifical and nameless decls.
4860         (dwarf2out_register_external_die): Add description attribute to
4861         external reference die.
4862         (add_desc_attribute): New functions.
4863         (gen_subprogram_die): Add description attribute to
4864         DW_TAG_call_site_parameter.
4865         * tree-pretty-print.c (print_generic_expr_to_str): New function.
4866         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4867         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4868         -gno-describe-dies.
4869         (@item -gdescribe-dies): Add.
4871 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
4873         * tree-vrp.c (vrp_shift_undefined_p): Remove.
4874         (extract_range_from_binary_expr_1: Call
4875         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4876         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4877         depend on sign.
4879 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
4881         * gimple-ssa-warn-alloca.c
4882         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4883         field for ALLOCA_BOUND_*_LARGE.
4885 2018-09-11  Nathan Sidwell  <nathan@acm.org>
4887         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4889 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4891         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4892         for clobbers.  Remove obsolete comment.
4894 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4896         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4897         mpxchk, mpxld and mpxst types.
4898         (define_attr length_immediate): Remove all processing of mpx types.
4899         (define_attr prefix_0f): Ditto.
4900         (define_attr memory): Ditto.
4902 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4904         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4905         (log<mode>2): Change operand 1 predicate to general_operand.
4906         Extend operand 1 to XFmode and generate logxf3 insn.
4907         (log10<mode>2): Change operand 1 predicate to general_operand.
4908         Extend operand 1 to XFmode and generate log10xf3 insn.
4909         (log2<mode>2): Change operand 1 predicate to general_operand.
4910         Extend operand 1 to XFmode and generate log2xf3 insn.
4911         (fyl2xp1_extend<mode>xf3_i387): Remove.
4912         (log1p<mode>2): Change operand 1 predicate to general_operand.
4913         Extend operand 1 to XFmode and generate log1pxf3 insn.
4914         (fxtract_extend<mode>xf3_i387): Remove.
4915         (logb<mode>2): Change operand 1 predicate to general_operand.
4916         Extend operand 1 to XFmode and generate logbxf3 insn.
4917         (ilogb<mode>2): Change operand 1 predicate to general_operand.
4918         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4919         (significand<mode>2): Change operand 1 predicate to general_operand.
4920         Extend operand 1 to XFmode and generate significandxf3 insn.
4922 2018-09-11  Nathan Sidwell  <nathan@acm.org>
4924         * gcc.c (perror_with_name, pfatal_with_name): Delete.
4925         (load_specs): Use fatal_error.
4926         (DELETE_IF_ORDINARY, process_command): Use error.
4927         (execute, run_attempt): Use fatal_error.
4929 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
4931         * diagnostic-core.h (sorry_at): New prototype.
4932         * diagnostic.c (sorry_at): New function.
4934 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
4936         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4937         by zero as VR_UNDEFINED.
4939 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
4941         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4942         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4943         (<sincos>mode2): New expander.
4944         (sincos_extend<mode>xf3_i387): Remove insn pattern.
4945         (sincos -> sin, cos splitters): Remove splitter patterns.
4946         (sincos<mode>3): Change operand 2 predicate to general_operand.
4947         Extend operand 2 to XFmode and generate sincosxf3 insn.
4948         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4949         Change operand 3 predicate to const1_operand.
4950         (fptan_extend<mode>xf4_i387): Remove insn pattern.
4951         (tanxf2): Update operands in the call to fptanxf4_i387.
4952         (tan<mode>2): Change operand 1 predicate to general_operand.
4953         Extend operand 1 to XFmode and generate tanxf3 insn.
4954         (atan2xf3): Rename from *fpatanxf3_i387.
4955         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4956         (atan2xf3): Remove expander.
4957         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
4958         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4959         (atan<mode>2): Change operand 1 predicate to general_operand.
4960         Extend operand 1 to XFmode and generate atanxf3 insn.
4962 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
4964         * config/i386/i386.md (x87/SSE constant load splitter): Use
4965         memory_operand instead of nonimmediate_operand for input operand
4966         predicate.
4968 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
4970         * config/i386/i386.md (float partial SSE register stall splitter): Move
4971         splitter near its instruction pattern.
4972         (float_extend partial SSE register stall splitter): Ditto.
4973         (float_truncate partial SSE register stall splitter): Ditto.
4975 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
4977         PR target/86794
4978         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4979         to speculation_safe_value_not_needed.
4981         PR target/85666
4982         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4983         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4984         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4985         leaf_function_p, instead use has_hard_reg_initial_val.
4987 2018-09-09  Nathan Sidwell  <nathan@acm.org>
4989         * gcc.h (pfatal_with_name): Don't declare here.
4990         * gcc.c (pfatal_with_name): Make static.
4992 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
4994         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4995         earlyclobber.
4997 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
4999         PR rtl-optimization/85458
5000         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
5001         priority hook to reduce the priority of EXPR.
5003 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
5005         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
5006         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
5007         with X87_ENABLE_FLOAT.  Remove preparation code.
5008         (*float<SWI48:mode><MODEF:mode>2): Rename from
5009         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
5010         math using "enabled" attribute.
5011         (*floatdi<MODEF:mode>2_i387): Rename from
5012         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
5013         enable for 32bit targets only.
5014         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
5015         splitter.
5016         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
5017         as operand 1 predicate.  Rewrite as define_insn_and_split.
5018         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
5020 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
5022         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
5023         to fallthru to FLOAT case.
5025 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
5027         PR target/86731
5028         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
5029         around folding of vec_sl to handle out of range shift values.
5031 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
5033         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
5034         Update callers to gen_fix_trunc<mode>_i387_fisttp
5035         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
5036         nonimmediate_operand.
5037         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
5038         and corresponding splitters.
5039         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
5040         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
5041         (fix_truncdi_i387_with_temp): Remove insn pattern
5042         and corresponding splitters.
5043         (fix_trunc<mode>_i387): Change operand 0 predicate to
5044         nonimmediate_operand.
5045         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
5046         and corresponding splitters.
5047         (*fistdi2_1): Remove.
5048         (fistdi2): Ditto.
5049         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
5050         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
5051         (*fist<mode>2_1): Remove.
5052         (fist<mode>2): Ditto.
5053         (fist<mode>2_with_temp): Remove insn pattern and corresponding
5054         splitters.
5055         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
5056         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
5057         (fistdi2_<rounding>): Change operand 0 predicate to
5058         nonimmediate_operand.
5059         (fistdi2_<rounding>_with_temp): Remove insn pattern
5060         and corresponding splitters.
5061         (fist<mode>2_<rounding>): Change operand 0 predicate to
5062         nonimmediate_operand.
5063         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
5064         and corresponding splitters.
5066         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
5068 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5070         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
5071         the init value.
5073 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
5075         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
5076         early gimple folding of vec_splat().
5077         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
5078         * gimple-fold.h: Add an extern define for tree_vec_extract().
5080 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
5082         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
5083         wrappers around TREE_TYPE comparisons.
5085 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
5087         PR target/80080
5088         * config/s390/predicates.md: Add nonsym_memory_operand.
5089         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
5090         contains a SYMBOL_REF, load it into an intermediate pseudo.
5091         (s390_emit_compare_and_swap): Legitimize operand.
5092         * config/s390/s390.md: Use the new nonsym_memory_operand
5093         with UNSPECV_CAS patterns.
5095 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
5097         PR target/80080
5098         * config/s390/s390-passes.def: New file.
5099         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
5100         declaration.
5101         (make_pass_s390_early_mach): Add declaration.
5102         * config/s390/s390.c (make_pass_s390_early_mach):
5103         (s390_option_override): Remove dynamic registration.
5104         * config/s390/t-s390: Add s390-passes.def.
5106 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
5108         * config/s390/s390.c (s390_decompose_constant_pool_ref):
5109         Remove UNSPEC_LTREL_BASE check.
5110         (annotate_constant_pool_refs): Likewise.
5111         (find_constant_pool_ref): Likewise.
5112         (find_ltrel_base): Removed.
5113         (replace_ltrel_base): Removed.
5114         (s390_mainpool_finish): Remove replace_ltrel_base call.
5115         (s390_chunkify_start): Remove pending LTREL_BASE logic.
5116         (s390_chunkify_finish): Remove replace_ltrel_base call.
5117         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
5119 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
5121         PR target/86779
5122         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5123         to speculation_safe_value_not_needed.
5125 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
5126             Bernd Schmidt  <bernds_cb1@t-online.de>
5128         * config/nvptx/nvptx-opts.h: New file.
5129         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
5130         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
5131         (ASM_SPEC): Define.
5132         (TARGET_SM35): New macro.
5133         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
5134         correct predicate.
5135         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
5136         values.
5137         (misa=): New option.
5138         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
5140 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
5142         * config/i386/i386.md (truncdfsf2): Remove expander.
5143         (truncdfsf2_with_temp): Ditto.
5144         (truncxf<mode>2): Ditto.
5145         (*truncdfsf_fast_mixed): Remove insn pattern.
5146         (*truncdfsf_fast_i387): Ditto.
5147         (*truncdfsf_mixed): Ditto.
5148         (*truncdfsf_i387): Ditto.
5149         (*truncdfsf2_i387_1): Ditto.
5150         (*truncxfsf2_mixed): Ditto.
5151         (*truncxfdf2_mixed): Ditto.
5152         (*truncxf<mode>2_i387_noop): Ditto. Update callers
5153         to call gen_truncxf<mode>2 instead.
5154         (*truncxf<mode>2_i387): Remove.
5155         (reg->reg splitters): Remove splitter pattern.
5156         (reg->mem splitters): Ditto.
5158         (truncdfsf2): New insn pattern.
5159         (truncxf<mode>2): Ditto.
5161 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5163         * tree-ssa-math-opts.c (is_mult_by): New function.
5164         (is_square_of): Use the above.
5165         (optimize_recip_sqrt): New function.
5166         (pass_cse_reciprocals::execute): Use the above.
5168 2018-09-05  Richard Biener  <rguenther@suse.de>
5170         PR bootstrap/87134
5171         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
5172         to zero-init the emplaced vec.
5174 2018-09-05  Martin Liska  <mliska@suse.cz>
5176         PR tree-optimization/87205
5177         * tree-switch-conversion.c (pass_lower_switch::execute):
5178         Group cases for switch statements.
5180 2018-09-05  Richard Biener  <rguenther@suse.de>
5182         PR tree-optimization/87217
5183         * tree-ssa-sccvn.c (vuse_valueize): New.
5184         (vn_reference_lookup_pieces): Use it.
5185         (vn_reference_lookup): Likewise.
5187 2018-09-05  Nathan Sidwell  <nathan@acm.org>
5189         PR c++/87137
5190         * stor-layout.c (place_field): Scan forwards to check last
5191         bitfield when ms_bitfield_placement is in effect.
5193 2018-09-05  Richard Biener  <rguenther@suse.de>
5195         PR bootstrap/87225
5196         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
5197         return.
5199 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5200             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
5202         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
5203         * config.gcc (extra_objs): Build it.
5204         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
5205         Likewise.
5206         * config/aarch64/aarch64-passes.def
5207         (pass_tag_collision_avoidance): New pass.
5208         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
5209         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
5210         (aarch64_classify_address): Remove static qualifier.
5211         (aarch64_address_info, aarch64_address_type): Move to...
5212         * config/aarch64/aarch64-protos.h: ... here.
5213         (make_pass_tag_collision_avoidance): New function.
5214         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
5215         New tuning flag.
5217 2018-09-05  Martin Liska  <mliska@suse.cz>
5219         * doc/gcov.texi: Update documentation of humar
5220         readable mode.
5221         * gcov.c (format_count): Print one decimal place, it provides
5222         more fine number of situations like '1G' vs. '1.4G'.
5224 2018-09-05  Martin Liska  <mliska@suse.cz>
5226         PR target/87164
5227         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
5228         * optc-gen.awk: Allow 'Var' for Deprecated options in order
5229         to generate a MASK value.
5231 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
5233         PR debug/86593
5234         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
5235         if frame pointer isn't used.
5236         (compute_frame_pointer_to_fb_displacement): Likewise.
5238 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
5240         PR target/87198
5241         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
5242         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
5243         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
5244         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
5245         and OPTION_MASK_ISA_XSAVEC_UNSET.
5247 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
5249         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
5250         XOR operations in NAND case.
5252 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
5254         * wide-int-range.cc (wide_int_range_convert): New.
5255         * wide-int-range.h (wide_int_range_convert): New.
5256         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
5257         code into wide_int_range_convert.
5258         (extract_range_into_wide_ints): Do not munge anti range constants
5259         into the entire domain.  Just return the range back.
5261 2018-09-04  Martin Liska  <mliska@suse.cz>
5263         * genmatch.c (output_line_directive): Add new argument
5264         fnargs.
5265         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
5267 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
5269         * doc/invoke.texi (Option Summary): Add whitespace.
5271         * doc/invoke.texi (Option Summary): Add -Waligned-new.
5273 2018-09-04  Richard Biener  <rguenther@suse.de>
5275         PR tree-optimization/87211
5276         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
5277         backedge value we're supposed to treat as VARYING also number
5278         the PHI to VARYING in case it got a different value-number already.
5280 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
5282         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5283         (extract_range_from_binary_expr_1): Do not call
5284         vrp_can_optimize_bit_op.
5285         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5286         static.
5287         (wide_int_range_get_mask_and_bounds): New.
5288         (wide_int_range_optimize_bit_op): New.
5289         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5290         (wide_int_range_bit_and): Same.
5291         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5292         (wide_int_range_optimize_bit_op): New.
5293         (wide_int_range_get_mask_and_bounds): New.
5295 2018-09-04  Richard Biener  <rguenther@suse.de>
5297         PR tree-optimization/87176
5298         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5299         variable.  When value-numbering a virtual PHI node make sure
5300         to not value-number to the backedge value.
5302 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
5304         * doc/extend.texi (Long Long, Hex Floats): Document support for
5305         long long and hex floats in more recent versions of ISO C++.
5307 2018-09-03  Richard Biener  <rguenther@suse.de>
5309         PR tree-optimization/87177
5310         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5311         cleanup.
5313 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
5315         * bb-reorder.c (edge_order): Convert to C-qsort-style
5316         tri-state comparator.
5317         (reorder_basic_blocks_simple): Change std::stable_sort to
5318         gcc_stablesort.
5320 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
5322         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5323         tri-state comparator.
5324         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5326 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
5328         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
5329         (mergesort): ... here as maximum count for using netsort.
5330         (gcc_qsort): Set nlim to 3 if stable sort is requested.
5331         (gcc_stablesort): New.
5332         * system.h (gcc_stablesort): Declare.
5334 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
5336         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5337         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
5338         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
5340 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
5342         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5343         lxsdx and stxsdx alternatives.
5344         (*mov<mode>_hardfloat64): Ditto.
5345         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5347 2018-09-03  Richard Biener  <rguenther@suse.de>
5349         PR tree-optimization/87200
5350         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5351         simplify result.
5353 2018-09-03  Martin Liska  <mliska@suse.cz>
5355         PR tree-optimization/87201
5356         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5357         Fix parenthesis in an expression.
5359 2018-09-03  Richard Biener  <rguenther@suse.de>
5361         PR tree-optimization/87197
5362         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5363         visited.  CSE the VN_INFO hashtable lookup.
5365         PR tree-optimization/87169
5366         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5367         iterating make sure there's no extra backedges from irreducible
5368         regions feeding the header.  Mark the destination block
5369         executable.
5371 2018-09-03  Martin Liska  <mliska@suse.cz>
5373         PR driver/83193
5374         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5375         * common/common-targhooks.c (default_get_valid_option_values):
5376         New function.
5377         * common/common-targhooks.h (default_get_valid_option_values):
5378         Likewise.
5379         * common/config/i386/i386-common.c: Move processor_target_table
5380         from i386.c.
5381         (ix86_get_valid_option_values): New function.
5382         (TARGET_GET_VALID_OPTION_VALUES): New macro.
5383         * config/i386/i386.c (struct ptt): Move to i386-common.c.
5384         (PTA_*): Move all defined masks into i386-common.c.
5385         (ix86_function_specific_restore): Use new processor_cost_table.
5386         * config/i386/i386.h (struct ptt): Moved from i386.c.
5387         (struct pta): Likewise.
5388         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5389         * doc/tm.texi.in: Likewise.
5390         * opt-suggestions.c (option_proposer::suggest_option):
5391         Pass prefix to build_option_suggestions.
5392         (option_proposer::get_completions): Likewise.
5393         (option_proposer::build_option_suggestions): Use the new target
5394         hook.
5395         * opts.c (struct option_help_tuple): New struct.
5396         (print_filtered_help): Use the new target hook.
5398 2018-09-03  Martin Liska  <mliska@suse.cz>
5400         PR middle-end/59521
5401         * predict.c (set_even_probabilities): Add likely_edges
5402         argument and handle cases where we have precisely one
5403         likely edge.
5404         (combine_predictions_for_bb): Catch also likely_edges.
5405         (tree_predict_by_opcode): Handle gswitch statements.
5406         * tree-cfg.h (find_case_label_for_value): New declaration.
5407         (find_taken_edge_switch_expr): Likewise.
5408         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5409         Find pivot in decision tree based on probabily, not by number of
5410         nodes.
5412 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
5414         * doc/standards.texi (Standards): Update Objective-C reference.
5416 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
5418         * doc/install.texi (Prerequisites): Update link for MPC.
5420 2018-09-01  Michael Matz  <matz@suse.de>
5422         PR tree-optimization/87074
5423         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5424         PHIs for outer-loop uses.
5426 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
5428         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5429         * doc/invoke.texi (C Dialect Options): Ditto.
5431 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
5433         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5435 2018-08-31  Richard Biener  <rguenther@suse.de>
5437         PR tree-optimization/87168
5438         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5439         (rpo_elim::eliminate_avail): When OP was not visited it must
5440         be available.
5442 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
5444         * tree-vrp.c (copy_value_range): Convert param "from" from
5445         "value_range *" to "const value_range *".
5446         (range_is_null): Likewise for param "vr".
5447         (range_int_cst_p): Likewise.
5448         (range_int_cst_singleton_p): Likewise.
5449         (symbolic_range_p): Likewise.
5450         (value_ranges_intersect_p): Likewise for both params.
5451         (value_range_nonnegative_p): Likewise for param "vr".
5452         (value_range_constant_singleton): Likewise.
5453         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5454         (extract_range_into_wide_ints): Likewise for param "vr".
5455         (extract_range_from_multiplicative_op): Likewise for params "vr0"
5456         and "vr1".
5457         (vrp_can_optimize_bit_op): Likewise.
5458         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5459         "vr1_".
5460         (extract_range_from_unary_expr): Likewise.
5461         (debug_value_range): Likewise for param "vr".
5462         (value_range::dump): Add "const" qualifier.
5463         (vrp_prop::check_array_ref): Convert local "vr" from
5464         "value_range *" to "const value_range *".
5465         (vrp_prop::check_mem_ref): Likewise.
5466         (vrp_prop::visit_stmt): Likewise for local "old_vr".
5467         (vrp_intersect_ranges_1): Likewise for param "vr_1".
5468         (vrp_intersect_ranges): Likewise.
5469         (simplify_stmt_for_jump_threading): Likewise for local "vr".
5470         (vrp_prop::vrp_finalize): Likewise.
5471         * tree-vrp.h (value_range::dump): Add "const" qualifier.
5472         (vrp_intersect_ranges): Add "const" qualifier to params as above.
5473         (extract_range_from_unary_expr): Likewise.
5474         (value_range_constant_singleton): Likewise.
5475         (symbolic_range_p): Likewise.
5476         (copy_value_range): Likewise.
5477         (extract_range_from_binary_expr_1): Likewise.
5478         (range_int_cst_p): Likewise.
5479         (vrp_set_zero_nonzero_bits): Likewise.
5480         (range_int_cst_singleton_p): Likewise.
5482 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
5484         * config/aarch64/arm_neon.h (vabsd_s64): New.
5485         (vnegd_s64): Likewise.
5487 2018-08-31  Martin Jambor  <mjambor@suse.cz>
5489         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5491 2018-08-31  Martin Liska  <mliska@suse.cz>
5493         * ipa-icf.c (sem_item::add_type): Use
5494         sem_item::m_type_hash_cache.
5495         * ipa-icf.h: Move the cache from sem_item_optimizer
5496         to sem_item.
5498 2018-08-31  Nathan Sidwell  <nathan@acm.org>
5500         * doc/extend.texi (Backwards Compatibility): Remove implicit
5501         extern C leeway of () being (...).
5503 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5505         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5507 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
5509         PR target/86684
5510         PR target/87149
5511         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5513 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
5515         PR middle-end/87138
5516         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5517         gen_int_mode.  Formatting fixes.
5519 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
5521         * target.def (custom_function_descriptors): Improve documentation.
5522         * doc/tm.texi.in (Trampolines): Expand discussion of function
5523         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5524         beginning of the section.
5525         * doc/tm.texi: Regenerated.
5527 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
5529         * cfg.h (class auto_edge_flag): Spell out the template-id of the
5530         base class in the initializer list.  This is a workaround for
5531         building with older GCC.
5532         (class auto_bb_flag): Likewise.
5534 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
5536         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5537         (altivec_vcmpequ<VI_char>_p): Remove star.
5538         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5539         vector load modes.
5540         (expand_strncmp_vec_sequence): New function.
5541         (emit_final_str_compare_vec): New function.
5542         (expand_strn_compare): Add support for vector strncmp.
5543         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5544         length specification to bytes.
5545         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5546         (vcmpnezb_p): New pattern.
5547         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5548         for option -mstring-compare-inline-limit.
5550 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
5552         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5553         (PTA_SKYLAKE): Add PTA_AES.
5554         (PTA_GOLDMONT): Likewise.
5556 2018-08-29  Jan Hubicka  <jh@suse.cz>
5558         PR lto/86517
5559         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5560         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5562 2018-08-29  Jan Hubicka  <jh@suse.cz>
5564         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5565         TYPE_STUB_DECL.
5566         (hash_tree): Do not visit TYPE_STUB_DECL.
5567         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5568         stream TYPE_STUB_DECL.
5569         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5570         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5571         after free_lang_data.
5572         (type_in_anonymous_namespace_p): Likewise.
5574 2018-08-29  Jan Hubicka  <jh@suse.cz>
5576         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5577         comment that it has to be even number.
5578         (class sreal): Change m_sig type to int32_t.
5579         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5580         int64_t for temporary calculations.
5581         (sreal_verify_basics): Drop one bit from minimum and maximum.
5583 2018-08-30  Richard Biener  <rguenther@suse.de>
5585         PR tree-optimization/87147
5586         * tree-ssa-sccvn.c (SSA_VISITED): New function.
5587         (visit_phi): When the degenerate result is from the backedge and
5588         we didn't visit its definition yet drop to VARYING.
5589         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5591 2018-08-29  Jan Hubicka  <jh@suse.cz>
5593         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5594         DECL_VINDEX.
5595         (hash_tree): Likewise.
5597 2018-08-29  Jan Hubicka  <jh@suse.cz>
5599         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5600         and TYPE_NEXT_REF_TO.
5602 2018-08-29  Jan Hubicka  <jh@suse.cz>
5604         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5605         comment that it has to be even number.
5606         (class sreal): Change m_sig type to int32_t.
5607         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5608         int64_t for temporary calculations.
5609         (sreal_verify_basics): Drop one bit from minimum and maximum.
5611 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
5613         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5615 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
5617         PR middle-end/86995
5618         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5619         if to_add is negative.
5621 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5623         PR middle-end/87053
5624         * builtins.c (c_strlen): Improve range checks.
5626 2018-08-29  Martin Sebor  <msebor@redhat.com>
5627             Jeff Law  <law@redhat.com>
5629         PR tree-optimization/86714
5630         PR tree-optimization/86711
5631         * builtins.c (c_strlen): Add arguments to call to string_constant.
5632         * expr.c (string_constant): Add argument.  Detect missing nul
5633         terminator and outermost declaration it's missing in.
5634         * expr.h (string_constant): Add argument.
5635         * fold-const.c (read_from_constant_string): Add arguments to call to
5636         string_constant.
5637         (c_getstr): Likewise.
5638         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5639         to string_constant.
5640         * tree-ssa-strlen.c (get_stridx): Likewise.
5642 2018-08-29  Jan Hubicka  <jh@suse.cz>
5644         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5645         Do not stream DECL_VINDEX.
5646         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5647         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5648         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5650 2018-08-29  Richard Biener  <rguenther@suse.de>
5652         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5653         virtual operands that are not default defs to honor region
5654         boundaries.
5655         (rpo_vn_valueize): Remove ineffective code here.
5657 2018-08-29  Richard Biener  <rguenther@suse.de>
5659         PR tree-optimization/87132
5660         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5661         when skipping defs reachable over backedges.
5663 2018-08-29  Richard Biener  <rguenther@suse.de>
5665         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5666         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5667         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5668         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5669         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5670         (vn_reference_lookup_3): Remove use of const_parms.
5671         (free_rpo_vn): Do not free const_parms.
5672         (do_rpo_vn): Do not call init_const_parms.
5673         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5674         SSA_NAME_POINTS_TO_READONLY_MEMORY.
5675         (call_may_clobber_ref_p_1): Likewise.
5677 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
5679         PR other/86726
5680         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5681         (-O): Ditto.
5682         (-ftree-scev-cprop): Document.
5684 2018-08-29  Jan Hubicka  <jh@suse.cz>
5686         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5687         parameters.
5688         (sreal constructor): Update.
5689         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5690         sreal:operator/): Update.
5692 2018-08-29  Martin Liska  <mliska@suse.cz>
5694         * tree-switch-conversion.c (switch_conversion::expand):
5695         Strenghten assumption about gswitch statements.
5697 2018-08-29  Richard Biener  <rguenther@suse.de>
5699         PR tree-optimization/87117
5700         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5701         re-value-number released SSA VDEFs.
5703 2018-08-29  Richard Biener  <rguenther@suse.de>
5705         PR tree-optimization/87126
5706         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5708 2018-08-28  Jim Wilson  <jimw@sifive.com>
5710         * config/riscv/pic.md: Rewrite.
5711         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5712         invalid address.
5713         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5714         (SOFTF, default_load, softload, softstore): New.
5716 2018-08-28  Jeff Law  <law@redhat.com>
5718         * fold-const.c (fold_binary_loc): Remove recently added assert.
5720 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
5722         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5723         to OP parmeter of generated function.
5725 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
5727         PR tree-optimization/87009
5728         * match.pd: Add boolean optimizations.
5730 2018-08-28  Martin Sebor  <msebor@redhat.com>
5732         PR middle-end/86631
5733         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5734         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5735         (pass_walloca::gate): Use it.
5736         (alloca_call_type): Same.
5737         (pass_walloca::execute): Same.
5738         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5740 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
5742         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5743         GCC_VERSION for usage of "__gcc_dump_printf__" format from
5744         >= 3005 to >= 9000.
5746 2018-08-28  Richard Biener  <rguenther@suse.de>
5748         PR tree-optimization/87124
5749         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5750         constants before looking up avail.
5752 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
5754         PR middle-end/87099
5755         * calls.c (maybe_warn_nonstring_arg): Punt early if
5756         warn_stringop_overflow is zero.  Don't call get_range_strlen
5757         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5758         Swap comparison operands to have constants on rhs.  Only use
5759         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
5760         increment lenrng[0].
5762 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
5764         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5765         use of tree_to_shwi.  Remove duplicated test for the size being
5766         a whole number of bytes.
5768 2018-08-28  Richard Biener  <rguenther@suse.de>
5770         PR tree-optimization/87117
5771         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5772         Handle removed stmt without LHS (GIMPLE_NOP).
5774 2018-08-28  Richard Biener  <rguenther@suse.de>
5776         PR tree-optimization/87117
5777         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5778         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5780 2018-08-28  Richard Biener  <rguenther@suse.de>
5782         PR tree-optimization/87117
5783         * tree-ssa-pre.c (compute_avail): Do not make expressions
5784         with predicated values available.
5785         (get_expr_value_id): Assert we do not run into predicated value
5786         expressions.
5788 2018-08-28  Richard Biener  <rguenther@suse.de>
5790         PR tree-optimization/87117
5791         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5792         get virtual operands.
5793         (get_expr_operands): Handle STRING_CST like other decls.
5795 2018-08-28  Martin Liska  <mliska@suse.cz>
5797         * tree.h: Update documentation of fndecl_built_in_p
5798         functions.
5801 2018-08-27  Jeff Law  <law@redhat.com>
5802         PR tree-optimization/87110
5803         * tree-ssa-dse.c (compute_trims): Handle non-constant
5804         TYPE_SIZE_UNIT.
5806 2018-08-27  Martin Sebor  <msebor@redhat.com>
5808         PR tree-optimization/86914
5809         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5811 2018-08-27  Martin Sebor  <msebor@redhat.com>
5813         PR tree-optimization/87112
5814         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5815         the type of the bound argument.
5817 2018-08-27  Jeff Law  <law@redhat.com>
5819         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5820         type does not have a TYPE_SIZE_UNIT.
5822 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
5824         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5825         with include of backend.h.
5827 2018-08-27  Richard Biener  <rguenther@suse.de>
5829         PR tree-optimization/86927
5830         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5831         use const cond reduction code.
5833 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
5835         PR tree-optimization/85758
5836         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5838 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
5840         PR c++/87091
5841         * diagnostic-show-locus.c (class layout_range): Update for
5842         conversion of show_caret_p to a tri-state.
5843         (layout_range::layout_range): Likewise.
5844         (make_range): Likewise.
5845         (layout::maybe_add_location_range): Likewise.
5846         (layout::should_print_annotation_line_p): Don't show annotation
5847         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5848         (layout::get_state_at_point): Update for conversion of
5849         show_caret_p to a tri-state.  Bail out early for
5850         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5851         underlining or source colorization.
5852         (gcc_rich_location::add_location_if_nearby): Update for conversion
5853         of show_caret_p to a tri-state.
5854         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5855         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5856         Likewise.
5857         (selftest::test_one_liner_labels): Likewise.
5858         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5859         conversion of show_caret_p to a tri-state.
5860         * pretty-print.c (text_info::set_location): Likewise.
5861         * pretty-print.h (text_info::set_location): Likewise.
5862         * substring-locations.c (format_warning_n_va): Likewise.
5863         * tree-diagnostic.c (default_tree_printer): Likewise.
5864         * tree-pretty-print.c (newline_and_indent): Likewise.
5866 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
5868         PR c++/87091
5869         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5870         line above for line-insertion fix-it hints.
5871         (selftest::test_fixit_insert_containing_newline): Update the
5872         expected results, and add a test with line-numbering enabled.
5874 2018-08-27  Martin Liska  <mliska@suse.cz>
5876         PR sanitizer/86962
5877         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5878         params with DECL_HAS_VALUE_EXPR_P.
5880 2018-08-27  Martin Liska  <mliska@suse.cz>
5882         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5883         selected expansion strategy.
5885 2018-08-27  Martin Liska  <mliska@suse.cz>
5887         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5888         * builtins.c (is_builtin_fn): Likewise.
5889         * attribs.c (diag_attr_exclusions): Use new function
5890         fndecl_built_in_p and remove check for FUNCTION_DECL if
5891         possible.
5892         (builtin_mathfn_code): Likewise.
5893         (fold_builtin_expect): Likewise.
5894         (fold_call_expr): Likewise.
5895         (fold_builtin_call_array): Likewise.
5896         (fold_call_stmt): Likewise.
5897         (set_builtin_user_assembler_name): Likewise.
5898         (is_simple_builtin): Likewise.
5899         * calls.c (gimple_alloca_call_p): Likewise.
5900         (maybe_warn_nonstring_arg): Likewise.
5901         * cfgexpand.c (expand_call_stmt): Likewise.
5902         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5903         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5904         (cgraph_node::verify_node): Likewise.
5905         * cgraphclones.c (build_function_decl_skip_args): Likewise.
5906         (cgraph_node::create_clone): Likewise.
5907         * config/arm/arm.c (arm_insert_attributes): Likewise.
5908         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5909         * dse.c (scan_insn): Likewise.
5910         * expr.c (expand_expr_real_1): Likewise.
5911         * fold-const.c (operand_equal_p): Likewise.
5912         (fold_binary_loc): Likewise.
5913         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5914         * gimple-low.c (lower_stmt): Likewise.
5915         * gimple-pretty-print.c (dump_gimple_call): Likewise.
5916         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5917         Likewise.
5918         * gimple.c (gimple_build_call_from_tree): Likewise.
5919         (gimple_call_builtin_p): Likewise.
5920         (gimple_call_combined_fn): Likewise.
5921         * gimplify.c (gimplify_call_expr): Likewise.
5922         (gimple_boolify): Likewise.
5923         (gimplify_modify_expr): Likewise.
5924         (gimplify_addr_expr): Likewise.
5925         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5926         * ipa-cp.c (determine_versionability): Likewise.
5927         * ipa-fnsummary.c (compute_fn_summary): Likewise.
5928         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5929         * ipa-split.c (visit_bb): Likewise.
5930         (split_function): Likewise.
5931         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5932         * lto-cgraph.c (input_node): Likewise.
5933         * lto-streamer-out.c (write_symbol): Likewise.
5934         * omp-low.c (setjmp_or_longjmp_p): Likewise.
5935         (lower_omp_1): Likewise.
5936         * predict.c (strip_predict_hints): Likewise.
5937         * print-tree.c (print_node): Likewise.
5938         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5939         * trans-mem.c (is_tm_irrevocable): Likewise.
5940         (is_tm_load): Likewise.
5941         (is_tm_simple_load): Likewise.
5942         (is_tm_store): Likewise.
5943         (is_tm_simple_store): Likewise.
5944         (is_tm_abort): Likewise.
5945         (tm_region_init_1): Likewise.
5946         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5947         * tree-cfg.c (verify_gimple_call): Likewise.
5948         (move_stmt_r): Likewise.
5949         (stmt_can_terminate_bb_p): Likewise.
5950         * tree-eh.c (lower_eh_constructs_2): Likewise.
5951         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5952         * tree-inline.c (remap_gimple_stmt): Likewise.
5953         (copy_bb): Likewise.
5954         (estimate_num_insns): Likewise.
5955         (fold_marked_statements): Likewise.
5956         * tree-sra.c (scan_function): Likewise.
5957         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5958         (optimize_stack_restore): Likewise.
5959         (pass_fold_builtins::execute): Likewise.
5960         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5961         (mark_all_reaching_defs_necessary_1): Likewise.
5962         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5963         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5964         (pass_forwprop::execute): Likewise.
5965         * tree-ssa-loop-im.c (stmt_cost): Likewise.
5966         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5967         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5968         * tree-ssa-strlen.c (get_string_length): Likewise.
5969         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5970         (find_func_aliases_for_call): Likewise.
5971         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5972         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5973         * tree-tailcall.c (find_tail_calls): Likewise.
5974         * tree.c (need_assembler_name_p): Likewise.
5975         (free_lang_data_in_decl): Likewise.
5976         (get_call_combined_fn): Likewise.
5977         * ubsan.c (is_ubsan_builtin_p): Likewise.
5978         * varasm.c (incorporeal_function_p): Likewise.
5979         * tree.h (DECL_BUILT_IN): Remove and replace with
5980         fndecl_built_in_p.
5981         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5982         (fndecl_built_in_p): New.
5984 2018-08-27  Martin Liska  <mliska@suse.cz>
5986         PR tree-optimization/86847
5987         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5988         Dump also subtree probability.
5989         (switch_decision_tree::do_jump_if_equal): New function.
5990         (switch_decision_tree::emit_case_nodes): Handle special
5991         situations in balanced tree that can be emitted much simpler.
5992         Fix calculation of probabilities that happen in tree expansion.
5993         * tree-switch-conversion.h (struct cluster): Add
5994         is_single_value_p.
5995         (struct simple_cluster): Likewise.
5996         (struct case_tree_node): Add new function has_child.
5997         (do_jump_if_equal): New.
5999 2018-08-27  Martin Liska  <mliska@suse.cz>
6001         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
6002         Add new argument to bit_test_cluster constructor.
6003         (bit_test_cluster::emit): Set bits really number of values
6004         handlel by a test.
6005         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
6006         probability argument.
6007         * tree-switch-conversion.h (struct bit_test_cluster):
6008         Add m_handles_entire_switch.
6010 2018-08-27  Martin Liska  <mliska@suse.cz>
6012         PR tree-optimization/86702
6013         * tree-switch-conversion.c (jump_table_cluster::emit):
6014         Make probabilities even for values in jump table
6015         according to number of cases handled.
6016         (switch_decision_tree::compute_cases_per_edge): Pass
6017         argument to reset_out_edges_aux function.
6018         (switch_decision_tree::analyze_switch_statement): Likewise.
6019         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
6020         Make it static.
6022 2018-08-27  Martin Liska  <mliska@suse.cz>
6024         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
6025         cfun argument explicitly.
6026         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
6027         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
6028         function gimple_switch_default_bb.
6029         (convert_switch_statements):
6030         (expand_builtins):
6031         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
6032         * stmt.c (label_to_block_fn): Use label_to_block and pass
6033         cfun argument explicitly and use gimple_switch_label_bb.
6034         (expand_case): Likewise.
6035         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
6036         cfun argument explicitly. Likewise.
6037         (make_edges_bb): Likewise.
6038         (make_cond_expr_edges): Likewise.
6039         (get_cases_for_edge): Likewise.
6040         (make_gimple_switch_edges): Likewise.
6041         (label_to_block_fn): Likewise.
6042         (label_to_block): Likewise.
6043         (make_goto_expr_edges): Likewise.
6044         (make_gimple_asm_edges): Likewise.
6045         (main_block_label): Likewise.
6046         (group_case_labels_stmt): Likewise.
6047         (find_taken_edge_computed_goto): Likewise.
6048         (find_taken_edge_switch_expr): Likewise.
6049         (gimple_verify_flow_info): Likewise.
6050         (gimple_redirect_edge_and_branch): Likewise.
6051         (gimple_switch_label_bb): New function.
6052         (gimple_switch_default_bb): Likewise.
6053         (gimple_switch_edge): Likewise.
6054         (gimple_switch_default_edge): Likewise.
6055         * tree-cfg.h (label_to_block_fn): Remove and replace ...
6056         (label_to_block): ... with this.
6057         (gimple_switch_label_bb): New.
6058         (gimple_switch_default_bb): Likewise.
6059         (gimple_switch_edge): Likewise.
6060         (gimple_switch_default_edge): Likewise.
6061         * tree-cfgcleanup.c (convert_single_case_switch): Use
6062         new gimple functions and pass new argument to label_to_block.
6063         (cleanup_control_flow_bb):
6064         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
6065         cfun argument explicitly.
6066         (make_eh_edges): Likewise.
6067         (redirect_eh_dispatch_edge): Likewise.
6068         (lower_resx): Likewise.
6069         (lower_eh_dispatch): Likewise.
6070         (maybe_remove_unreachable_handlers): Likewise.
6071         (unsplit_eh): Likewise.
6072         (cleanup_empty_eh): Likewise.
6073         (verify_eh_edges): Likewise.
6074         (verify_eh_dispatch_edge): Likewise.
6075         * tree-ssa-dom.c (record_edge_info): Likewise.
6076         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
6077         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
6078         (thread_through_normal_block): Likewise.
6079         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
6080         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
6081         * tree-switch-conversion.c (switch_conversion::collect): Use new
6082         gimple functions.
6083         (switch_conversion::check_final_bb): Likewise.
6084         (switch_conversion::gather_default_values): Pass new argument
6085         to label_to_block.
6086         (switch_conversion::build_constructors): Likewise.
6087         (switch_decision_tree::compute_cases_per_edge): Use new
6088         gimple_switch_edge function.
6089         (switch_decision_tree::analyze_switch_statement): Pass new argument
6090         to label_to_block.
6091         (switch_decision_tree::try_switch_expansion): Use
6092         gimple_switch_default_edge.
6093         * tree-vrp.c (find_switch_asserts): Pass new argument
6094         to label_to_block.
6095         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
6096         (vr_values::simplify_switch_using_ranges): Likewise.
6098 2018-08-27  Richard Biener  <rguenther@suse.de>
6100         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
6101         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
6103         * tree-ssa-sccvn.h (struct vn_pval): New structure.
6104         (struct vn_nary_op_s): Add unwind_to member.  Add
6105         predicated_values flag and put result into a union together
6106         with a linked list of vn_pval.
6107         (struct vn_ssa_aux): Add name member to make maintaining
6108         a map of SSA name to vn_ssa_aux possible.  Remove no longer
6109         needed info, dfsnum, low, visited, on_sccstack, use_processed
6110         and range_info_anti_range_p members.
6111         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
6112         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
6113         New functions.
6114         (vn_valueize): New global.
6115         (vn_context_bb): Likewise.
6116         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
6117         VN_INFO_PTR_INFO): Remove.
6118         * tree-ssa-sccvn.c: ... (rewrite)
6119         (pass_fre::execute): For -O2+ initialize loops and run
6120         RPO VN in optimistic mode (iterating).  For -O1 and -Og
6121         run RPO VN in non-optimistic mode.
6122         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
6123         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
6124         * doc/invoke.texi (sccvn-max-scc-size): Remove.
6125         (rpo-vn-max-loop-depth): Document.
6126         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
6127         when valuezing the VUSE signals we walked out of the region.
6128         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
6129         (phi_translate): Set VN context block to use for availability
6130         lookup.
6131         (compute_avail): Likewise.
6132         (pre_valueize): New function.
6133         (pass_pre::execute): Adjust to the RPO VN API.
6135         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
6136         (propagate_constants_for_unrolling): Remove.
6137         (tree_unroll_loops_completely): Perform value-numbering
6138         on the unrolled bodies loop parent.
6140 2018-08-27  Richard Biener  <rguenther@suse.de>
6142         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
6143         for partial antic compute.
6145 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
6147         PR rtl-optimization/87065
6148         * combine.c (simplify_if_then_else): Formatting fix.
6149         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
6150         check.
6151         (known_cond): Don't return const_true_rtx for vector modes.  Use
6152         CONST0_RTX instead of const0_rtx.  Formatting fixes.
6154 2018-08-27  Martin Liska  <mliska@suse.cz>
6156         PR gcov-profile/87069
6157         * gcov.c (process_file): Record files already processed
6158         and warn about a file being processed multiple times.
6160 2018-08-27  Martin Liska  <mliska@suse.cz>
6162         PR driver/83193
6163         * config/aarch64/aarch64.c (aarch64_override_options_internal):
6164         Set default values for x_aarch64_*_string strings.
6165         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
6166         prefix.  For -mabi do not print '=ABI' in help and use
6167         <option_value> format for -msve-vector-bits and -moverride
6168         options.
6170 2018-08-26  Jeff Law  <law@redhat.com>
6172         * config/mips/frame-header-opt.c: Include "backend.h" rather than
6173         "cfg.h"
6175 2018-08-26  Marek Polacek  <polacek@redhat.com>
6177         PR c++/87029, Implement -Wredundant-move.
6178         * doc/invoke.texi: Document -Wredundant-move.
6180 2018-08-25  Martin Sebor  <msebor@redhat.com>
6182         PR tree-optimization/87059
6183         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
6184         to the same type as the other.
6185         * fold-const.c (fold_binary_loc): Assert expectation.
6187 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
6189         * config/darwin.c (machopic_legitimize_pic_address): Clean up
6190         extraneous parentheses, dead code section and formatting.
6192 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
6194         PR c++/87091
6195         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
6196         wide enough for jumps in the line-numbering to be visible.
6197         (layout::print_gap_in_line_numbering): New member function.
6198         (layout::calculate_line_spans): When using line numbering, merge
6199         line spans that are only 1 line apart.
6200         (diagnostic_show_locus): When printing line numbers, show gaps in
6201         line numbering directly, rather than printing headers.
6202         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
6203         line-numbering with multiple line spans.
6204         (selftest::test_fixit_insert_containing_newline_2): Add test of
6205         line-numbering, in which the spans are close enough to be merged.
6207 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
6209         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
6210         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
6211         * tree-vrp.c (range_is_nonnull): Remove.
6212         (range_includes_zero_p): Accept value_range instead of min/max.
6213         (extract_range_from_binary_expr_1): Do not early bail on
6214         POINTER_PLUS_EXPR.
6215         Use range_includes_zero_p instead of range_is_nonnull.
6216         (extract_range_from_unary_expr): Use range_includes_zero_p instead
6217         of range_is_nonnull.
6218         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
6219         special case VR_ANTI_RANGE.
6220         (vrp_finalize): Same.
6221         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
6222         instead of min/max.
6223         (range_is_nonnull): Remove.
6224         * vr-values.c (vrp_stmt_computes_nonzero): Use
6225         range_includes_zero_p instead of range_is_nonnull.
6226         (extract_range_basic): Pass value_range to range_includes_zero_p
6227         instead of range_is_nonnull.
6229 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
6231         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
6232         * emit-rtl.h (rtl_data): Remove return_bnd.
6233         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
6234         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
6235         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
6236         (POINTER_BOUNDS_MODE): Remove definition.
6237         (make_pointer_bounds_mode): Remove.
6238         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
6239         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
6240         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
6241         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
6242         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
6243         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
6244         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
6246         * config/i386/i386-modes.def (BND32, BND64): Remove.
6247         * config/i386/i386.c (dbx_register_map): Remove bound registers.
6248         (dbx64_register_map): Ditto.
6249         (svr4_dbx_register_map): Ditto.
6250         (indirect_thunk_bnd_needed): Remove.
6251         (indirect_thunks_bnd_used): Ditto.
6252         (indirect_return_bnd_needed): Ditto.
6253         (indirect_return_via_cx_bnd): Ditto.
6254         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
6255         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
6256         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
6257         (output_indirect_thunk_function): Remove handling of
6258         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
6259         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
6260         (ix86_save_reg): Remove handling of crtl->return_bnd.
6261         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
6262         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
6263         and UNSPEC_BNDLX_ADDR.
6264         (ix86_output_indirect_branch_via_reg): Remove handling of
6265         indirect_thunk_prefix_bnd.
6266         (ix86_output_indirect_branch_via_push): Ditto.
6267         (ix86_output_function_return): Ditto.
6268         (ix86_output_indirect_function_return): Ditto.
6269         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
6270         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
6271         (CALL_USED_REGISTERS): Ditto.
6272         (REG_ALLOC_ORDER): Update for removal of bound registers.
6273         (HI_REGISTER_NAMES): Ditto.
6274         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
6275         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
6276         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
6277         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
6278         (FIRST_PSEUDO_REG): Update.
6279         (BND): Remove mode iterator.
6280         * config/i386/predicates.md (bnd_mem_operator): Remove.
6282 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
6284         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6285         vectors.
6287 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
6289         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6290         the case in which the permute needs only a single element and
6291         repeats for every vector of the result.  Extend that case to
6292         handle variable-length vectors.
6293         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6295 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
6297         PR debug/79342
6298         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6299         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6301 2018-08-24  Richard Biener  <rguenther@suse.de>
6303         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6304         bb_flags_allocated members.
6305         (auto_flag): New RAII class for allocating flags.
6306         (auto_edge_flag): New RAII class for allocating edge flags.
6307         (auto_bb_flag): New RAII class for allocating bb flags.
6308         * cfgloop.c (verify_loop_structure): Allocate temporary edge
6309         flag dynamically.
6310         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6311         in favor of temporarily allocated BB flag.
6312         * hsa-brig.c: Re-order includes.
6313         * hsa-dump.c: Likewise.
6314         * hsa-regalloc.c: Likewise.
6315         * print-rtl.c: Likewise.
6316         * profile-count.c: Likewise.
6318 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
6320         PR target/86989
6321         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6322         the TOC register.
6324 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
6326         PR 87073/bootstrap
6327         * wide-int-range.cc (wide_int_range_div): Do not ignore result
6328         from wide_int_range_multiplicative_op.
6330 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6332         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6333         "permutaion".
6335 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
6337         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6338         to 'expanded'.
6340 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
6342         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6343         full GENERIC expression used for replacement.
6345 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
6347         * tree-vrp.c (abs_extent_range): Remove.
6348         (extract_range_into_wide_ints): Pass wide ints by reference.
6349         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6350         Pass wide ints by reference in all calls to
6351         extract_range_into_wide_ints.
6352         * wide-int-range.cc (wide_int_range_div): New.
6353         * wide-int-range.h (wide_int_range_div): New.
6354         (wide_int_range_includes_zero_p): New.
6355         (wide_int_range_zero_p): New.
6357 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
6359         * config/aarch64/aarch64.md (arches): New enum.
6360         (arch): New enum attr.
6361         (arch_enabled): New attr.
6362         (enabled): Now uses arch_enabled only.
6363         (simd, sve, fp16): Removed attribute.
6364         (fp): Attr now defined in terms of 'arch'.
6365         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6366         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6367         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6368         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6369         attributes into 'arch'.
6370         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6371         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6372         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6373         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6374         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6375         'simd' attribute into 'arch'.
6376         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6377         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6378         Convert use of 'fp' attribute to 'arch'.
6379         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6380         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6381         into 'arch'.
6382         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6383         (different modes) Merge 'fp' and 'simd' into 'arch'.
6384         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6385         'simd' into 'arch'.
6387 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
6389         PR rtl-optimization/87026
6390         * expmed.c (canonicalize_comparison): If we can no longer create
6391         pseudoregisters, don't.
6393 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
6395         PR target/86951
6396         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6397         prototype.
6398         * config/arm/arm.c (speculation_barrier_libfunc): New static
6399         variable.
6400         (arm_init_libfuncs): Initialize it.
6401         (arm_emit_speculation_barrier): New function.
6402         * config/arm/arm.md (speculation_barrier): Call
6403         arm_emit_speculation_barrier for architectures that do not have
6404         DSB or ISB.
6405         (speculation_barrier_insn): Only match on Armv7 or later.
6407 2018-08-23  Richard Biener  <rguenther@suse.de>
6409         PR middle-end/87024
6410         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6411         calls.
6413 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
6415         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6416         of single-vector TBLs.
6417         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6418         one input is given.
6420 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
6422         PR target/85910
6423         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6424         aarch64_evpc_tbl guard.
6426 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6428         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6429         behaviour.
6431 2018-08-22  Martin Sebor  <msebor@redhat.com>
6433         PR middle-end/87052
6434         * tree-pretty-print.c (pretty_print_string): Add argument.
6435         (dump_generic_node): Call to pretty_print_string with string size.
6437 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
6439         PR rtl-optimization/86771
6440         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6441         of two SETs into those two SETs, one to be placed at i2, if that SETs
6442         destination is modified between i2 and i3.
6444 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
6446         PR tree-optimization/86725
6447         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6448         function.
6449         (vect_analyze_scalar_cycles_1): Check it.
6451 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
6453         PR tree-optimization/86725
6454         * tree-vect-loop.c (vect_is_simple_reduction): When treating
6455         an outer loop phi as a double reduction, make sure that the
6456         single user of the phi result is an inner loop phi.
6458 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
6460         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6461         grouped stores with gaps to a strided group.
6463 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
6465         * tree-vect-stmts.c (get_group_load_store_type)
6466         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6467         first statement in a group.
6469 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
6471         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6472         the sequence used in gcc/gcc.c.
6474 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
6476         PR other/704
6477         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6478         building it.
6480 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
6482         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6483         Darwin10-specific unwinder-shim.
6484         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6485         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6486         New to cater for Darwin10 Rosetta.
6488 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
6490         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6491         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6493 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
6495         PR bootstrap/81033
6496         PR target/81733
6497         PR target/52795
6498         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6499         (dwarf2out_switch_text_section): Generate a local label for the
6500         second function sub-section and apply it as the second FDE start
6501         label.
6502         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6503         second sub-section start.
6505 2018-08-22  Richard Biener  <rguenther@suse.de>
6507         PR tree-optimization/86988
6508         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6510 2018-08-22  Richard Biener  <rguenther@suse.de>
6512         PR tree-optimization/86945
6513         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6515 2018-08-22  Alexandre Oliva <oliva@adacore.com>
6517         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6518         a comment about how uses of r2 for .sdata2 come about.
6520 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
6522         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6524 2018-08-21  Marek Polacek  <polacek@redhat.com>
6526         PR c++/86981, Implement -Wpessimizing-move.
6527         * doc/invoke.texi: Document -Wpessimizing-move.
6529 2018-08-21  Jan Hubicka  <jh@suse.cz>
6531         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6532         * tree.h (is_redundant_typedef): Remove.
6533         * dwarf2out.c (is_redundant_typedef): Turn into static function.
6535 2018-08-21  Jan Hubicka  <jh@suse.cz>
6537         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6538         when possible.
6540 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
6542         * expmed.c (extract_low_bits): Reject invalid subregs early.
6544 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6546         PR middle-end/86121
6547         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6548         behaviour.
6550 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6552         * config/vxworks.h: Guard vxworks_asm_out_constructor and
6553         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6554         * config/vxworks.c: Likewise.
6556 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6558         * config/vxworks.c: Set targetm.have_ctors_dtors
6559         if HAVE_INITFINI_ARRAY_SUPPORT.
6560         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6561         if HAVE_INITFINI_ARRAY_SUPPORT.
6563 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6565         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6566         default search path for VxWorks < 7.
6568 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6570         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6571         (get_format_string): Refer to c_getstr.
6573 2018-08-21  Tom de Vries  <tdevries@suse.de>
6575         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6576         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6577         (debuginfo_early_stop): Declare.
6578         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6579         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6580         (debuginfo_early_stop): New function.
6581         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6582         and debuginfo_early_stop.
6583         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6584         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6585         (general_init): Call debuginfo_early_init.
6586         (finalize): Call debuginfo_fini.
6587         (do_compile): Call debuginfo_init.
6588         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6589         -fdump-early-debug.
6590         (@item -fdump-debug, @item -fdump-earlydebug): Add.
6592 2018-08-21  Tom de Vries  <tdevries@suse.de>
6594         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6595         flag_dump_noaddr and flag_dump_unnumbered.
6597 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
6599         * wide-int-range.cc (wide_int_range_abs): New.
6600         (wide_int_range_order_set): Rename from wide_int_range_min_max.
6601         * wide-int-range.h (wide_int_range_abs): New.
6602         (wide_int_range_min_max): New.
6603         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6604         case to call wide_int_range_abs.
6605         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6606         (extract_range_from_abs_expr): Delete.
6608 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
6610         PR target/87033
6611         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6612         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6613         for indexed loads.
6615 2018-08-20  Nathan Sidwell  <nathan@acm.org>
6616             Jeff Law <law@redhat.com>
6618         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6619         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6621 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
6623         PR other/84889
6624         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6625         (decl_attributes): Likewise.
6626         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6627         instance.
6628         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6629         * diagnostic-core.h (class auto_diagnostic_group): New class.
6630         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6631         (diagnostic_report_diagnostic): Handle the first diagnostics within
6632         a group.
6633         (emit_diagnostic): Add auto_diagnostic_group instance.
6634         (inform): Likewise.
6635         (inform_n): Likewise.
6636         (warning): Likewise.
6637         (warning_at): Likewise.
6638         (warning_n): Likewise.
6639         (pedwarn): Likewise.
6640         (permerror): Likewise.
6641         (error): Likewise.
6642         (error_n): Likewise.
6643         (error_at): Likewise.
6644         (sorry): Likewise.
6645         (fatal_error): Likewise.
6646         (internal_error): Likewise.
6647         (internal_error_no_backtrace): Likewise.
6648         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6649         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6650         * diagnostic.h (struct diagnostic_context): Add fields
6651         "diagnostic_group_nesting_depth",
6652         "diagnostic_group_emission_count", "begin_group_cb",
6653         "end_group_cb".
6654         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6655         Add auto_diagnostic_group instance(s).
6656         (find_explicit_erroneous_behavior): Likewise.
6657         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6658         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6659         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6660         (gimplify_va_arg_expr): Likewise.
6661         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6662         (HSA_SORRY_AT): Likewise.
6663         * ipa-devirt.c (compare_virtual_tables): Likewise.
6664         (warn_odr): Likewise.
6665         * multiple_target.c (expand_target_clones): Likewise.
6666         * opts-common.c (cmdline_handle_error): Likewise.
6667         * reginfo.c (globalize_reg): Likewise.
6668         * substring-locations.c (format_warning_n_va): Likewise.
6669         * tree-inline.c (expand_call_inline): Likewise.
6670         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6671         * tree-ssa-loop-niter.c
6672         (do_warn_aggressive_loop_optimizations): Likewise.
6673         * tree-ssa-uninit.c (warn_uninit): Likewise.
6674         * tree.c (warn_deprecated_use): Likewise.
6676 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
6678         PR target/87014
6679         * config/i386/i386.md (eh_return): Always update EH return
6680         address in word_mode.
6682 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
6684         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6685         TARGET_SPLIT_COMPLEX_ARG is defined.
6687 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6689         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6691 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6693         PR target/86984
6694         * expr.c (expand_assignment): Assert that bitpos is positive.
6695         (store_field): Likewise
6696         (expand_expr_real_1): Make sure that bitpos is positive.
6697         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6698         integer overflow.
6700 2018-08-20  Nathan Sidwell  <nathan@acm.org>
6702         * Makefile.in (CPP_ID_DATA_H): Delete.
6703         (CPP_INTERNAL_H): Don't add it.
6704         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6705         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6707 2018-08-20  Richard Biener  <rguenther@suse.de>
6709         PR tree-optimization/78655
6710         * tree-vrp.c (extract_range_from_binary_expr_1): Make
6711         pointer + offset nonnull if either operand is nonnull work.
6713 2018-08-20  Tom de Vries  <tdevries@suse.de>
6715         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6716         unless the referenced die describes the added property using
6717         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
6718         Otherwise, add a DW_AT_location to the referenced die.
6720 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
6722         PR target/86994
6723         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6724         register_operand when calling ix86_set_reg_reg_cost.
6725         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6726         Set *total to 0 for operands that satisfy x86_64_immediate_operand
6727         predicate and to 1 otherwise.
6729 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
6731         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6732         emit a diagnostic that it is not supported and reset the option.
6733         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6734         supported and consume the option.  (ASM_FINAL_SPEC): New.
6736 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
6738         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6739         a sentence.
6741 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
6743         C-SKY port: Documentation
6745         * doc/extend.texi (C-SKY Function Attributes): New section.
6746         * doc/invoke.texi (Option Summary): Add C-SKY options.
6747         (C-SKY Options): New section.
6748         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6750 2018-08-17  Jojo  <jijie_rong@c-sky.com>
6751             Huibin Wang  <huibin_wang@c-sky.com>
6752             Sandra Loosemore  <sandra@codesourcery.com>
6753             Chung-Lin Tang  <cltang@codesourcery.com>
6755         C-SKY port: Backend implementation
6757         * config/csky/*: New.
6758         * common/config/csky/*: New.
6760 2018-08-17  Jojo  <jijie_rong@c-sky.com>
6761             Huibin Wang  <huibin_wang@c-sky.com>
6762             Sandra Loosemore  <sandra@codesourcery.com>
6763             Chung-Lin Tang  <cltang@codesourcery.com>
6764             Andrew Jenner  <andrew@codesourcery.com>
6766         C-SKY port: Configury
6768         * config.gcc (csky-*-*): New.
6769         * configure.ac: Add csky to targets for dwarf2 debug_line support.
6770         * configure: Regenerated.
6772 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
6774         * dump-context.h: Include "dumpfile.h".
6775         (dump_context::dump_printf_va): Convert final param from va_list
6776         to va_list *.  Convert from ATTRIBUTE_PRINTF to
6777         ATTRIBUTE_GCC_DUMP_PRINTF.
6778         (dump_context::dump_printf_loc_va): Likewise.
6779         * dumpfile.c: Include "stringpool.h".
6780         (make_item_for_dump_printf_va): Delete.
6781         (make_item_for_dump_printf): Delete.
6782         (class dump_pretty_printer): New class.
6783         (dump_pretty_printer::dump_pretty_printer): New ctor.
6784         (dump_pretty_printer::emit_items): New member function.
6785         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6786         function.
6787         (dump_pretty_printer::emit_item): New member function.
6788         (dump_pretty_printer::stash_item): New member function.
6789         (dump_pretty_printer::format_decoder_cb): New member function.
6790         (dump_pretty_printer::decode_format): New member function.
6791         (dump_context::dump_printf_va): Reimplement in terms of
6792         dump_pretty_printer.
6793         (dump_context::dump_printf_loc_va): Convert final param from va_list
6794         to va_list *.
6795         (dump_context::begin_scope): Reimplement call to
6796         make_item_for_dump_printf.
6797         (dump_printf): Update for change to dump_printf_va.
6798         (dump_printf_loc): Likewise.
6799         (selftest::test_capture_of_dump_calls): Convert "stmt" from
6800         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
6801         with %T, %E, and %G.
6802         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6803         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6804         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6805         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6806         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6807         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6808         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6809         within a dump_printf_loc call to "%wu".
6810         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6811         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
6812         missing space after "=".
6813         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6814         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6815         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6816         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6817         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
6818         duplicate "vectorized" from message.
6820 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
6822         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6823         polyNxK_t element's TYPE_STRING_FLAG.
6825 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
6827         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6828         (they were unnamed before).  Fix comments.
6830 2018-08-17  Nathan Sidwell  <nathan@acm.org>
6832         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6834 2018-08-17  Richard Biener  <rguenther@suse.de>
6836         PR tree-optimization/86841
6837         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6839 2018-08-17  Martin Liska  <mliska@suse.cz>
6841         * common.opt: Remove Warn, Init and Report for options with
6842         Ignore/Deprecated flag. Warning is done automatically for
6843         Deprecated flags.
6844         * config/i386/i386.opt: Likewise.
6845         * config/ia64/ia64.opt: Likewise.
6846         * config/rs6000/rs6000.opt: Likewise.
6847         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6848         Remove usage of flag_check_pointer_bounds.
6849         * lto-wrapper.c (merge_and_complain): Do not handle
6850         OPT_fcheck_pointer_bounds.
6851         (append_compiler_options): Likewise.
6852         * opt-functions.awk: Do not handle Deprecated.
6853         * optc-gen.awk: Check that Var, Report and Init are not
6854         used for an option with Ignore/Deprecated flag.
6855         * opts-common.c (decode_cmdline_option): Do not report
6856         CL_ERR_DEPRECATED.
6857         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6858         options.
6859         * opts.h (struct cl_option): Remove cl_deprecated flag.
6860         (CL_ERR_DEPRECATED): Remove error enum value.
6862 2018-08-17  Richard Biener  <rguenther@suse.de>
6864         PR middle-end/86505
6865         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6866         across a va-arg-pack using call adjust its return value accordingly.
6868 2018-08-16  Martin Sebor  <msebor@redhat.com>
6870         PR tree-optimization/86853
6871         * gimple-ssa-sprintf.c (struct format_result): Rename member.
6872         (struct fmtresult): Add member and initialize it in ctors.
6873         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
6874         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
6875         (format_directive): Set POSUNDER4K when MAYFAIL is set.
6876         (parse_directive): Handle %C same as %c.
6877         (sprintf_dom_walker::compute_format_length): Adjust.
6878         (is_call_safe): Adjust.
6880 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6882         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
6883         for determining how to count the elements.
6884         * builtins.h (c_strlen): Adjust prototype.
6885         * expr.c (string_constant): Add new parameter mem_size.
6886         Set *mem_size appropriately.
6887         * expr.h (string_constant): Adjust protoype.
6888         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6889         * gimple-fold.h (get_range_strlen): Adjust prototype.
6890         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6891         (format_string): Call get_string_length with eltsize.
6893 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
6895         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6896         to emit the span, rather than setting it as the prefix.
6898 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
6900         * diagnostic-show-locus.c (layout::start_annotation_line): Add
6901         "margin_char" parameter, defaulting to space.  Use it in place
6902         of pp_space for the initial part of the margin.
6903         (layout::print_leading_fixits): Use '+' when filling the margin
6904         of line-insertion fix-it hints.
6906 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6908         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6909         Delete.
6911 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6913         * config/rs6000/altivec.md: Don't set length attribute to the default
6914         value.
6915         * config/rs6000/darwin.md: Ditto.
6916         * config/rs6000/dfp.md: Ditto.
6917         * config/rs6000/htm.md: Ditto.
6918         * config/rs6000/rs6000.md: Ditto.
6919         * config/rs6000/sync.md: Ditto.
6920         * config/rs6000/vsx.md: Ditto.
6922 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6924         * config/rs6000/altivec.md: Don't set length attribute to the default
6925         value, for branch instructions.
6926         * config/rs6000/darwin.md: Ditto.
6927         * config/rs6000/rs6000.md: Ditto.
6929 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6931         * config/rs6000/rs6000.md (length): Always define as const_int 4.
6932         (unnamed conditional branch define_insn): Set length to 4 or 8
6933         depending on offset.
6934         (<bd>_<mode>): Similar, for alternative 0.
6935         (<bd>tf_<mode>): Ditto.
6937 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6939         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6941 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
6943         * doc/rtl.texi: Replace old RTX class names with new names.
6946 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
6948         * expmed.h (canonicalize_comparison): New declaration.
6949         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6950         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6951         * optabs.c (prepare_cmp_insn): Likewise.
6952         * rtl.h (unsigned_condition_p): New function which checks if a
6953         comparison operator is unsigned.
6955 2018-08-16  Nathan Sidwell  <nathan@acm.org>
6957         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6958         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6960 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6962         PR target/84711
6963         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6964         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6965         (mov<mov>): ..this and enable unconditionally.
6967 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6969         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6971 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
6973         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6974         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6975         "Common" with "Target".
6977 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
6979         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6980         * doc/invoke.texi (mmitigate-rop): Remove.
6981         * config/i386/i386.c: Do not include "regrename.h".
6982         (ix86_rop_should_change_byte_p, reg_encoded_number)
6983         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6984         Remove.
6985         (ix86_reorg): Remove call to ix86_mitigate_rop.
6986         * config/i386/i386.md (attr "modrm_class"): Remove.
6987         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6988         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6989         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6991 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
6993         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6994         allow folding of mergeh() and mergel() for the float and double types.
6995         (fold_mergehl_helper): Rework to handle building a permute tree
6996         for float vectors.
6998 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
7000         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
7001         for TARGET_SSE.
7003 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
7005         * common.opt (fdiagnostics-show-labels): New option.
7006         * diagnostic-show-locus.c (class layout_range): Add field
7007         "m_label".
7008         (class layout): Add field "m_show_labels_p".
7009         (layout_range::layout_range): Add param "label" and use it to
7010         initialize m_label.
7011         (make_range): Pass in NULL for new "label" param of layout_range's
7012         ctor.
7013         (layout::layout): Initialize m_show_labels_p.
7014         (layout::maybe_add_location_range): Pass in loc_range->m_label
7015         when constructing layout_range instances.
7016         (struct line_label): New struct.
7017         (layout::print_any_labels): New member function.
7018         (layout::print_line): Call it if label-printing is enabled.
7019         (selftest::test_one_liner_labels): New test.
7020         (selftest::test_diagnostic_show_locus_one_liner): Call it.
7021         * diagnostic.c (diagnostic_initialize): Initialize
7022         context->show_labels_p.
7023         * diagnostic.h (struct diagnostic_context): Add field
7024         "show_labels_p".
7025         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7026         -fno-diagnostics-show-labels.
7027         * dwarf2out.c (gen_producer_string): Add
7028         OPT_fdiagnostics_show_labels to the ignored options.
7029         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
7030         param.
7031         (gcc_rich_location::maybe_add_expr): Likewise.
7032         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
7033         label" param, defaulting to NULL.
7034         (gcc_rich_location::add_expr): Add "label" param.
7035         (gcc_rich_location::maybe_add_expr): Likewise.
7036         (class text_range_label): New class.
7037         (class range_label_for_type_mismatch): New class.
7038         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
7039         of format_warning_va.
7040         (fmtwarn_n): Likewise for new params of format_warning_n_va.
7041         * lto-wrapper.c (merge_and_complain): Add
7042         OPT_fdiagnostics_show_labels to the "pick one setting" options.
7043         (append_compiler_options): Likewise to the dropped options.
7044         (append_diag_options): Likewise to the passed-on options.
7045         * opts.c (common_handle_option): Handle the new option.
7046         * selftest-diagnostic.c
7047         (test_diagnostic_context::test_diagnostic_context): Enable
7048         show_labels_p.
7049         * substring-locations.c: Include "gcc-rich-location.h".
7050         (format_warning_n_va): Add "fmt_label" and "param_label" params
7051         and use them as appropriate.
7052         (format_warning_va): Add "fmt_label" and "param_label" params,
7053         passing them on to format_warning_n_va.
7054         (format_warning_at_substring): Likewise.
7055         (format_warning_at_substring_n): Likewise.
7056         * substring-locations.h (format_warning_va): Add "fmt_label" and
7057         "param_label" params.
7058         (format_warning_n_va): Likewise.
7059         (format_warning_at_substring): Likewise.
7060         (format_warning_at_substring_n): Likewise.
7061         * toplev.c (general_init): Initialize global_dc->show_labels_p.
7063 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
7065         PR testsuite/86519
7066         * builtins.c (expand_builtin_memcmp): Do not expand the call
7067         when overflow is detected.
7069 2018-08-15  Martin Sebor  <msebor@redhat.com>
7071         PR tree-optimization/71625
7072         * config/aarch64/aarch64-builtins.c
7073         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
7075 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
7077         * config/s390/s390.c (s390_reorg): Remove loop.
7079 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
7081         * config/darwin.c
7082          (darwin_function_switched_text_sections): Delete.
7083         * gcc/config/darwin.h
7084          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
7086 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
7088         PR target/81685
7089         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
7090         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
7091         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
7093 2018-08-15  Martin Liska  <mliska@suse.cz>
7095         PR tree-optimization/86925
7096         * predict.c (expr_expected_value_1): When taking
7097         later predictor, assign also probability.
7098         Use fold_build2_initializer_loc in order to fold
7099         the expression in -frounding-math.
7101 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
7103         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
7104         patterns.
7105         (expand_vec_perm_1): Try the new method.
7107 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
7109         PR target/86547
7110         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
7111         Check whether lra_live_max_point is 0 before dividing.
7113 2018-08-14  Martin Sebor  <msebor@redhat.com>
7115         PR tree-optimization/86650
7116         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
7117         (vrp_prop::check_mem_ref): Same.
7119 2018-08-13  Liu Hao <lh_mouse@126.com>
7121         * pretty-print.c (eat_esc_sequence): Swap the foreground and
7122         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
7123         and clear it thereafter, as it only works for DBCS.
7125 2018-08-13  Liu Hao <lh_mouse@126.com>
7127         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
7128         handle returned by _get_osf_handle().
7130 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
7132         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
7133         for folding vec_perm.
7135 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
7137         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
7138         Add support for gimple-folding of vec_pack() and vec_unpack()
7139         intrinsics.
7141 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
7143         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
7144         vec_xst variants to the list.
7145         (rs6000_gimple_fold_builtin): Add support for folding unaligned
7146         vector loads and stores.
7148 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
7150         * config.gcc (rs6000-ibm-aix4.x): Delete.
7151         (rs6000-ibm-aix5.1): Delete.
7152         (rs6000-ibm-aix5.2): Delete.
7153         (rs6000-ibm-aix5.3): Delete.
7154         * config/rs6000/aix43.h: Delete.
7155         * config/rs6000/aix51.h: Delete.
7156         * config/rs6000/aix52.h: Delete.
7157         * config/rs6000/t-aix43: Delete.
7159 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
7161         * config/s390/s390.c (s390_decompose_constant_pool_ref):
7162         New function.
7163         (s390_decompose_address): Factor out constant pool ref
7164         decomposition.
7166 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
7168         * config/nds32/nds32-predicates.c
7169         (nds32_can_use_bclr_p): Change return type as bool.
7170         (nds32_can_use_bset_p): Ditto.
7171         (nds32_can_use_btgl_p): Ditto.
7172         (nds32_can_use_bitci_p): Ditto.
7173         * config/nds32/nds32-protos.h
7174         (nds32_can_use_bclr_p): Change declaration.
7175         (nds32_can_use_bset_p): Ditto.
7176         (nds32_can_use_btgl_p): Ditto.
7177         (nds32_can_use_bitci_p): Ditto.
7179 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
7181         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
7182         Support -msched-prolog-epilog option.
7183         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
7185 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
7187         * common/config/nds32/nds32-common.c
7188         (nds32_option_optimization_table): Enalbe -malways-align.
7190 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
7192         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
7193         extra_headers.
7194         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
7195         OPT_misr_secure_ case.
7196         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
7197         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
7198         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
7199         secure attribute.
7200         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
7201         (nds32_isr_info): New field security_level.
7202         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
7203         * config/nds32/nds32.md (return_internal): Consider critical attribute.
7204         * config/nds32/nds32.opt (misr-secure): New option.
7205         * config/nds32/nds32_init.inc: New file.
7206         * config/nds32/nds32_isr.h: New file.
7208 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
7210         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
7211         Update comment for atomic instructions.
7212         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
7213         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
7214         Remove.
7215         (atomic_loaddi): Revise fence expansion to only emit fence prior to
7216         load for __ATOMIC_SEQ_CST model.
7217         (atomic_loaddi_1): Remove float register target.
7218         (atomic_storedi): Handle CONST_INT values.
7219         (atomic_storedi_1): Remove float register source.  Add special case
7220         for zero value.
7221         (memory_barrier): New expander and insn.
7223 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
7225         PR tree-optimization/86835
7226         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
7227         new_stmt after def_gsi, make sure to insert new_square_stmt after
7228         that stmt, not 2 stmts before it.
7230 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
7232         PR target/82418
7233         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
7234         instead of SWI48.
7236 2018-08-10  Martin Liska  <mliska@suse.cz>
7238         PR target/83610
7239         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
7240         function type.
7241         * builtins.c (expand_builtin_expect_with_probability):
7242         New function.
7243         (expand_builtin_expect_with_probability): New function.
7244         (build_builtin_expect_predicate): Add new argumnet probability
7245         for BUILT_IN_EXPECT_WITH_PROBABILITY.
7246         (fold_builtin_expect):
7247         (fold_builtin_2):
7248         (fold_builtin_3):
7249         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
7250         * builtins.h (fold_builtin_expect): Set new argument.
7251         * doc/extend.texi: Document __builtin_expect_with_probability.
7252         * doc/invoke.texi: Likewise.
7253         * gimple-fold.c (gimple_fold_call): Pass new argument.
7254         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
7255         also BUILT_IN_EXPECT_WITH_PROBABILITY.
7256         * predict.c (get_predictor_value): New function.
7257         (expr_expected_value): Add new argument probability. Assume
7258         that predictor and probability are always non-null.
7259         (expr_expected_value_1): Likewise.  For __builtin_expect and
7260         __builtin_expect_with_probability set probability.  Handle
7261         combination in binary expressions.
7262         (tree_predict_by_opcode): Simplify code by simply calling
7263         get_predictor_value.
7264         (pass_strip_predict_hints::execute): Add handling of
7265         BUILT_IN_EXPECT_WITH_PROBABILITY.
7266         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
7267         new predictor.
7268         * tree.h (DECL_BUILT_IN_P): New function.
7270 2018-08-10  Martin Liska  <mliska@suse.cz>
7272         PR tree-optimization/85799
7273         * passes.def: Add argument for pass_strip_predict_hints.
7274         * predict.c (class pass_strip_predict_hints): Add new argument
7275         early_p.
7276         (strip_predictor_early): New function.
7277         (pass_strip_predict_hints::execute): Call the function to
7278         strip predictors.
7279         (strip_predict_hints): New function.
7280         * predict.def: Fix comment.
7282 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
7284         * Makefile.in: Clarify which tm.texi to copy over to assert the
7285         right to grant a GFDL license for all.
7287 2018-08-09  Jeff Law  <law@redhat.com>
7289         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7290         unused variable.
7292 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
7294         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7295         prototype.
7297 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
7299         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7300         reductions for variable-length vectors.
7302 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
7304         PR other/84889
7305         * common.opt (fdiagnostics-show-line-numbers): New option.
7306         * diagnostic-show-locus.c (class layout): Add fields
7307         "m_show_line_numbers_p" and "m_linenum_width";
7308         (num_digits): New function.
7309         (test_num_digits): New function.
7310         (layout::layout): Initialize new fields.  Update m_x_offset
7311         logic to handle any left margin.
7312         (layout::print_source_line): Print line number when requested.
7313         (layout::start_annotation_line): New member function.
7314         (layout::print_annotation_line): Call it.
7315         (layout::print_leading_fixits): Likewise.
7316         (layout::print_trailing_fixits): Likewise.  Update calls to
7317         move_to_column for new parameter.
7318         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7319         it to potentially call start_annotation_line.
7320         (layout::show_ruler): Call start_annotation_line.
7321         (selftest::test_line_numbers_multiline_range): New selftest.
7322         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7323         and selftest::test_line_numbers_multiline_range.
7324         * diagnostic.c (diagnostic_initialize): Initialize
7325         show_line_numbers_p.
7326         * diagnostic.h (struct diagnostic_context): Add field
7327         "show_line_numbers_p".
7328         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7329         -fno-diagnostics-show-line-numbers.
7330         * dwarf2out.c (gen_producer_string): Add
7331         OPT_fdiagnostics_show_line_numbers to the ignored options.
7332         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7333         one setting" options.
7334         (append_compiler_options): Likewise to the dropped options.
7335         (append_diag_options): Likewise to the passed-on options.
7336         * opts.c (common_handle_option): Handle the new option.
7337         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7339 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7341         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7342         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
7343         third argument of type "const signed char" to descriptions of
7344         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7345         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7346         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7347         __builtin_bcdsub_ov functions.
7349 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
7351         PR tree-optimization/86858
7352         * tree-vect-loop.c (vect_is_simple_reduction): Restore
7353         flow_bb_inside_loop_p calls.
7355 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
7357         PR tree-optimization/86871
7358         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7359         instead of gimple_assign_lhs.
7361 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
7363         PR target/86887
7364         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7365         register constraint to operand 0.
7366         (add<mode>3_carryinC): Likewise.
7367         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7369 2018-08-09  Martin Liska  <mliska@suse.cz>
7371         PR c/86895
7372         * common.opt: Remove extra line.
7374 2018-08-09  Martin Liska  <mliska@suse.cz>
7376         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7377         at the end of a line, make first letter capital and end up
7378         a sentence with a dot.
7379         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7380         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7381         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7382         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7383         (PARAM_MAX_ISL_OPERATIONS): Likewise.
7384         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7385         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7386         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7387         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7388         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7389         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7390         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7391         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7392         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7393         (PARAM_TREE_REASSOC_WIDTH): Likewise.
7394         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7395         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7396         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7398 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
7400         PR target/84332
7401         * config/s390/s390.c (s390_option_override_internal): Reduce the
7402         stack-clash-protection-probe-interval param if it would be too big
7403         for z900.
7405 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
7407         PR target/46179
7408         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7409         * config/m68k/m68k.c (handle_move_double): Don't call
7410         m68k_final_prescan_insn.
7411         (m68k_adjust_decorated_operand): Renamed from
7412         m68k_final_prescan_insn, remove first and third operand and
7413         simplify.
7414         (print_operand): Call it.
7415         (print_operand_address): Call it.
7417 2018-08-08  Nathan Sidwell  <nathan@acm.org>
7419         * diagnostic.c (diagnostic_report_current_module): Use
7420         linemap_included_from & linemap_included_from_linemap.
7422 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
7424         * config/aarch64/aarch64-cores.def: Add phecda core.
7425         * config/aarch64/aarch64-tune.md: Regenerate.
7426         * doc/invoke.texi: Add phecda core.
7428 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
7430         PR target/85295
7431         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7432         definitions.
7433         * config/s390/s390.md ("movti"): Add more alternatives for
7434         constant to GPR copies.
7436 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
7438         * config/s390/s390.c: Fix whitespace damage throughout the file.
7439         * config/s390/s390.h: Likewise.
7440         * config/s390/tpf.h: Likewise.
7442 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
7444         * config/s390/s390.c (s390_loadrelative_operand_p):
7445         Remove TARGET_CPU_ZARCH usages.
7446         (s390_rtx_costs): Likewise.
7447         (s390_legitimate_constant_p): Likewise.
7448         (s390_cannot_force_const_mem): Likewise.
7449         (legitimate_reload_constant_p): Likewise.
7450         (s390_preferred_reload_class): Likewise.
7451         (legitimize_pic_address): Likewise.
7452         (legitimize_tls_address): Likewise.
7453         (s390_split_branches): Removed.
7454         (s390_add_execute): Removed.
7455         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7456         (s390_mainpool_start): Likewise.
7457         (s390_mainpool_finish): Likewise.
7458         (s390_mainpool_cancel): Removed.
7459         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7460         (s390_chunkify_cancel): Likewise.
7461         (s390_return_addr_rtx): Likewise.
7462         (s390_register_info): Remove split_branches_pending_p uages.
7463         (s390_optimize_register_info): Likewise.
7464         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7465         split_branches_pending_p usages.
7466         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7467         (s390_load_got): Likewise.
7468         (s390_expand_split_stack_prologue): Likewise.
7469         (output_asm_nops): Likewise.
7470         (s390_function_profiler): Likewise.
7471         (s390_emit_call): Likewise.
7472         (s390_conditional_register_usage): Likewise.
7473         (s390_optimize_prologue): Likewise.
7474         (s390_reorg): Remove TARGET_CPU_ZARCH and
7475         split_branches_pending_p usages.
7476         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7477         usages.
7478         (s390_output_indirect_thunk_function): Likewise.
7479         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7480         (TARGET_CPU_ZARCH_P): Removed.
7481         (struct machine_function): Remove split_branches_pending_p.
7482         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7484 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
7486         * common/config/s390/s390-common.c (processor_flags_table):
7487         Remove flags.
7488         * config.gcc: Remove with_arch/with_tune support.
7489         * config/s390/2064.md: Remove cpu attribute comparisons.
7490         * config/s390/driver-native.c (s390_host_detect_local_cpu):
7491         Remove MTN.
7492         * config/s390/linux.h (ASM_SPEC):
7493         Remove -march support.
7494         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7495         Use a table to get an arch level.
7496         * config/s390/s390-opts.h (enum processor_type):
7497         Remove enum values.
7498         * config/s390/s390.c
7499         (processor_table): Remove entries, add arch_level values.
7500         (s390_issue_rate): Remove cases.
7501         (s390_option_override): Adjust
7502         s390_option_override_internal() call.
7503         (s390_option_override_internal): Remove deprecation warning.
7504         (s390_valid_target_attribute_tree): Adjust
7505         s390_option_override_internal() call.
7506         * config/s390/s390.h (struct s390_processor):
7507         Share with s390-c.c, add arch_level field.
7508         * config/s390/s390.md:
7509         Remove occurrences in cpu attribute.
7510         * config/s390/s390.opt: Remove -march/-mtune support.
7511         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7512         * doc/invoke.texi: Remove deprecation warning.
7514 2018-08-08  Luis Machado  <luis.machado@linaro.org>
7516         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7517         global.
7518         (qdf24xx_tunings): Set vector cost structure to
7519         qdf24xx_vector_cost.
7521         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7522         <register_sextend>: Set to 3.
7524 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
7526         PR target/86838
7527         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7528         * config/aarch64/aarch64-simd.md
7529         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7530         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7531         (aarch64_frecpx<mode>): ...this new pattern.
7532         * config/aarch64/aarch64-simd-builtins.def: Remove comment
7533         about aarch64_frecp<FRECP:frecp_suffix><mode>.
7535 2018-08-07  Martin Liska  <mliska@suse.cz>
7537         PR middle-end/83023
7538         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7539         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7540         * predict.def (PRED_MALLOC_NONNULL): New predictor.
7541         * doc/extend.texi: Document that malloc attribute adds
7542         hit to compiler.
7544 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
7546         PR target/86785
7547         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7548         Define to speculation_safe_value_not_needed.
7550 2018-08-06  Jeff Law  <law@redhat.com>
7552         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7553         the vr_values instance to cprop_into_stmt.
7554         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7555         (cprop_operand): Also query EVRP to determine if OP is a constant.
7557 2018-08-06  Nathan Sidwell  <nathan@acm.org>
7559         * diagnostic.c (diagnostic_report_current_module): Reroll
7560         included-at loop.  Translate text.
7562 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
7564         * function-tests.c (selftest::test_expansion_to_rtl): Call
7565         free_after_compilation.
7567 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7569         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7571 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
7573         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7574         loops with memory block operations from getting unrolled.
7576 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
7578         PR target/86807
7579         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7580         Define to speculation_safe_value_not_needed.
7582 2018-08-06  Jeff Law  <law@redhat.com>
7584         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7585         assert.
7587 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7589         PR target/86662
7590         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7591         with all enabled __intN types.
7593         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7595 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7597         * alias.c (record_set): Check for clobber high.
7598         * cfgexpand.c (expand_gimple_stmt): Likewise.
7599         * combine-stack-adj.c (single_set_for_csa): Likewise.
7600         * combine.c (find_single_use_1): Likewise.
7601         (set_nonzero_bits_and_sign_copies): Likewise.
7602         (get_combine_src_dest): Likewise.
7603         (is_parallel_of_n_reg_sets): Likewise.
7604         (try_combine): Likewise.
7605         (record_dead_and_set_regs_1): Likewise.
7606         (reg_dead_at_p_1): Likewise.
7607         (reg_dead_at_p): Likewise.
7608         * dce.c (deletable_insn_p): Likewise.
7609         (mark_nonreg_stores_1): Likewise.
7610         (mark_nonreg_stores_2): Likewise.
7611         * df-scan.c (df_find_hard_reg_defs): Likewise.
7612         (df_uses_record): Likewise.
7613         (df_get_call_refs): Likewise.
7614         * dwarf2out.c (mem_loc_descriptor): Likewise.
7615         * haifa-sched.c (haifa_classify_rtx): Likewise.
7616         * ira-build.c (create_insn_allocnos): Likewise.
7617         * ira-costs.c (scan_one_insn): Likewise.
7618         * ira.c (equiv_init_movable_p): Likewise.
7619         (rtx_moveable_p): Likewise.
7620         (interesting_dest_for_shprep): Likewise.
7621         * jump.c (mark_jump_label_1): Likewise.
7622         * postreload-gcse.c (record_opr_changes): Likewise.
7623         * postreload.c (reload_cse_simplify): Likewise.
7624         (struct reg_use): Add source expr.
7625         (reload_combine): Check for clobber high.
7626         (reload_combine_note_use): Likewise.
7627         (reload_cse_move2add): Likewise.
7628         (move2add_note_store): Likewise.
7629         * print-rtl.c (print_pattern): Likewise.
7630         * recog.c (decode_asm_operands): Likewise.
7631         (store_data_bypass_p): Likewise.
7632         (if_test_bypass_p): Likewise.
7633         * regcprop.c (kill_clobbered_value): Likewise.
7634         (kill_set_value): Likewise.
7635         * reginfo.c (reg_scan_mark_refs): Likewise.
7636         * reload1.c (maybe_fix_stack_asms): Likewise.
7637         (eliminate_regs_1): Likewise.
7638         (elimination_effects): Likewise.
7639         (mark_not_eliminable): Likewise.
7640         (scan_paradoxical_subregs): Likewise.
7641         (forget_old_reloads_1): Likewise.
7642         * reorg.c (find_end_label): Likewise.
7643         (try_merge_delay_insns): Likewise.
7644         (redundant_insn): Likewise.
7645         (own_thread_p): Likewise.
7646         (fill_simple_delay_slots): Likewise.
7647         (fill_slots_from_thread): Likewise.
7648         (dbr_schedule): Likewise.
7649         * resource.c (update_live_status): Likewise.
7650         (mark_referenced_resources): Likewise.
7651         (mark_set_resources): Likewise.
7652         * rtl.c (copy_rtx): Likewise.
7653         * rtlanal.c (reg_referenced_p): Likewise.
7654         (single_set_2): Likewise.
7655         (noop_move_p): Likewise.
7656         (note_stores): Likewise.
7657         * sched-deps.c (sched_analyze_reg): Likewise.
7658         (sched_analyze_insn): Likewise.
7660 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7662         * cse.c (invalidate_reg): New function extracted from...
7663         (invalidate): ...here.
7664         (canonicalize_insn): Check for clobber high.
7665         (invalidate_from_clobbers): invalidate clobber highs.
7666         (invalidate_from_sets_and_clobbers): Likewise.
7667         (count_reg_usage): Check for clobber high.
7668         (insn_live_p): Likewise.
7669         * cselib.c (cselib_expand_value_rtx_1):Likewise.
7670         (cselib_invalidate_regno): Check for clobber in setter.
7671         (cselib_invalidate_rtx): Pass through setter.
7672         (cselib_invalidate_rtx_note_stores):
7673         (cselib_process_insn): Check for clobber high.
7674         * cselib.h (cselib_invalidate_rtx): Add operand.
7676 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7678         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7679         (mark_not_eliminable): Likewise.
7680         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7681         * lra-lives.c (process_bb_lives): Check for clobber high.
7682         * lra.c (new_insn_reg): Remember clobber highs.
7683         (collect_non_operand_hard_regs): Check for clobber high.
7684         (lra_set_insn_recog_data): Likewise.
7685         (add_regs_to_insn_regno_info): Likewise.
7686         (lra_update_insn_regno_info): Likewise.
7688 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7690         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7691         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7693 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7695         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7696         (copy_insn_1): Likewise.
7697         (gen_hard_reg_clobber_high): New gen function.
7698         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7699         * genemit.c (gen_exp): Likewise.
7700         (gen_emit_seq): Pass through info.
7701         (gen_insn): Check for CLOBBER_HIGH.
7702         (gen_expand): Pass through info.
7703         (gen_split): Likewise.
7704         (output_add_clobbers): Likewise.
7705         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7706         (remove_clobbers): Likewise.
7707         * rtl.h (gen_hard_reg_clobber_high): New declaration.
7709 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7711         * doc/rtl.texi (clobber_high): Add.
7712         (parallel): Add in clobber high
7713         * rtl.c (rtl_check_failed_code3): Add function.
7714         * rtl.def (CLOBBER_HIGH): Add expression.
7715         * rtl.h (RTL_CHECKC3): Add macro.
7716         (rtl_check_failed_code3): Add declaration.
7717         (XC3EXP): Add macro.
7719 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
7721         PR target/86386
7722         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7723         cfun->machine->max_used_stack_alignment if needed.
7725 2018-08-04  Martin Sebor  <msebor@redhat.com>
7727         PR tree-optimization/86571
7728         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7729         NaN output to 4.
7731 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
7733         PR target/86799
7734         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7735         Define.
7737 2018-08-03  Jeff Law  <law@redhat.com>
7739         PR target/86795
7740         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7741         Define to speculation_safe_value_not_needed.
7743 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
7745         * doc/gcov.texi (-x): Remove duplicate "to".
7746         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7747         (-Wif-not-aligned): Remove duplicate "is".
7748         (-flto): Remove duplicate "the".
7749         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7750         duplicate "v5.00.b".
7751         (MSP430 Options): Remove duplicate "and" from the description
7752         of "-mgprel-sec=regexp".
7753         (x86 Options): Remove duplicate copies of "vmldLog102" and
7754         vmlsLog104 from description of "-mveclibabi=type".
7756 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
7758         * internal-fn.h (first_commutative_argument): Declare.
7759         * internal-fn.c (first_commutative_argument): New function.
7760         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7761         restrictions for pattern statements.  Use first_commutative_argument
7762         to look for commutative operands in calls to internal functions.
7764 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
7766         * Makefile.in (wide-int-range.o): New.
7767         * tree-vrp.c: Move all the wide_int_* functions to...
7768         * wide-int-range.cc: ...here.
7769         * tree-vrp.h: Move all the wide_int_* prototypes to...
7770         * wide-int-range.h: ...here.
7772 2018-08-03  Tom de Vries  <tdevries@suse.de>
7774         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7775         UI_NONE.
7776         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7777         * except.c (output_function_exception_table): Do early exit if
7778         targetm_common.except_unwind_info (&global_options) == UI_NONE.
7780 2018-08-03  Martin Liska  <mliska@suse.cz>
7782         * predict.c (dump_prediction): Change to 2 digits
7783         in fraction part.
7785 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7787         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7788         neon_dup_q to...
7789         (falkor_am_1_gtov_gtov): ... a new insn reservation.
7791 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
7793         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7794         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7795         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7796         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7797         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7799 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
7801         * diagnostic-show-locus.c (diagnostic_show_locus): Use
7802         pp_take_prefix when saving the existing prefix.
7803         * diagnostic.c (diagnostic_append_note): Likewise.
7804         * langhooks.c (lhd_print_error_function): Likewise.
7805         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7806         param's type.  Free the existing prefix.
7807         (pp_take_prefix): New function.
7808         (pretty_printer::pretty_printer): Drop the prefix parameter.
7809         Rename the length parameter to match the comment.
7810         (pretty_printer::~pretty_printer): Free the prefix.
7811         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7812         parameter.
7813         (struct pretty_printer): Drop the "const" from "prefix" field's
7814         type and clarify memory management.
7815         (pp_set_prefix): Drop the "const" from the 2nd param.
7816         (pp_take_prefix): New decl.
7818 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
7820         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7821         for word_mode_ok here instead of passing as argument.
7822         (expand_block_compare): Change select_block_compare_mode() call.
7823         (expand_strncmp_gpr_sequence): New function.
7824         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7826 2018-08-02  Jeff Law  <law@redhat.com>
7828         PR target/86790
7829         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7830         Define to speculation_safe_value_not_needed.
7832         PR target/86784
7833         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7834         Define to speculation_safe_value_not_needed.
7836 2018-08-02  Tom de Vries  <tdevries@suse.de>
7838         PR target/86660
7839         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7840         function.  Return UI_TARGET unconditionally.
7841         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7842         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7844 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7846         * genemit.c (print_overload_test): Fix typo.
7848 2018-08-02  Richard Biener  <rguenther@suse.de>
7850         PR tree-optimization/86816
7851         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7852         which checks for value availability before querying it.
7853         (gvn_uses_equal): Use it.
7854         (same_succ_hash): Likewise.
7855         (gimple_equal_p): Likewise.
7857 2018-08-02  Nick Clifton  <nickc@redhat.com>
7859         PR target/86813
7860         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7861         Define to speculation_safe_value_not_needed.
7863         PR target/86810
7864         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7865         Define to speculation_safe_value_not_needed.
7867         PR target/86810
7868         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7869         Define to speculation_safe_value_not_needed.
7871         PR target/86803
7872         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7873         Define to speculation_safe_value_not_needed.
7875         PR target/86797
7876         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7877         Define to speculation_safe_value_not_needed.
7879         PR target/86791
7880         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7881         Define to speculation_safe_value_not_needed.
7883         PR target/86789
7884         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7885         Define to speculation_safe_value_not_needed.
7887         PR target/86787
7888         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7889         Define to speculation_safe_value_not_needed.
7891         PR target/86782
7892         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7893         speculation_safe_value_not_needed.
7895         PR target/86781
7896         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7897         to speculation_safe_value_not_needed.
7899 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7901         * doc/md.texi: Expand the documentation of instruction names
7902         to mention port-local uses.  Document '@' in pattern names.
7903         * read-md.h (overloaded_instance, overloaded_name): New structs.
7904         (mapping): Declare.
7905         (md_reader::handle_overloaded_name): New member function.
7906         (md_reader::get_overloads): Likewise.
7907         (md_reader::m_first_overload): New member variable.
7908         (md_reader::m_next_overload_ptr): Likewise.
7909         (md_reader::m_overloads_htab): Likewise.
7910         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7911         m_next_overload_ptr and m_overloads_htab.
7912         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7913         (get_mode_token, get_code_token, get_int_token): New functions.
7914         (map_attr_string): Add an optional argument that passes back
7915         the associated iterator.
7916         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7917         (md_reader::handle_overloaded_name, add_overload_instance): New
7918         functions.
7919         (apply_iterators): Handle '@' names.  Report an error if '@'
7920         is used without iterators.
7921         (initialize_iterators): Initialize the new iterator_group fields.
7922         * genopinit.c (handle_overloaded_code_for)
7923         (handle_overloaded_gen): New functions.
7924         (main): Use them to print declarations of maybe_code_for_* and
7925         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7926         * genemit.c (print_overload_arguments, print_overload_test)
7927         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7928         (main): Use it to print definitions of maybe_code_for_* and
7929         maybe_gen_* functions.
7930         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7931         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7932         instead of explicit mode checks.
7933         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7934         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7935         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7936         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7937         (aarch64_expand_compare_and_swap): Likewise
7938         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7939         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7940         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7941         (aarch64_constant_pool_reload_icode): Delete.
7942         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7943         instead of aarch64_constant_pool_reload_icode.  Use
7944         code_for_aarch64_reload_mov instead of explicit mode checks.
7945         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7946         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7947         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7948         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7949         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7950         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7951         (aarch64_atomic_load_op_code): Delete.
7952         (aarch64_emit_atomic_load_op): Likewise.
7953         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7954         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
7955         instead of aarch64_emit_atomic_load_op.
7956         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7957         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7958         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7959         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7960         character before the pattern name.
7961         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7962         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7963         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7964         (aarch64_frecps<mode>): Likewise.
7965         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7966         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7967         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7968         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7969         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7971 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7973         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7974         Allow HFmode constants if TARGET_FP_F16INST.
7976 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
7978         PR target/86014
7979         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7980         No longer check last store for clobber of address register.
7982 2018-08-02  Martin Liska  <mliska@suse.cz>
7984         PR gcov-profile/86817
7985         * gcov.c (process_all_functions): New function.
7986         (main): Call it.
7987         (process_file): Move functions processing to
7988         process_all_functions.
7990 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
7992         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7993         "const" to the "gimple *" and "rtx_insn *" parameters.
7994         * dumpfile.h (dump_user_location_t::dump_user_location_t):
7995         Likewise.
7996         (dump_location_t::dump_location_t): Likewise.
7998 2018-08-01  Martin Sebor  <msebor@redhat.com>
8000         PR tree-optimization/86650
8001         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
8002         rather than a "gcall *".  Directly pass the data of interest
8003         to percent_K_format, rather than building a temporary CALL_EXPR
8004         to hold it.
8005         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
8006         (gimple_fold_builtin_strncat): Adjust.
8007         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
8008         gcall* argument with gimple*.
8009         * gimple-ssa-warn-restrict.c (check_call): Same.
8010         (wrestrict_dom_walker::before_dom_children): Same.
8011         (builtin_access::builtin_access): Same.
8012         (check_bounds_or_overlap): Same
8013         (maybe_diag_overlap): Same.
8014         (maybe_diag_offset_bounds): Same.
8015         * tree-diagnostic.c (default_tree_printer): Move usage of
8016         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
8017         to this callsite.
8018         * tree-pretty-print.c (percent_K_format): Add argument.
8019         * tree-pretty-print.h: Add argument.
8020         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
8021         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
8022         (maybe_diag_stxncpy_trunc): Same.
8023         (handle_builtin_stxncpy): Same.
8024         (handle_builtin_strcat): Same.
8026 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8028         * match.pd: Optimise pointer range checks.
8030 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8032         PR tree-optimization/86758
8033         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
8034         to remove pattern statements.
8036 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8038         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
8039         result of dfs_enumerate_from when constructing stmt_vec_infos,
8040         instead of additionally calling get_loop_body.
8042 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8044         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
8045         parameter.
8046         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
8047         When creating an iv, assert that the step is not known to be zero.
8048         (vect_setup_realignment): Update call accordingly.
8049         * tree-vect-stmts.c (vectorizable_store): Likewise.
8050         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
8052 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8054         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
8055         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
8056         (vectorizable_reduction): Likewise.
8057         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8058         (vect_detect_hybrid_slp_stmts): Likewise.
8059         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8061 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
8063         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
8064         (wide_int_set_zero_nonzero_bits): ...this.
8065         (zero_nonzero_bits_from_vr): Rename to...
8066         (vrp_set_zero_nonzero_bits): ...this.
8067         (extract_range_from_multiplicative_op_1): Abstract wide int
8068         code...
8069         (wide_int_range_multiplicative_op): ...here.
8070         (extract_range_from_binary_expr_1): Extract wide int binary
8071         operations into their own functions.
8072         (wide_int_range_lshift): New.
8073         (wide_int_range_can_optimize_bit_op): New.
8074         (wide_int_range_shift_undefined_p): New.
8075         (wide_int_range_bit_xor): New.
8076         (wide_int_range_bit_ior): New.
8077         (wide_int_range_bit_and): New.
8078         (wide_int_range_trunc_mod): New.
8079         (extract_range_into_wide_ints): New.
8080         (vrp_shift_undefined_p): New.
8081         (extract_range_from_multiplicative_op): New.
8082         (vrp_can_optimize_bit_op): New.
8083         * tree-vrp.h (value_range::dump): New.
8084         (wide_int_range_multiplicative_op): New.
8085         (wide_int_range_lshift):New.
8086         (wide_int_range_shift_undefined_p): New.
8087         (wide_int_range_bit_xor): New.
8088         (wide_int_range_bit_ior): New.
8089         (wide_int_range_bit_and): New.
8090         (wide_int_range_trunc_mod): New.
8091         (zero_nonzero_bits_from_bounds): Rename to...
8092         (wide_int_set_zero_nonzero_bits): ...this.
8093         (zero_nonzero_bits_from_vr): Rename to...
8094         (vrp_set_zero_nonzero_bits): ...this.
8095         (range_easy_mask_min_max): Rename to...
8096         (wide_int_range_can_optimize_bit_op): this.
8097         * vr-values.c (simplify_bit_ops_using_ranges): Rename
8098         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
8100 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8102         * tree-vectorizer.h (vect_orig_stmt): New function.
8103         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
8104         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
8105         (vect_create_epilog_for_reduction): Likewise.
8106         (vectorizable_live_operation): Likewise.
8107         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8108         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
8109         * tree-vect-stmts.c (vectorizable_call): Likewise.
8110         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
8112 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8114         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
8115         argument.
8116         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
8117         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
8118         (vect_transform_loop): Likewise.
8119         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8121 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8123         * tree-vectorizer.h (vect_schedule_slp): Return void.
8124         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8125         (vect_schedule_slp): Likewise.
8127 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8129         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
8130         argument.
8131         (vect_transform_loop): Update calls accordingly.  Schedule SLP
8132         instances before the main loop, if any exist.
8134 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8136         PR tree-optimization/86749
8137         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
8138         If the lhs is used in a COND_EXPR, check that it is being used
8139         as the "then" or "else" value.
8141 2018-08-01  Tom de Vries  <tdevries@suse.de>
8143         PR target/86800
8144         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8145         speculation_safe_value_not_needed.
8147 2018-08-01  Richard Biener  <rguenther@suse.de>
8149         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
8150         as base and offset.
8152 2018-08-01  Martin Liska  <mliska@suse.cz>
8154         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
8155         format how successful transformation is dumped.
8156         (gimple_mod_pow2_value_transform): Likewise.
8157         (gimple_mod_subtract_transform): Likewise.
8158         (gimple_stringops_transform): Likewise.
8160 2018-08-01  Martin Liska  <mliska@suse.cz>
8162         PR value-prof/35543
8163         * value-prof.c (interesting_stringop_to_profile_p):
8164         Simplify the code and add BUILT_IN_MEMMOVE.
8165         (gimple_stringops_transform): Likewise.
8167 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
8169         * config/aarch64/aarch64-simd.md
8170         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
8171         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
8172         use GPI iterator instead of SI mode.
8174 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
8176         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
8177         rs6000_speculation_barrier.
8178         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
8179         new barrier pattern name.
8181 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
8183         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
8184         (speculation_barrier): New insn.
8186 2018-08-01  Richard Biener  <rguenther@suse.de>
8188         PR bootstrap/86724
8189         * graphite.h: Include isl/id.h and isl/space.h to allow build
8190         with ISL 0.20.
8192 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
8194         PR target/86651
8195         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8196         mode for COFF targets.
8197         * defaults.h (TARGET_COFF): Define.
8198         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
8199         TARGET_COFF): Define.
8200         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
8201         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
8202         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
8204 2018-07-31  Alexandre Oliva <oliva@adacore.com>
8206         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
8207         * gimple-streamer-out.c (output_bb): Save it.
8208         * lto-streamer-in.c (input_struct_function_base): Restore
8209         instance discriminator if available.  Create map on demand.
8210         * lto-streamer-out.c (output_struct_function_base): Save it if
8211         available.
8212         * final.c (decl_to_instance_map): Document LTO strategy.
8214 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
8215             Olivier Hainque  <hainque@adacore.com>
8217         * debug.h (decl_to_instance_map_t): New type.
8218         (decl_to_instance_map): Declare.
8219         (maybe_create_decl_to_instance_map): New inline function.
8220         * final.c (bb_discriminator, last_bb_discriminator): New statics,
8221         to track basic block discriminators.
8222         (final_start_function_1): Initialize them.
8223         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
8224         bb_discriminator.
8225         (decl_to_instance_map): New variable.
8226         (map_decl_to_instance, maybe_set_discriminator): New functions.
8227         (notice_source_line): Set discriminator.
8229 2018-07-31  Ian Lance Taylor  <iant@golang.org>
8231         * targhooks.c (default_have_speculation_safe_value): Add
8232         ATTRIBUTE_UNUSED.
8234 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
8236         * dump-context.h: Include "pretty-print.h".
8237         (dump_context::refresh_dumps_are_enabled): New decl.
8238         (dump_context::emit_item): New decl.
8239         (class dump_context): Add fields "m_test_pp" and
8240         "m_test_pp_flags".
8241         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8242         (temp_dump_context::get_dumped_text): New decl.
8243         (class temp_dump_context): Add field "m_pp".
8244         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
8245         (dump_context::refresh_dumps_are_enabled): ...and add a test for
8246         m_test_pp.
8247         (set_dump_file): Update for above change.
8248         (set_alt_dump_file): Likewise.
8249         (dump_loc): New overload, taking a pretty_printer *.
8250         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
8251         to any test pretty-printer.
8252         (make_item_for_dump_gimple_stmt): New function, adapted from
8253         optinfo::add_gimple_stmt.
8254         (dump_context::dump_gimple_stmt): Call it, and use the result,
8255         eliminating the direct usage of dump_file and alt_dump_file in
8256         favor of indirectly using them via emit_item.
8257         (make_item_for_dump_gimple_expr): New function, adapted from
8258         optinfo::add_gimple_expr.
8259         (dump_context::dump_gimple_expr): Call it, and use the result,
8260         eliminating the direct usage of dump_file and alt_dump_file in
8261         favor of indirectly using them via emit_item.
8262         (make_item_for_dump_generic_expr): New function, adapted from
8263         optinfo::add_tree.
8264         (dump_context::dump_generic_expr): Call it, and use the result,
8265         eliminating the direct usage of dump_file and alt_dump_file in
8266         favor of indirectly using them via emit_item.
8267         (make_item_for_dump_printf_va): New function, adapted from
8268         optinfo::add_printf_va.
8269         (make_item_for_dump_printf): New function.
8270         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
8271         and use the result, eliminating the direct usage of dump_file and
8272         alt_dump_file in favor of indirectly using them via emit_item.
8273         (make_item_for_dump_dec): New function.
8274         (dump_context::dump_dec): Call it, and use the result,
8275         eliminating the direct usage of dump_file and alt_dump_file in
8276         favor of indirectly using them via emit_item.
8277         (make_item_for_dump_symtab_node): New function, adapted from
8278         optinfo::add_symtab_node.
8279         (dump_context::dump_symtab_node): Call it, and use the result,
8280         eliminating the direct usage of dump_file and alt_dump_file in
8281         favor of indirectly using them via emit_item.
8282         (dump_context::begin_scope): Reimplement, avoiding direct usage
8283         of dump_file and alt_dump_file in favor of indirectly using them
8284         via emit_item.
8285         (dump_context::emit_item): New member function.
8286         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8287         Set up test pretty-printer on the underlying context.  Call
8288         refresh_dumps_are_enabled.
8289         (temp_dump_context::~temp_dump_context): Call
8290         refresh_dumps_are_enabled.
8291         (temp_dump_context::get_dumped_text): New member function.
8292         (selftest::verify_dumped_text): New function.
8293         (ASSERT_DUMPED_TEXT_EQ): New macro.
8294         (selftest::test_capture_of_dump_calls): Run all tests twice, with
8295         and then without optinfo enabled.  Add uses of
8296         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
8297         * dumpfile.h: Update comment for the dump_* API.
8298         * optinfo-emit-json.cc
8299         (selftest::test_building_json_from_dump_calls): Update for new
8300         param for temp_dump_context ctor.
8301         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8302         and "m_owned" field.
8303         (optinfo_item::~optinfo_item): Likewise.
8304         (optinfo::add_item): New member function.
8305         (optinfo::emit): Update comment.
8306         (optinfo::add_string): Delete.
8307         (optinfo::add_printf): Delete.
8308         (optinfo::add_printf_va): Delete.
8309         (optinfo::add_gimple_stmt): Delete.
8310         (optinfo::add_gimple_expr): Delete.
8311         (optinfo::add_tree): Delete.
8312         (optinfo::add_symtab_node): Delete.
8313         (optinfo::add_dec): Delete.
8314         * optinfo.h (class dump_context): New forward decl.
8315         (optinfo::add_item): New decl.
8316         (optinfo::add_string): Delete.
8317         (optinfo::add_printf): Delete.
8318         (optinfo::add_printf_va): Delete.
8319         (optinfo::add_gimple_stmt): Delete.
8320         (optinfo::add_gimple_expr): Delete.
8321         (optinfo::add_tree): Delete.
8322         (optinfo::add_symtab_node): Delete.
8323         (optinfo::add_dec): Delete.
8324         (optinfo::add_poly_int): Delete.
8325         (optinfo_item::optinfo_item): Remove "owned" param.
8326         (class optinfo_item): Remove field "m_owned".
8328 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8330         PR middle-end/86705
8331         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8332         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8333         requested variable alignment.
8334         (expand_one_ssa_partition): Likewise.
8335         (expand_one_var): Likewise.
8337 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8339         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8340         to speculation_safe_value_not_needed.
8342 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8344         * targhooks.h (speculation_safe_value_not_needed): New prototype.
8345         * targhooks.c (speculation_safe_value_not_needed): New function.
8346         * target.def (have_speculation_safe_value): Update documentation.
8347         * doc/tm.texi: Regenerated.
8349 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8351         * config/aarch64/iterators.md (ALLI_TI): New iterator.
8352         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8353         expand.
8354         (despeculate_copy<ALLI:mode>_insn): New insn.
8355         (despeculate_copyti_insn): New insn.
8356         (despeculate_simple<ALLI:mode>): New insn
8357         (despeculate_simpleti): New insn.
8358         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8359         function.
8360         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8361         aarch64_speculation_safe_value.
8362         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8364 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8366         * config/aarch64/aarch64-speculation.cc: New file.
8367         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8368         before pass_reorder_blocks.
8369         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8370         prototype.
8371         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8372         X14 and X15 when tracking speculation.
8373         * config/aarch64/aarch64.md (register name constants): Add
8374         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8375         (unspec): Add UNSPEC_SPECULATION_TRACKER.
8376         (speculation_barrier): New insn attribute.
8377         (cmp<mode>): Allow SP in comparisons.
8378         (speculation_tracker): New insn.
8379         (speculation_barrier): Add speculation_barrier attribute.
8380         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8381         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8382         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8384 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8386         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8387         aarch64_track_speculation is true.
8388         (tb<optab><mode>1): Likewise.
8389         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8390         generate CB[N]Z when tracking speculation.
8391         (aarch64_split_compare_and_swap): Likewise.
8392         (aarch64_split_atomic_op): Likewise.
8394 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8396         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8398 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8400         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8401         (speculation_barrier): New insn.
8403 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8405         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8406         * config/arm/arm.md (speculation_barrier): New expand.
8407         (speculation_barrier_insn): New pattern.
8409 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8411         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8412         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8413         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8414         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8415         list.
8416         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8417         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8418         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8419         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8420         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8421         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8422         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8423         * builtins.c (expand_speculation_safe_value): New function.
8424         (expand_builtin): Call it.
8425         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8426         * doc/extend.texi: Document __builtin_speculation_safe_value.
8427         * doc/md.texi: Document "speculation_barrier" pattern.
8428         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8429         TARGET_HAVE_SPECULATION_SAFE_VALUE.
8430         * doc/tm.texi: Regenerated.
8431         * target.def (have_speculation_safe_value, speculation_safe_value): New
8432         hooks.
8433         * targhooks.c (default_have_speculation_safe_value): New function.
8434         (default_speculation_safe_value): New function.
8435         * targhooks.h (default_have_speculation_safe_value): Add prototype.
8436         (default_speculation_safe_value): Add prototype.
8438 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
8440         * dump-context.h (dump_context::dump_loc): New decl.
8441         * dumpfile.c (dump_context::dump_loc): New member function.
8442         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8443         and dump_gimple_stmt.
8444         (dump_context::dump_gimple_expr_loc): Likewise, using
8445         dump_gimple_expr.
8446         (dump_context::dump_generic_expr_loc): Likewise, using
8447         dump_generic_expr.
8448         (dump_context::dump_printf_loc_va): Likewise, using
8449         dump_printf_va.
8450         (dump_context::begin_scope): Explicitly using the global function
8451         "dump_loc", rather than the member function.
8453 2018-07-31  Martin Sebor  <msebor@redhat.com>
8455         PR tree-optimization/86741
8456         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8458 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
8460         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8461         depend on whether prefetch instructions will be emitted or not.
8462         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8463         will be emitted or not.
8464         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8465         (TARGET_SETMEM_PFD): New macros.
8467 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8469         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8470         (NULL_STMT_VEC_INFO): Delete.
8471         (stmt_vec_info::operator*): Likewise.
8472         (stmt_vec_info::operator gimple *): Likewise.
8473         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8474         of NULL_STMT_VEC_INFO.
8475         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8476         (vect_reassociating_reduction_p): Likewise.
8477         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8478         (vectorizable_store): Likewise.
8479         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8480         (vec_info::free_stmt_vec_infos): Likewise.
8482 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8484         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8485         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8487 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8489         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8490         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8491         (vec_info::free_stmt_vec_info): New private member functions.
8492         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8493         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8494         * tree-parloops.c (gather_scalar_reductions): Remove calls to
8495         set_stmt_vec_info_vec and free_stmt_vec_infos.
8496         * tree-vect-loop.c (_loop_vec_info): Remove call to
8497         set_stmt_vec_info_vec.
8498         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8499         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8500         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8501         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8502         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
8503         assignments in {vec_info::,}new_stmt_vec_info that are redundant
8504         with the clearing in the xcalloc.
8505         (stmt_vec_info_vec): Delete.
8506         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8507         (vectorize_loops): Likewise.
8508         (vec_info::~vec_info): Remove argument from call to
8509         free_stmt_vec_infos.
8510         (vec_info::add_stmt): Remove vinfo argument from call to
8511         new_stmt_vec_info.
8513 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8515         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8516         rather than a gimple stmt.
8517         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
8518         information for pattern statements when passed the original
8519         statement; instead wait to be passed the pattern statement itself.
8520         Don't call set_vinfo_for_stmt here.
8521         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8522         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8523         stmt_vec_infos here.
8524         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8525         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8526         stmt_vec_infos entry.
8528 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8530         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8531         * tree-vectorizer.c (vec_info::replace_stmt): New function.
8532         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8533         * tree-vect-stmts.c (vectorizable_call): Likewise.
8534         (vectorizable_simd_clone_call): Likewise.
8536 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8538         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8539         * tree-vectorizer.c (vec_info::remove_stmt): New function.
8540         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8541         * tree-vect-loop.c (vect_transform_loop): Likewise.
8542         * tree-vect-slp.c (vect_schedule_slp): Likewise.
8543         * tree-vect-stmts.c (vect_remove_stores): Likewise.
8545 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8547         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8548         (vect_dr_stmt): Delete.
8549         * tree-vectorizer.c (vec_info::lookup_dr): New function.
8550         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8551         of DR_VECT_AUX.
8552         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8553         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8554         (vect_verify_datarefs_alignment, vect_peeling_supportable)
8555         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8556         (vect_analyze_data_refs): Likewise.
8557         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
8558         argument.
8559         (vect_find_same_alignment_drs): Likewise.
8560         (vect_slp_analyze_node_dependences): Update calls accordingly.
8561         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
8562         instead of DR_VECT_AUX.
8563         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8564         of a vector data references.  Use vec_info::lookup_dr instead of
8565         DR_VECT_AUX.
8566         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8567         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
8568         instead of DR_VECT_AUX.
8570 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8572         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8573         dr_vec_info.
8574         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8575         accordingly.
8576         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8577         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8578         (vect_gen_prolog_loop_niters): Likewise.
8580 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8582         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8583         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8584         (vect_known_alignment_in_bytes, vect_dr_behavior)
8585         (vect_get_scalar_dr_size): Take references as dr_vec_infos
8586         instead of data_references.  Update calls to other routines for
8587         which the same change has been made.
8588         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8589         dr_vec_infos instead of stmt_vec_infos.
8590         (vect_analyze_data_ref_dependence): Update call accordingly.
8591         (vect_slp_analyze_data_ref_dependence)
8592         (vect_record_base_alignments): Use DR_VECT_AUX.
8593         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8594         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8595         (vector_alignment_reachable_p, vect_get_data_access_cost)
8596         (vect_peeling_supportable, vect_analyze_group_access_1)
8597         (vect_analyze_group_access, vect_analyze_data_ref_access)
8598         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8599         (vect_compile_time_alias, vect_small_gap_p)
8600         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8601         (vect_supportable_dr_alignment): Take references as dr_vec_infos
8602         instead of data_references.  Update calls to other routines for
8603         which the same change has been made.
8604         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8605         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8606         (vect_slp_analyze_and_verify_node_alignment)
8607         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8608         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8609         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
8610         above changes.
8611         (_vect_peel_info::dr): Replace with...
8612         (_vect_peel_info::dr_info): ...this new field.
8613         (vect_peeling_hash_get_most_frequent)
8614         (vect_peeling_hash_choose_best_peeling): Update accordingly.
8615         (vect_peeling_hash_get_lowest_cost):
8616         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
8617         routines for which the same change has been made.
8618         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
8619         data_reference.
8620         * tree-vect-loop-manip.c (get_misalign_in_elems)
8621         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
8622         above changes.
8623         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8624         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8625         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8626         (get_group_load_store_type, get_negative_load_store_type)
8627         (vect_get_data_ptr_increment, vectorizable_store)
8628         (vectorizable_load): Likewise.
8629         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8630         Update calls to other routines for which the same change has been made.
8632 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8634         * tree-vectorizer.h (vec_info::move_dr): New member function.
8635         (dataref_aux): Rename to...
8636         (dr_vec_info): ...this and add "dr" and "stmt" fields.
8637         (_stmt_vec_info::dr_aux): Update accordingly.
8638         (_stmt_vec_info::data_ref_info): Delete.
8639         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8640         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8641         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8642         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8643         of data_ref.
8644         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
8645         (STMT_VINFO_DR_INFO): New macro.
8646         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8647         (set_dr_misalignment): Update after rename of dataref_aux.
8648         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
8649         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8650         initialization of STMT_VINFO_DATA_REF.
8651         * tree-vectorizer.c (vec_info::move_dr): New function.
8652         * tree-vect-patterns.c (vect_recog_bool_pattern)
8653         (vect_recog_mask_conversion_pattern)
8654         (vect_recog_gather_scatter_pattern): Use it.
8655         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8656         the "dr" and "stmt" fields of dr_vec_info instead of
8657         STMT_VINFO_DATA_REF.
8659 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8661         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8662         (is_pattern_stmt_p): Use it.
8663         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8664         on pattern statements.
8666 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8668         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8669         original stmt as a stmt_vec_info rather than a gimple stmt.
8670         (vect_pattern_recog_1): Take the statement directly as a
8671         stmt_vec_info, rather than via a gimple_stmt_iterator.
8672         Update call to vect_mark_pattern_stmts.
8673         (vect_pattern_recog): Update calls accordingly.
8675 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8677         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8678         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8679         a vect_def_type for the first argument.
8680         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8681         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
8682         operand if it isn't defined by a vectorized statement.
8683         (vect_build_gather_load_calls): Remove the mask_dt argument and
8684         update calls to vect_get_vec_def_for_stmt_copy.
8685         (vectorizable_bswap): Likewise the dt argument.
8686         (vectorizable_call): Update calls to vectorizable_bswap and
8687         vect_get_vec_def_for_stmt_copy.
8688         (vectorizable_simd_clone_call, vectorizable_assignment)
8689         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8690         (vectorizable_comparison): Update calls to
8691         vect_get_vec_def_for_stmt_copy.
8692         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
8693         vect_is_simple_use.
8694         (vect_get_loop_based_defs): Remove dt argument and update call
8695         to vect_get_vec_def_for_stmt_copy.
8696         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8697         and vect_get_vec_def_for_stmt_copy.
8698         (vectorizable_load): Update calls to vect_build_gather_load_calls
8699         and vect_get_vec_def_for_stmt_copy.
8700         * tree-vect-loop.c (vect_create_epilog_for_reduction)
8701         (vectorizable_reduction, vectorizable_live_operation): Update calls
8702         to vect_get_vec_def_for_stmt_copy.
8704 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8706         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8707         and gimple stmt arguments with a stmt_vec_info.
8708         (vect_record_base_alignments): Update calls accordingly.
8709         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8710         and gimple stmt arguments with a stmt_vec_info.
8711         (vect_build_slp_tree_1): Remove vinfo argument and update call
8712         to vect_record_max_nunits.
8713         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8714         and vect_record_max_nunits.
8716 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8718         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8719         file and take a stmt_vec_info instead of a gimple stmt.
8720         (supportable_widening_operation, vect_finish_replace_stmt)
8721         (vect_finish_stmt_generation, vect_get_store_rhs)
8722         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8723         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8724         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8725         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8726         (vect_create_data_ref_ptr, bump_vector_ptr)
8727         (vect_permute_store_chain, vect_setup_realignment)
8728         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8729         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8730         (vectorizable_reduction, vectorizable_induction)
8731         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8732         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8733         than gimple stmts as arguments.
8734         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8735         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8736         (can_group_stmts_p, vect_check_gather_scatter)
8737         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8738         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8739         (vect_permute_load_chain, vect_shift_permute_load_chain)
8740         (vect_transform_grouped_load)
8741         (vect_record_grouped_load_vectors): Likewise.
8742         * tree-vect-loop.c (vect_fixup_reduc_chain)
8743         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8744         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8745         (vectorizable_reduction, vectorizable_induction)
8746         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8747         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8748         (vect_get_load_store_mask): Likewise.
8749         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8750         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8751         * tree-vect-stmts.c (vect_mark_relevant)
8752         (is_simple_and_all_uses_invariant)
8753         (exist_non_indexing_operands_for_use_p, process_use)
8754         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8755         (vect_get_vec_def_for_operand, vect_get_vec_defs)
8756         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8757         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8758         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8759         (get_negative_load_store_type, get_load_store_type)
8760         (vect_check_load_store_mask, vect_check_store_rhs)
8761         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8762         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8763         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8764         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8765         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8766         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8767         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8768         (supportable_widening_operation): Likewise.
8770 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8772         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8773         a stmt_vec_info instead of a gcall.
8774         (vect_check_gather_scatter): Update call accordingly.
8775         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8776         of a gphi.
8777         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8778         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8779         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8780         instead of a gimple stmt.
8781         (vect_transform_loop): Update calls accordingly.
8782         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8783         stmt_vec_infos instead of gimple stmts.
8784         (vect_analyze_slp_instance): Update use accordingly.
8785         * tree-vect-stmts.c (read_vector_array, write_vector_array)
8786         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8787         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8788         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8789         (vect_gen_widened_results_half, vect_get_loop_based_defs)
8790         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8791         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8792         down to subroutines.
8794 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8796         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8797         of the worklist from a vector of gimple stmts to a vector of
8798         stmt_vec_infos.
8799         * tree-vect-stmts.c (vect_mark_relevant, process_use)
8800         (vect_mark_stmts_to_be_vectorized): Likewise
8802 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8804         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8805         statement before passing it to vect_analyze_stmt.
8806         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8807         the chain of phi vector definitions.  Track the exit phi via its
8808         stmt_vec_info.
8809         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8810         STMT_VINFO_REDUC_DEF.
8811         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8812         stmt_vec_infos to handle the statement chains.
8813         (vect_get_slp_defs): Record the first statement in the node
8814         using a stmt_vec_info.
8815         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8816         statements here and pass their stmt_vec_info down to subroutines.
8817         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8818         down to vect_finish_stmt_generation.
8819         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8820         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8821         stmt_vec_infos to subroutines.
8822         (vect_remove_stores): Use stmt_vec_infos to handle the statement
8823         chains.
8825 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8827         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8828         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8829         (vect_permute_store_chain, vect_setup_realignment)
8830         (vect_permute_load_chain, vect_shift_permute_load_chain)
8831         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8832         stmts internally, and when passing values to other vectorizer routines.
8833         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8834         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8835         (vect_analyze_loop_operations, get_initial_def_for_reduction)
8836         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8837         (vectorizable_reduction, vectorizable_induction)
8838         (vectorizable_live_operation, vect_transform_loop_stmt)
8839         (vect_transform_loop): Likewise.
8840         * tree-vect-patterns.c (vect_reassociating_reduction_p)
8841         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8842         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8843         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8844         (vect_slp_analyze_node_operations_1): Likewise.
8845         * tree-vect-stmts.c (vect_mark_relevant, process_use)
8846         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8847         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8848         (vect_finish_stmt_generation_1, get_group_load_store_type)
8849         (get_load_store_type, vect_build_gather_load_calls)
8850         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8851         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8852         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8853         (vectorizable_store, vectorizable_load, vectorizable_condition)
8854         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8855         (supportable_widening_operation): Likewise.
8856         (vect_get_vector_types_for_stmt): Likewise.
8857         * tree-vectorizer.h (vect_dr_behavior): Likewise.
8859 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8861         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8862         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8863         (vect_permute_store_chain, vect_permute_load_chain)
8864         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8865         repeated stmt_vec_info lookups.
8866         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8867         (vect_update_ivs_after_vectorizer): Likewise.
8868         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8869         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8870         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8871         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8872         (vect_bb_slp_scalar_cost): Likewise.
8873         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8875 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8877         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8878         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8879         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8880         to get gassigns and gcalls, rather than operating on generc gimple
8881         stmts.
8882         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8883         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8884         (vectorizable_load, vect_analyze_stmt): Likewise.
8885         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8887 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8889         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8890         return stmt_vec_infos rather than gimple stmts.  Do not accept
8891         null arguments.
8892         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8893         of a gimple stmt.
8894         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8895         Update use of get_later_stmt.
8896         (vect_get_constant_vectors): Update call accordingly.
8897         (vect_schedule_slp_instance): Likewise
8898         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8899         (vect_slp_analyze_instance_dependence): Likewise.
8900         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8902 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8904         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8905         (stmt_info_for_cost::stmt_info): ...this new field.
8906         (add_stmt_costs): Update accordingly.
8907         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8908         (vect_get_known_peeling_cost): Likewise.
8909         (vect_estimate_min_profitable_iters): Likewise.
8910         * tree-vect-stmts.c (record_stmt_cost): Likewise.
8912 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8914         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8915         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8916         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8917         accordingly.
8918         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8920 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8922         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8923         a gimple stmt to a stmt_vec_info.
8924         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8926 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8928         * tree-vectorizer.h (vec_info::grouped_stores): Change from
8929         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8930         (_loop_vec_info::reduction_chains): Likewise.
8931         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8932         accordingly.
8933         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8935 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8937         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8938         a gimple stmt to a stmt_vec_info.
8939         (_stmt_vec_info::next_element): Likewise.
8940         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8941         (vect_slp_analyze_and_verify_node_alignment)
8942         (vect_analyze_group_access_1, vect_analyze_group_access)
8943         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8944         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8945         (vect_supportable_dr_alignment): Update accordingly.
8946         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8947         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8948         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8949         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8950         * tree-vect-slp.c (vect_build_slp_tree_1)
8951         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8952         (vect_split_slp_store_group, vect_analyze_slp_instance)
8953         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8954         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8955         (get_group_load_store_type, get_load_store_type)
8956         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8957         (vect_transform_stmt, vect_remove_stores): Likewise.
8959 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8961         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8962         than a gimple stmt.
8963         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8964         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8965         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8966         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8967         (vector_alignment_reachable_p, vect_get_data_access_cost)
8968         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8969         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8970         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8971         (vect_analyze_group_access_1, vect_analyze_group_access)
8972         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8973         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8974         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8975         result of vect_dr_stmt and use the stmt_vec_info instead of
8976         the associated gimple stmt.
8977         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8978         (vect_gen_prolog_loop_niters): Likewise.
8979         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8981 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8983         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8984         to a vec<stmt_vec_info>.
8985         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8986         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8987         vec<stmt_vec_info>.
8988         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8989         to a vec<stmt_vec_info>.
8990         (bst_traits::value_type, bst_traits::value_type): Likewise.
8991         (bst_traits::hash): Update accordingly.
8992         (vect_get_and_check_slp_defs): Change the stmts parameter from
8993         a vec<gimple *> to a vec<stmt_vec_info>.
8994         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8995         (vect_build_slp_tree): Likewise.
8996         (vect_build_slp_tree_2): Likewise.  Update uses of
8997         SLP_TREE_SCALAR_STMTS.
8998         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8999         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
9000         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
9001         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
9002         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
9003         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
9004         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
9005         (vect_get_constant_vectors, vect_get_slp_defs)
9006         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
9007         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
9008         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
9009         instead of gimple stmts.
9010         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
9011         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
9012         (vect_slp_analyze_instance_dependence): Update uses of
9013         SLP_TREE_SCALAR_STMTS.
9014         (vect_slp_analyze_and_verify_node_alignment): Likewise.
9015         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
9016         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
9017         (get_initial_defs_for_reduction): Likewise.
9018         (vect_create_epilog_for_reduction): Likewise.
9019         (vectorize_fold_left_reduction): Likewise.
9020         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
9021         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
9022         (can_vectorize_live_stmts): Likewise.
9024 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9026         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
9027         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9028         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
9029         than gimple stmts.
9030         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
9031         of a gimple stmt.
9032         (gather_scalar_reductions): Update after above interface changes.
9033         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
9034         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
9035         than gimple stmts.
9036         (vect_force_simple_reduction): Likewise.
9037         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
9038         LOOP_VINFO_REDUCTIONS.
9039         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9041 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9043         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
9044         a gimple stmt to a stmt_vec_info.
9045         * tree-vect-loop.c (vect_active_double_reduction_p)
9046         (vect_force_simple_reduction, vectorizable_reduction): Update
9047         accordingly.
9049 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9051         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
9052         vec<gimple *> to a vec<stmt_vec_info>.
9053         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
9054         the reduction_phis argument from a vec<gimple *> to a
9055         vec<stmt_vec_info>.
9056         (vectorizable_reduction): Likewise the phis local variable that
9057         is passed to vect_create_epilog_for_reduction.  Update for new type
9058         of SLP_TREE_VEC_STMTS.
9059         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
9060         (vectorizable_live_operation): Likewise.
9061         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
9062         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
9064 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9066         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
9067         a gimple stmt to a stmt_vec_info.
9068         (vectorizable_condition, vectorizable_live_operation)
9069         (vectorizable_reduction, vectorizable_induction): Pass back the
9070         vectorized statement as a stmt_vec_info.
9071         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
9072         use of STMT_VINFO_VEC_STMT.
9073         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
9074         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
9075         as stmt_vec_infos rather than gimple stmts.
9076         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
9077         to a stmt_vec_info.
9078         (vectorizable_live_operation): Likewise.
9079         (vectorizable_reduction, vectorizable_induction): Likewise,
9080         updating use of STMT_VINFO_VEC_STMT.
9081         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
9082         of STMT_VINFO_VEC_STMT.
9083         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
9084         (vectorizable_simd_clone_call, vectorizable_conversion)
9085         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9086         (vectorizable_store, vectorizable_load, vectorizable_condition)
9087         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
9088         from a gimple stmt to a stmt_vec_info.
9089         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
9090         pointer to a stmt_vec_info to the vectorizable_* routines.
9092 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9094         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
9095         a gimple stmt to a stmt_vec_info.
9096         (is_pattern_stmt_p): Update accordingly.
9097         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
9098         (vect_record_grouped_load_vectors): Likewise.
9099         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
9100         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
9101         (vect_model_reduction_cost): Likewise.
9102         (vect_create_epilog_for_reduction): Likewise.
9103         (vectorizable_reduction, vectorizable_induction): Likewise.
9104         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9105         Return the stmt_vec_info for the pattern statement.
9106         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
9107         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
9108         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9109         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
9110         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
9111         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
9112         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
9113         (free_stmt_vec_info, vect_is_simple_use): Likewise.
9115 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9117         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
9118         (vect_finish_stmt_generation): Likewise.
9119         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9120         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
9121         (vect_build_gather_load_calls): Use the return value of the above
9122         functions instead of a separate call to vinfo_for_stmt.  Use narrow
9123         scopes for the input gimple stmt and wider scopes for the associated
9124         stmt_vec_info.  Use vec_info::lookup_def when setting these
9125         stmt_vec_infos from an SSA_NAME definition.
9126         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9127         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9128         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9129         (vectorizable_store, vectorizable_load, vectorizable_condition)
9130         (vectorizable_comparison): Likewise.
9131         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
9132         (vectorizable_reduction): Likewise.
9134 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9136         * tree-vectorizer.h (vect_is_simple_use): Add an optional
9137         stmt_vec_info * parameter before the optional gimple **.
9138         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9139         (process_use, vect_get_vec_def_for_operand_1): Update callers.
9140         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
9141         * tree-vect-loop.c (vectorizable_reduction): Likewise.
9142         (vectorizable_live_operation): Likewise.
9143         * tree-vect-patterns.c (type_conversion_p): Likewise.
9144         (vect_look_through_possible_promotion): Likewise.
9145         (vect_recog_rotate_pattern): Likewise.
9146         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9148 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9150         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
9151         a typedef to a wrapper class.
9152         (NULL_STMT_VEC_INFO): New macro.
9153         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
9154         (stmt_vec_info::operator*): New function.
9155         (stmt_vec_info::operator gimple *): Likewise.
9156         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
9157         (add_stmt_costs): Likewise.
9158         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
9159         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9160         (vect_get_known_peeling_cost): Likewise.
9161         (vect_estimate_min_profitable_iters): Likewise.
9162         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9163         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
9164         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9165         (vectorizable_store, free_stmt_vec_infos): Likewise.
9166         (new_stmt_vec_info): Change return type of xcalloc to
9167         _stmt_vec_info *.
9169 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9171         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
9172         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
9173         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
9174         a single_imm_use-based sequence.
9175         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
9177 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9179         * tree-vectorizer.h (vec_info::lookup_def): Declare.
9180         * tree-vectorizer.c (vec_info::lookup_def): New function.
9181         * tree-vect-patterns.c (vect_get_internal_def): Use it.
9182         (vect_widened_op_tree): Likewise.
9183         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9184         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
9185         (vectorizable_reduction): Likewise.
9186         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
9187         of a gimple *.
9188         (vect_is_slp_reduction): Update calls accordingly.  Use
9189         vec_info::lookup_def.
9190         (vect_is_simple_reduction): Likewise
9191         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
9193 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9195         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
9196         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
9197         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
9198         of vinfo_for_stmt.
9199         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
9200         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
9201         (vect_update_vf_for_slp, vect_analyze_loop_operations)
9202         (vect_is_slp_reduction, vectorizable_induction)
9203         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
9204         * tree-vect-patterns.c (vect_init_pattern_stmt):
9205         (vect_determine_min_output_precision_1, vect_determine_precisions)
9206         (vect_pattern_recog): Likewise.
9207         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
9208         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
9209         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
9210         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9211         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
9212         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
9213         info field from a loop to a loop_vec_info.
9215 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9217         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
9218         (vec_info::add_stmt): Declare.
9219         * tree-vectorizer.c (vec_info::add_stmt): New function.
9220         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
9221         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
9222         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9223         (vectorizable_induction): Likewise.
9224         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
9225         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9226         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
9227         (vectorizable_load): Likewise.
9228         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9229         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
9230         (vect_recog_gather_scatter_pattern): Likewise.
9231         (append_pattern_def_seq): Likewise.  Remove a check that is
9232         performed by add_stmt itself.
9234 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9236         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
9237         which make_ssa_name was called with new_stmt before new_stmt
9238         had been created.
9240 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9242         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
9243         split out from...
9244         (vect_is_slp_reduction): ...here...
9245         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
9246         that are already known to be false.
9248 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9250         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
9251         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
9252         STMT_VINFO_NUM_SLP_USES when it's true.
9253         (vect_free_slp_instance): Add a final_p parameter and pass it to
9254         vect_free_slp_tree.
9255         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
9256         (vect_analyze_slp_instance): Likewise.
9257         (vect_slp_analyze_operations): Likewise.
9258         (vect_slp_analyze_bb_1): Likewise.
9259         * tree-vectorizer.c (vec_info): Likewise.
9260         * tree-vect-loop.c (vect_transform_loop): Likewise.
9262 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9264         * tree-vect-loop.c (vectorizable_reduction): Assert that the
9265         function is not called for second and subsequent members of
9266         a reduction group.
9268 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9270         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
9271         cases for nested loops from here to ...
9272         (vect_create_epilog_for_reduction): ...here.  Only call
9273         vect_is_simple_use for inner-loop reductions.
9275 2018-07-31  Martin Liska  <mliska@suse.cz>
9277         PR gcov-profile/85338
9278         PR gcov-profile/85350
9279         PR gcov-profile/85372
9280         * profile.c (struct location_triplet): New.
9281         (struct location_triplet_hash): Likewise.
9282         (output_location): Do not output a BB that
9283         is already recorded for a line.
9284         (branch_prob): Use streamed_locations.
9286 2018-07-31  Martin Liska  <mliska@suse.cz>
9288         PR gcov-profile/85370
9289         * coverage.c (coverage_begin_function): Do not mark target
9290         clones as artificial functions.
9292 2018-07-31  Martin Liska  <mliska@suse.cz>
9294         PR gcov-profile/83813
9295         PR gcov-profile/84758
9296         PR gcov-profile/85217
9297         PR gcov-profile/85332
9298         * profile.c (branch_prob): Do not record GOTO expressions
9299         for GIMPLE statements which locations are already streamed.
9301 2018-07-31  Olivier Hainque  <hainque@adacore.com>
9303         * gcc.c (handle_spec_function): Accept a soft_matched_part
9304         argument, as do_spec_1.  Pass it down to ...
9305         (eval_spec_function): Accept a soft_matched_part argument,
9306         and pass it down to ...
9307         (do_spec_2): Accept a soft_matched_part argument, and pass
9308         it down to do_spec_1.
9309         (do_spec_1): Pass soft_matched_part to handle_spec_function.
9310         (handle_braces): Update call to handle_spec_function.
9311         (driver::set_up_specs): Update calls to do_spec_2.
9312         (compare_debug_dump_opt_spec_function): Likewise.
9313         (compare_debug_self_opt_spec_function): Likewise.
9315 2018-07-31  Olivier Hainque  <hainque@adacore.com>
9317         * common.opt (nolibc): New option.
9318         * doc/invoke.texi (Link Options): Document it.
9319         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9320         * config/alpha/linux.h: Likewise.
9321         * config/arc/elf.h: Likewise.
9322         * config/arm/uclinux-elf.h: Likewise.
9323         * config/arm/unknown-elf.h: Likewise.
9324         * config/avr/avrlibc.h: Likewise.
9325         * config/bfin/bfin.h: Likewise.
9326         * config/bfin/linux.h: Likewise.
9327         * config/bfin/uclinux.h: Likewise.
9328         * config/darwin.h: Likewise.
9329         * config/darwin10.h: Likewise.
9330         * config/darwin12.h: Likewise.
9331         * config/gnu-user.h: Likewise.
9332         * config/lm32/uclinux-elf.h: Likewise.
9333         * config/pa/pa-hpux11.h: Likewise.
9334         * config/pa/pa64-hpux.h: Likewise.
9335         * config/sparc/sparc.h: Likewise.
9337 2018-07-31  Olivier Hainque  <hainque@adacore.com>
9339         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9340         undefined variables.
9342 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
9344         PR target/86640
9345         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9346         instead of GEN_INT.
9348 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9350         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9351         terminated string literal.
9353 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
9355         PR rtl-optimization/85160
9356         * combine.c (is_just_move): New function.
9357         (try_combine): Allow combining two instructions into two if neither of
9358         the original instructions was a move.
9360 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
9362         PR target/86673
9363         * doc/extend.texi (Global Register Variables): Discourage use of type
9364         qualifiers.
9365         (Local Register Variables): Likewise.
9367 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
9369         PR tree-optimization/86506
9370         * hwint.h (ceil_log2): Resync with hwint.c implementation.
9372 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
9374         PR target/86547
9375         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9376         hard_regno, make sure no insn between `from` and `to` clobbers it.
9378 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
9379             Tom de Vries  <tdevries@suse.de>
9381         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9382         (PTX_DEFAULT_RUNTIME_DIM): ... this.
9383         (nvptx_goacc_validate_dims): Set default worker and gang dims to
9384         PTX_DEFAULT_RUNTIME_DIM.
9385         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9387 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
9389         * config/pa/pa.c (pa_output_addr_vec): Align address table.
9390         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9391         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9393 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
9395         * config/rs6000/constraints.md (wG constraint): Delete, no longer
9396         used.
9397         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9398         predicate to reflect toc fusion has been deleted.
9399         (toc_fusion_mem_raw): Delete, no longer used.
9400         (toc_fusion_mem_wrapped): Likewise.
9401         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9402         fusion mask bit.
9403         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9404         Delete, no longer used.
9405         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9406         meant to be used for toc fusion.
9407         (rs6000_debug_print_mode): Delete toc fusion debugging.
9408         (rs6000_debug_reg_global): Likewise.
9409         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9410         fusion and secondary reload support that were never used.
9411         (rs6000_option_override_internal): Delete TOC fusion, that was only
9412         partially defined, and it did not work unless you also used the
9413         -mcmodel= switch.
9414         (rs6000_legitimate_address_p): Delete TOC fusion support.
9415         (rs6000_opt_masks): Likewise.
9416         (fusion_wrap_memory_address): Delete function, no longer used.
9417         (fusion_split_address); Delete TOC fusion support.
9418         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9419         longer used with toc fusion being deleted.
9420         (TARGET_TOC_FUSION_FP): Likewise.
9421         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9422         UNSPEC.
9423         (toc fusion spliter): Delete TOC fusion support.
9424         (toc_fusionload_<mode>): Likewise.
9425         (toc_fusionload_di): Likewise.
9426         (fusion_gpr_load_<mode>): Delete generator function, this insn no
9427         longer needs to be named.  Rename predicate to delete TOC fusion.
9428         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9429         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9430         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9431         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9432         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9434 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9436         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9437         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
9438         __int128 in built-in function prototypes.
9439         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9440         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9442 2018-07-27  Martin Sebor  <msebor@redhat.com>
9444         PR tree-optimization/86696
9445         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9446         types, including enums.
9447         (handle_char_store): Be prepared for the above function to fail.
9449 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
9451         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9452         when optimization level is lower than 2 or optimize for size.
9454 2018-07-26  Martin Sebor  <msebor@redhat.com>
9456         PR tree-optimization/86043
9457         PR tree-optimization/86042
9458         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9459         (get_string_cst_length): Rename...
9460         (get_min_string_length): ...to this.  Add argument.
9461         (handle_char_store): Extend to handle multi-character stores by
9462         MEM_REF.
9463         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
9464         * tree.h (initializer_zerop): Add argument.
9466 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
9468         PR middle-end/86660
9469         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9470         declare target to variables if they have always,{to,from,tofrom} map
9471         kinds.
9473 2018-07-26  Martin Liska  <mliska@suse.cz>
9475         PR lto/86548
9476         * lto-wrapper.c: Add linker_output as prefix
9477         for ltrans_output_file.
9479 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
9481         PR rtl-optimization/85805
9482         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9483         value for hard registers if that was written in the same mode.
9485 2018-07-26  Martin Liska  <mliska@suse.cz>
9487         PR gcov-profile/86536
9488         * gcov.c (format_gcov): Use printf format %.*f directly
9489         and do not handle special values.
9491 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
9493         * common/config/arc/arc-common.c (arc_option_optimization_table):
9494         Update default optimizations for size.
9496 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
9498         * config/arc/arc.md (movsf_insn): Add short instruction selection.
9499         * config/arc/constraints.md (CfZ): New constraint.
9500         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9501         (subsf3_fpu): Likewise.
9502         (cmpsf_fpu): Likewise.
9503         (cmpsf_fpu_uneq): Likewise.
9505 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
9507         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9508         accesses as well.
9509         (arc_is_uncached_mem_p): uncached applies to both the variable and
9510         the pointer.
9512 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
9514         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9515         register names.
9517 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
9519         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9520         field "m_scopes" from vec to auto_vec.
9522 2018-07-25  Martin Liska  <mliska@suse.cz>
9524         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9525         return type.
9527 2018-07-25  Richard Biener  <rguenther@suse.de>
9529         PR debug/86654
9530         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9531         special wrt context_die late.
9532         (gen_subprogram_die): Re-use DIEs in local scope.
9534 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
9536         PR tree-optimization/86644
9537         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
9539 2018-07-25  Martin Liska  <mliska@suse.cz>
9541         PR middle-end/86645
9542         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9543         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9545 2018-07-25  Martin Liska  <mliska@suse.cz>
9547         PR sanitizer/79635
9548         * params.def: Explain ASan abbreviation and provide
9549         a documentation link.
9551 2018-07-24  Martin Sebor  <msebor@redhat.com>
9553         PR tree-optimization/86622
9554         PR tree-optimization/86532
9555         * builtins.h (string_length): Declare.
9556         * builtins.c (c_strlen): Correct handling of non-constant offsets.
9557         (check_access): Be prepared for non-constant length ranges.
9558         (string_length): Make extern.
9559         * expr.c (string_constant): Only handle the minor non-constant
9560         array index.  Use string_constant to compute the length of
9561         a generic string constant.
9563 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
9565         PR tree-optimization/86618
9566         * tree-vect-stmts.c (vectorizable_call): Don't take the address
9567         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9569 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
9571         PR tree-optimization/86636
9572         * json.cc (json::object::set): Fix comment.  Add assertions.
9573         (json::array::append): Move here from json.h.  Add comment and an
9574         assertion.
9575         (json::string::string): Likewise.
9576         * json.h (json::array::append): Move to json.cc.
9577         (json::string::string): Likewise.
9578         * optinfo-emit-json.cc
9579         (optrecord_json_writer::impl_location_to_json): Assert that we
9580         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9581         wrapper around it.  Expand the location once, rather than three
9582         times.
9583         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9584         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9585         wrappers.
9586         (optrecord_json_writer::optinfo_to_json): Likewise, in four
9587         places.  Fix some overlong lines.
9589 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
9591         * config/aarch64/aarch64-simd.md
9592         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9593         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9594         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9595         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9596         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9597         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9598         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9599         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9600         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9602 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
9604         PR middle-end/86627
9605         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9606         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
9607         and abs_d == d, do the power of two handling if profitable.
9609 2018-07-24  Richard Biener  <rguenther@suse.de>
9611         * match.pd: Add BIT_FIELD_REF canonicalizations.
9613 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9615         PR c/86617
9616         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9618 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9620         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9621         terminated STRING_CST object.
9623 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9625         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9627 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
9629         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9630         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9631         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9632         the elements into a register.
9633         (rs6000_split_v4si_init_di_reg): Delete.
9634         (rs6000_split_v4si_init): Delete.
9635         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9636         (vsx_init_v4si): Rewrite as a define_expand.
9638 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
9640         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9641         zero_extend argument from memory): New.
9643 2018-07-22  Martin Sebor  <msebor@redhat.com>
9645         PR bootstrap/86621
9646         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9647         diagnosing calls with unknown arguments unless -Walloca-larger-than
9648         is restricted to less than PTRDIFF_MAX bytes.
9650 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
9652         * doc/gcov.texi (Invoking Gcov): Editorial changes.
9654 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
9656         * pretty-print.c (text_info::set_location): Remove redundant
9657         "line_table" parameter from call to rich_location::set_range.
9659 2018-07-20  Martin Sebor  <msebor@redhat.com>
9661         PR middle-end/82063
9662         * builtins.c (expand_builtin_alloca): Adjust.
9663         * calls.c (alloc_max_size): Simplify.
9664         * cgraphunit.c (cgraph_node::expand): Adjust.
9665         * common.opt (larger_than_size, warn_frame_larger_than): Remove
9666         variables.
9667         (frame_larger_than_size): Same.
9668         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9669         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9670         Initialize.
9671         * doc/invoke.texi (GCC Command Options): Document option arguments.
9672         Explain byte-size arguments and suffixes.
9673         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9674         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9675         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9676         * doc/options.texi (UInteger): Expand.
9677         (Host_Wide_Int, ByteSize): Document new properties.
9678         * final.c (final_start_function_1): Include sizes in an error message.
9679         * function.c (frame_offset_overflow): Same.
9680         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9681         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9682         Diagnose unbounded alloca calls only for limits of less than
9683         PTRDIFF_MAX.
9684         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
9685         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
9686         for alloca(0).
9687         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
9688         only for limits of less than PTRDIFF_MAX.
9689         * langhooks-def.h (lhd_handle_option): Change function argument
9690         to HOST_WIDE_INT.
9691         * langhooks.c (lhd_handle_option): Same.
9692         * langhooks.h (handle_option): Same.
9693         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9694         ByteSize flags.
9695         (var_type, var_type_struct): Same.
9696         (var_set): Handle ByteSize flag.
9697         * optc-gen.awk: Add comments to output to ease debugging.  Make
9698         use of HOST_WIDE_INT where appropriate.
9699         * opts-gen-save.awk:  Use %lx to format unsigned long.
9700         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9701         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9702         arguments.  Parse bytes-size suffixes.
9703         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9704         (enum_value_to_arg): Same.
9705         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
9706         (handle_option): Adjust.
9707         (generate_option): Change function argument to HOST_WIDE_INT.
9708         (cmdline_handle_error): Adjust.
9709         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9710         (set_option): Change function argument to HOST_WIDE_INT.
9711         (option_enabled): Handle cl_host_wide_int.
9712         (get_option_state): Handle CLVC_SIZE.
9713         (control_warning_option): Same.
9714         * opts.c (common_handle_option): Change function argument to
9715         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
9716         OPT_Wvla_larger_than_.
9717         * opts.h (enum cl_var_type): Add an enumerator.
9718         * stor-layout.c (layout_decl): Print a more meaningful warning.
9719         * toplev.c (output_stack_usage): Adjust.
9721 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
9723         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9724         call to inline_expand_builtin_string_cmp.
9725         (expand_builtin_strcmp): Likewise.
9726         (expand_builtin_strncmp): Likewise.
9727         (inline_string_cmp): Delete the last parameter, change char_type_node
9728         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9729         two operands.
9730         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9731         the inlining expansion on target where the type of the call has same or
9732         narrower precision than unsigned char.
9734 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
9736         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9737         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9738         * common.opt (fsave-optimization-record): New option.
9739         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9740         * doc/invoke.texi (-fsave-optimization-record): New option.
9741         * dumpfile.c: Include "optinfo-emit-json.h".
9742         (struct kv_pair): Move to coretypes.h.
9743         (optgroup_options): Make non-static.
9744         (dump_context::end_scope): Call
9745         optimization_records_maybe_pop_dump_scope.
9746         * dumpfile.h (optgroup_options): New decl.
9747         * json.cc: New file.
9748         * json.h: New file.
9749         * optinfo-emit-json.cc: New file.
9750         * optinfo-emit-json.h: New file.
9751         * optinfo.cc: Include "optinfo-emit-json.h".
9752         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9753         (optinfo_enabled_p): Check optimization_records_enabled_p.
9754         (optinfo_wants_inlining_info_p): Likewise.
9755         * optinfo.h: Update comment.
9756         * profile-count.c (profile_quality_as_string): New function.
9757         * profile-count.h (profile_quality_as_string): New decl.
9758         (profile_count::quality): New accessor.
9759         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9760         and optinfo_emit_json_cc_tests.
9761         * selftest.h (selftest::json_cc_tests): New decl.
9762         (selftest::optinfo_emit_json_cc_tests): New decl.
9763         * toplev.c: Include "optinfo-emit-json.h".
9764         (compile_file): Call optimization_records_finish.
9765         (do_compile): Call optimization_records_start.
9766         * tree-ssa-live.c: Include optinfo.h.
9767         (remove_unused_scope_block_p): Retain inlining information if
9768         optinfo_wants_inlining_info_p returns true.
9770 2018-07-20  Richard Biener  <rguenther@suse.de>
9772         PR debug/86585
9773         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9774         to cover -flto-partition=none.
9776 2018-07-20  Martin Liska  <mliska@suse.cz>
9778         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9779         (get_decl_source_range): Remove unused function.
9781 2018-07-20  Richard Biener  <rguenther@suse.de>
9783         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9784         (struct vn_phi_s): Likewise.
9785         (struct vn_reference_s): Likewise.
9786         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9787         for searching the slot of an entry known to be in the hash itself.
9788         (vn_phi_hasher::equal): Likewise.
9789         (vn_reference_hasher::equal): Likewise.
9790         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9791         globals.
9792         (optimistic_info, current_info): Remove, keeping only valid_info.
9793         (vn_reference_lookup_1): Remove fallback lookup.
9794         (vn_reference_lookup_2): Likewise.
9795         (vn_nary_op_lookup_1): Likewise.
9796         (vn_phi_lookup): Likewise.
9797         (vn_nary_build_or_lookup_1): Make sure to not chain the built
9798         hash element.
9799         (vn_reference_insert): Adjust, chain the inserted hash element
9800         at last_inserted_ref.
9801         (vn_reference_insert_pieces): Likewise.
9802         (visit_reference_op_call): Likewise.
9803         (vn_nary_op_insert_into): Chain the inserted hash element at
9804         last_inserted_nary.
9805         (vn_nary_op_insert_pieces): Adjust.
9806         (vn_nary_op_insert): Likewise.
9807         (vn_nary_op_insert_stmt): Likewise.
9808         (vn_phi_insert): Adjust, chain the inserted hash element at
9809         last_inserted_phi.
9810         (process_scc): Remove clearing and copying the optimistic
9811         table.  Instead remove elements inserted during an optimistic
9812         iteration from the single table we maintain.
9813         (init_scc_vn): Adjust.
9814         (free_scc_vn): Likewise.
9815         (sccvn_dom_walker::record_cond): Likewise.
9816         (sccvn_dom_walker::after_dom_children): Likewise.
9818 2018-07-19  Martin Sebor  <msebor@redhat.com>
9820         PR tree-optimization/84047
9821         PR tree-optimization/83776
9822         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9823         (check_array_bounds): Call it.
9825 2018-07-19  Martin Sebor  <msebor@redhat.com>
9827         * align.h (align_flags): Use member initialization.
9829 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
9831         * Makefile.in (OBJS): Add optinfo.o.
9832         * coretypes.h (class symtab_node): New forward decl.
9833         (struct cgraph_node): New forward decl.
9834         (class varpool_node): New forward decl.
9835         * dump-context.h: New file.
9836         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9837         "tree-pass.h".
9838         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9839         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9840         (set_alt_dump_file): Likewise.
9841         (dump_context::~dump_context): New dtor.
9842         (dump_gimple_stmt): Move implementation to...
9843         (dump_context::dump_gimple_stmt): ...this new member function.
9844         Add the stmt to any pending optinfo, creating one if need be.
9845         (dump_gimple_stmt_loc): Move implementation to...
9846         (dump_context::dump_gimple_stmt_loc): ...this new member function.
9847         Start a new optinfo and add the stmt to it.
9848         (dump_gimple_expr): Move implementation to...
9849         (dump_context::dump_gimple_expr): ...this new member function.
9850         Add the stmt to any pending optinfo, creating one if need be.
9851         (dump_gimple_expr_loc): Move implementation to...
9852         (dump_context::dump_gimple_expr_loc): ...this new member function.
9853         Start a new optinfo and add the stmt to it.
9854         (dump_generic_expr): Move implementation to...
9855         (dump_context::dump_generic_expr): ...this new member function.
9856         Add the tree to any pending optinfo, creating one if need be.
9857         (dump_generic_expr_loc): Move implementation to...
9858         (dump_context::dump_generic_expr_loc): ...this new member
9859         function.  Add the tree to any pending optinfo, creating one if
9860         need be.
9861         (dump_printf): Move implementation to...
9862         (dump_context::dump_printf_va): ...this new member function.  Add
9863         the text to any pending optinfo, creating one if need be.
9864         (dump_printf_loc): Move implementation to...
9865         (dump_context::dump_printf_loc_va): ...this new member function.
9866         Start a new optinfo and add the stmt to it.
9867         (dump_dec): Move implementation to...
9868         (dump_context::dump_dec): ...this new member function.  Add the
9869         value to any pending optinfo, creating one if need be.
9870         (dump_context::dump_symtab_node): New member function.
9871         (dump_context::get_scope_depth): New member function.
9872         (dump_context::begin_scope): New member function.
9873         (dump_context::end_scope): New member function.
9874         (dump_context::ensure_pending_optinfo): New member function.
9875         (dump_context::begin_next_optinfo): New member function.
9876         (dump_context::end_any_optinfo): New member function.
9877         (dump_context::s_current): New global.
9878         (dump_context::s_default): New global.
9879         (dump_scope_depth): Delete global.
9880         (dumpfile_ensure_any_optinfo_are_flushed): New function.
9881         (dump_symtab_node): New function.
9882         (get_dump_scope_depth): Reimplement in terms of dump_context.
9883         (dump_begin_scope): Likewise.
9884         (dump_end_scope): Likewise.
9885         (selftest::temp_dump_context::temp_dump_context): New ctor.
9886         (selftest::temp_dump_context::~temp_dump_context): New dtor.
9887         (selftest::verify_item): New function.
9888         (ASSERT_IS_TEXT): New macro.
9889         (ASSERT_IS_TREE): New macro.
9890         (ASSERT_IS_GIMPLE): New macro.
9891         (selftest::test_capture_of_dump_calls): New test.
9892         (selftest::dumpfile_c_tests): Call it.
9893         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9894         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9895         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9896         descriptive comment.
9897         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9898         (dump_node, dump_bb): Move these unrelated decls.
9899         (class dump_manager): Add leading comment.
9900         * optinfo.cc: New file.
9901         * optinfo.h: New file.
9903 2018-07-19  Michael Collison  <michael.collison@arm.com>
9904             Richard Henderson <rth@redhat.com>
9906         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9907         (subti): Handle op1 zero.
9908         (subvti4, usub4ti4): New.
9909         (*sub<GPI>3_compare1_imm): New.
9910         (sub<GPI>3_carryinCV): New.
9911         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9912         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9914 2018-07-19  Michael Collison  <michael.collison@arm.com>
9915             Richard Henderson <rth@redhat.com>
9917         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9918         (addti3): Create simpler code if low part is already known to be 0.
9919         (addvti4, uaddvti4): New.
9920         (*add<GPI>3_compareC_cconly_imm): New.
9921         (*add<GPI>3_compareC_cconly): New.
9922         (*add<GPI>3_compareC_imm): New.
9923         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9924         handle constants within this pattern..
9925         (*add<GPI>3_compareV_cconly_imm): New.
9926         (*add<GPI>3_compareV_cconly): New.
9927         (*add<GPI>3_compareV_imm): New.
9928         (add<GPI>3_compareV): New.
9929         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9930         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9931         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9932         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9933         with 'comparison' operator.
9934         (*add<GPI>3_compareV_cconly_imm): Ditto.
9935         (*add<GPI>3_compareV_cconly): Ditto.
9936         (*add<GPI>3_compareV_imm): Ditto.
9937         (add<GPI>3_compareV): Ditto.
9938         (add<mode>3_carryinC): Ditto.
9939         (*add<mode>3_carryinC_zero): Ditto.
9940         (*add<mode>3_carryinC): Ditto.
9941         (add<mode>3_carryinV): Ditto.
9942         (*add<mode>3_carryinV_zero): Ditto.
9943         (*add<mode>3_carryinV): Ditto.
9945 2018-07-19  Michael Collison  <michael.collison@arm.com>
9946             Richard Henderson <rth@redhat.com>
9948         * config/aarch64/aarch64-modes.def (CC_V): New.
9949         * config/aarch64/aarch64-protos.h
9950         (aarch64_addti_scratch_regs): Declare
9951         (aarch64_subvti_scratch_regs): Declare.
9952         (aarch64_expand_subvti): Declare.
9953         (aarch64_gen_unlikely_cbranch): Declare
9954         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9955         for signed overflow using CC_Vmode.
9956         (aarch64_get_condition_code_1): Handle CC_Vmode.
9957         (aarch64_gen_unlikely_cbranch): New function.
9958         (aarch64_addti_scratch_regs): New function.
9959         (aarch64_subvti_scratch_regs): New function.
9960         (aarch64_expand_subvti): New function.
9962 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9964         * config/aarch64/aarch64-option-extensions.def: New entry for profile
9965         extension.
9966         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9967         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9968         extension.
9970 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9972         PR target/83009
9973         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9974         address check not strict.
9976 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9978         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9979         Umq with Umn.
9980         (store_pair_lanes<mode>): Likewise.
9981         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9982         enum value 'ADDR_QUERY_LDP_STP_N'.
9983         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9984         (aarch64_print_address_internal): Add declaration.
9985         (aarch64_print_ldpstp_address): Remove.
9986         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9987         (aarch64_print_operand): Change printing of 'y'.
9988         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9989         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9990         'true' rather than '1'.
9991         * config/aarch64/constraints.md (Uml): Likewise.
9992         (Uml): Rename to Umn.
9993         (Umq): Remove.
9995 2018-07-19  Richard Biener  <rguenther@suse.de>
9997         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9998         a trailing array.
9999         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
10000         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
10001         (vn_reference_hasher): Likewise.
10002         (struct vn_tables_s): Remove obstack and alloc-pool members.
10003         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
10004         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
10005         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
10006         (vn_reference_insert_pieces): Likewise.
10007         (alloc_vn_nary_op_noinit): Adjust.
10008         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
10009         (vn_phi_eq): Adjust.
10010         (shared_lookup_phiargs): Remove.
10011         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
10012         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
10013         (visit_reference_op_call): Likewise.
10014         (copy_nary, copy_phi, copy_reference): Remove.
10015         (process_scc): Rewind the obstack when iterating.  Do not
10016         copy the elements to valid_info but just move them from one
10017         hashtable to the other.
10018         (allocate_vn_table): Adjust.
10019         (free_vn_table): Likewise.
10020         (init_scc_vn): Likewise.
10021         (free_scc_vn): Likewise.
10023 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
10025         PR target/86560
10026         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
10027         indirect_return as function type attribute.
10028         (ix86_attribute_table): Change indirect_return to function
10029         type attribute.
10030         * doc/extend.texi: Update indirect_return attribute.
10032 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
10034         * wide-int.h (widest2_int): New.
10035         * gimple-fold.c (arith_overflowed_p): Use it.
10036         * tree.h (widest2_int_cst): New.
10037         * tree-vrp.c (wide_int_binop_overflow): Rename from
10038         vrp_int_const_binop.
10039         Rewrite to work on trees.
10040         (extract_range_from_multiplicative_op_1): Abstract code to...
10041         (wide_int_range_min_max): ...here.
10042         (wide_int_range_cross_product): ...and here.
10043         (extract_range_from_binary_expr_1): Abstract overflow code to...
10044         (wide_int_range_mult_wrapping): ...here.
10045         * tree-vrp.h (wide_int_range_cross_product): New.
10046         (wide_int_range_mult_wrapping): New.
10048 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
10049             Julia Koval  <julia.koval@intel.com>
10051         * config/i386/x86-tune-costs.h (skylake_memcpy,
10052         skylake_memset): Replace rep_prefix with unrolling for size 512.
10054 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
10056         PR middle-end/86544
10057         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
10058         comparision with EQ_EXPR in last stmt.
10060 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10062         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
10063         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
10064         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
10065         previously known as "PowerPC AltiVec Built-in Functions".  Move
10066         some material to new subsubsections "PowerPC AltiVec Built-in
10067         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
10068         ISA 2.07".
10069         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
10070         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
10071         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
10072         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
10074 2018-07-18  Richard Biener  <rguenther@suse.de>
10076         PR tree-optimization/86557
10077         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
10078         EXACT_DIV_EXPR.
10080 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
10082         * config/s390/s390.c (s390_function_profiler): Generate CFI.
10084 2018-07-17  Jeff Law  <law@redhat.com>
10086         * config/arm/arm.c (get_label_padding): Update for recent
10087         changes to label_to_alignment.
10089         PR tree-optimization/86010
10090         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
10092         * config/mips/mips.c (vr4130_align_insns): Update for recent
10093         changes to label_to_alignment.
10095         * config/frv/frv.c (frv_label_align): Update for recent changes
10096         to label_to_alignment.
10098         * config/nios2/nios2.c (nios2_label_align): Update for recent
10099         changes which dropped ALIGN_LABELS_LOG.
10101 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
10103         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
10104         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
10106 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
10108         * config/arc/arc.c (arc_label_align): Use align_labels instead of
10109         deprecated align_labels_log.
10111 2018-07-17  Richard Biener  <rguenther@suse.de>
10113         PR lto/86456
10114         * dwarf2out.c (init_sections_and_labels): Always generate
10115         a debug_line_str_section for early LTO debug.
10116         (dwarf2out_finish): Reset debug_line_str_hash output early.
10117         Bump counter for extra dwarf5 .debug_loc labels to not conflict
10118         with fat LTO part.
10119         (dwarf2out_early_finish): Output debug_line_str.
10121 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
10123         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
10124         index register on z196 or later.
10126 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
10128         * config/s390/s390.c (s390_default_align): Set default function
10129         alignment to 16.
10130         (s390_override_options_after_change): Call s390_default align.
10131         (s390_option_override_internal): Call s390_default_align.
10132         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
10134 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
10136         PR middle-end/86542
10137         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
10138         to _looptemp_ clauses, other than the first two.
10140 2018-07-17  Martin Liska  <mliska@suse.cz>
10142         * opts.c: Do not enable OPT_falign_* for -Os.
10144 2018-07-17  Martin Liska  <mliska@suse.cz>
10146         * align.h (MAX_CODE_ALIGN): New.
10147         (MAX_CODE_ALIGN_VALUE): New.
10148         * common/config/i386/i386-common.c (ix86_handle_option):
10149         (MAX_CODE_ALIGN): Moved to align.h.
10150         * final.c (MAX_CODE_ALIGN): Likewise.
10151         * opts.c (parse_and_check_align_values):
10152         (MAX_CODE_ALIGN): Likewise.
10153         (MAX_CODE_ALIGN_VALUE): Likewise.
10155 2018-07-17  Martin Liska  <mliska@suse.cz>
10157         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
10158         in order to fulfil coding style.
10159         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
10160         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10161         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10162         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
10163         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
10164         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
10165         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
10166         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
10167         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10169 2018-07-17  Martin Liska  <mliska@suse.cz>
10171         * align.h: New file.
10172         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
10173         directly.
10174         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
10175         align_flags of label_to_alignment.
10176         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
10177         align_flags class.
10178         * config/m68k/m68k.c: Do not use removed align_labels_value and
10179         align_loops_value.
10180         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
10181         (LOOP_ALIGN): Likewise.
10182         (LABEL_ALIGN): Likewise.
10183         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10184         Remove not used macro.
10185         (rs6000_loop_align): Change return type to align_flags.
10186         (rs6000_loop_align_max_skip): Remove.
10187         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
10188         Change return type to align_flags.
10189         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10190         Remove not used macro.
10191         (rs6000_loop_align):  Change return type to align_flags.
10192         (rs6000_loop_align_max_skip): Remove.
10193         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
10194         * config/rx/rx-protos.h (rx_align_for_label): Make it
10195         static function.
10196         * config/rx/rx.c (rx_align_for_label): Change return type
10197         to align_flags.
10198         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
10199         macro definitions.
10200         into align_flags class.
10201         (LABEL_ALIGN): Likewise.
10202         (LOOP_ALIGN): Likewise.
10203         * config/s390/s390.c (s390_label_align): Use align_flags
10204         class member.
10205         (s390_asm_output_function_label): Likewise.
10206         * config/sh/sh.c (sh_override_options_after_change):
10207         Use align_flags class directly without macros.
10208         (find_barrier): Likewise.
10209         (barrier_align): Likewise.
10210         (sh_loop_align): Likewise.
10211         * config/spu/spu.c (spu_option_override):
10212         Use align_flags_tuple::get_value instead of removed macros.
10213         (spu_sched_init): Likewise.
10214         * config/spu/spu.h (GTY): Likewise.
10215         * config/visium/visium.c (visium_option_override):
10216         Set "8" as default secondary alignment.
10217         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
10218         in order to guarantee secondary alignment of 8.
10219         * coretypes.h: Include align.h header file.
10220         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
10221         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
10222         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
10223         * doc/tm.texi.in: Likewise.
10224         * final.c (struct label_alignment): Remove not used structure.
10225         (LABEL_ALIGN): Change type to align_flags.
10226         (LOOP_ALIGN): Likewise.
10227         (JUMP_ALIGN): Likewise.
10228         (default_loop_align_max_skip): Remove.
10229         (default_label_align_max_skip): Likewise.
10230         (default_jump_align_max_skip): Likewise.
10231         (default_label_align_after_barrier_max_skip):
10232         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
10233         (LABEL_TO_MAX_SKIP): Remove.
10234         (label_to_alignment): Return align_flags type instead of integer.
10235         (label_to_max_skip): Remove.
10236         (align_fuzz): Use align_flags type.
10237         (compute_alignments): Use align_flags type and use align_flags::max
10238         to combine multiple alignments.
10239         (grow_label_align): Grow vec instead of C array.
10240         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
10241         (shorten_branches):  Use align_flags type and use align_flags::max
10242         to combine multiple alignments.
10243         (final_scan_insn_1): Remove usage of secondary alignment that comes
10244         from label alignment, but instead use proper secondary alignment
10245         which is computed in grow_label_align.
10246         * flags.h (struct align_flags_tuple): Move to align.h.
10247         (struct align_flags): Likewise.
10248         (state_align_loops): Rename to align_loops.
10249         (state_align_jumps): Rename to align_jumps.
10250         (state_align_labels): Rename to align_labels.
10251         (state_align_functions): Rename to align_functions.
10252         (align_loops_log): Remove.
10253         (align_jumps_log): Remove.
10254         (align_labels_log): Remove.
10255         (align_functions_log): Remove.
10256         (align_loops_max_skip): Remove.
10257         (align_jumps_max_skip): Remove.
10258         (align_labels_max_skip): Remove.
10259         (align_functions_max_skip): Remove.
10260         (align_loops_value): Remove.
10261         (align_jumps_value): Remove.
10262         (align_labels_value): Remove.
10263         (align_functions_value): Remove.
10264         * output.h (label_to_alignment): Change return type to align_flags.
10265         (label_to_max_skip): Remove.
10266         * target.def: Remove loop_align_max_skip, label_align_max_skip,
10267         jump_align_max_skip macros.
10268         * targhooks.h (default_loop_align_max_skip): Remove.
10269         (default_label_align_max_skip): Likewise.
10270         (default_jump_align_max_skip): Likewise.
10271         (default_label_align_after_barrier_max_skip): Remove.
10272         * toplev.c (read_log_maxskip): Use ::normalize function.
10273         (parse_N_M): Remove not used argument and also call ::normalize.
10274         (parse_alignment_opts): Do not pass unused arguments.
10275         * varasm.c (assemble_start_function): Use directly align_functions
10276         instead of removed macros.
10277         * system.h: Do not poison removed macros.
10279 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
10281         PR middle-end/86539
10282         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10283         and cond temporaries don't have reference type if iterator has
10284         pointer type.  For init use &for_pre_body instead of pre_p if
10285         for_pre_body is non-empty.
10287 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
10289         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10290         double-double modes to SFmode directly directly.
10291         (trunc<mode>sf2_fprs): Delete.
10293 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
10295         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10296         for conversions between IFmode and the decimal floating point modes.
10297         (init_float128_ieee): Use the correct names for conversions between
10298         KFmode and the decimal floating point modes.
10300 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
10302         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10303         for the conversions between TDmode and IFmode.
10304         (init_float128_ieee): Use more correct names for the conversions
10305         between TDmode and KFmode.
10307 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
10309         PR tree-optimization/86526
10310         * builtins.c (expand_builtin_memcmp): Formatting fixes.
10311         (inline_expand_builtin_string_cmp): Likewise.
10312         (inline_string_cmp): Likewise.  Use c_readstr instead of
10313         builtin_memcpy_read_str.  Add unit_mode temporary.
10315 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10317         PR middle-end/86528
10318         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10319         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10321 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10323         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10324         Alphabetize prototypes of built-in functions, separating out
10325         built-in functions that are listed in this section but should be
10326         described elsewhere.
10328 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
10330         PR target/86511
10331         * expmed.c (emit_store_flag): Do not emit setcc followed by a
10332         conditional move when trapping comparison was split to a
10333         non-trapping one (and vice versa).
10335 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
10337         * config/s390/s390.c (s390_function_profiler): Generate nops
10338         instead of profiler call sequences.
10339         * config/s390/s390.opt: Add the new option.
10341 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
10343         * config/s390/s390.c (s390_function_profiler): Generate
10344         __mcount_loc section.
10345         * config/s390/s390.opt: Add the new option.
10347 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
10349         * common.opt: Add the new warning.
10350         * config/s390/s390.c (s390_function_profiler): Emit "brasl
10351         %r0,__fentry__" when -mfentry is specified.
10352         (s390_option_override_internal): Disallow -mfentry for 31-bit
10353         CPUs.
10354         * config/s390/s390.opt: Add the new option.
10356 2018-07-16  Richard Biener  <rguenther@suse.de>
10358         PR lto/86523
10359         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10360         for function-local FUNCTION_DECL and RESULT_DECL immediately.
10362 2018-07-16  Martin Liska  <mliska@suse.cz>
10364         PR ipa/86529
10365         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10366         to ::get_create.
10368 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
10370         * config/arc/arcHS.md: Update ARCHS scheduling rules.
10372 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
10374         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10375         for ARCHS4x.
10376         * config/arc/arc-cpus.def (hs4x): New cpu.
10377         (hs4xd): Likewise.
10378         * config/arc/arc-tables.opt: Regenerate.
10379         * config/arc/arc.c (arc_sched_issue_rate): New function.
10380         (TARGET_SCHED_ISSUE_RATE): Define.
10381         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10382         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10383         fpu_cvt.
10384         (attr tune): Add ARCHS4x tune values.
10385         (attr tune_dspmpy): Define.
10386         (*tst): Correct instruction type.
10387         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10388         * config/arc/arcHS4x.md: New file.
10389         * config/arc/fpu.md: Update instruction type attributes.
10390         * config/arc/t-multilib: Regenerate.
10392 2018-07-16  Tom de Vries  <tdevries@suse.de>
10394         PR debug/86455
10395         * var-tracking.c (vt_initialize): Fix pre_dec handling.
10397 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10399         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10400         early clobber.
10402 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
10404         PR tree-optimization/86514
10405         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10406         conversion to a boolean type from a type with greater precision.
10408 2018-07-16  Tom de Vries  <tdevries@suse.de>
10410         * var-tracking.c (vt_initialize): Print adjusted insn slim if
10411         dump_flags request TDF_SLIM.
10413 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
10415         * fold-const.c (int_const_binop_1): Abstract...
10416         (wide_int_binop): ...wide int code here.
10417         (poly_int_binop): ...poly int code here.
10418         Abstract the rest of int_const_binop_1 into int_const_binop.
10419         * fold-const.h (wide_int_binop): New.
10420         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10421         Remove useless PLUS/MINUS_EXPR case.
10422         (zero_nonzero_bits_from_vr): Move wide int code...
10423         (zero_nonzero_bits_from_bounds): ...here.
10424         (extract_range_from_binary_expr_1): Move mask optimization code...
10425         (range_easy_mask_min_max): ...here.
10426         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10427         (range_easy_mask_min_max): New.
10429 2018-07-15  Jeff Law  <law@redhat.com>
10431         PR target/85993
10432         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10433         block.
10435 2018-07-14  Jim Wilson  <jimw@sifive.com>
10437         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10439 2018-07-14  Paul Koning  <ni1d@arrl.net>
10441         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10443 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
10445         * lto-streamer-out.c (copy_function_or_variable): Dump info about
10446         copying section.
10448 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
10449             Steve Munroe  <munroesj52@gmail.com>
10451         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10452         (_mm_andnot_si128): Likewise.
10453         (_mm_or_si128): Likewise.
10454         (_mm_xor_si128): Likewise.
10456 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
10458         PR middle-end/78809
10459         * builtins.c (expand_builtin_memcmp): Inline the calls first
10460         when result_eq is false.
10461         (expand_builtin_strcmp): Inline the calls first.
10462         (expand_builtin_strncmp): Likewise.
10463         (inline_string_cmp): New routine. Expand a string compare
10464         call by using a sequence of char comparison.
10465         (inline_expand_builtin_string_cmp): New routine. Inline expansion
10466         a call to str(n)cmp/memcmp.
10467         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10468         New option.
10469         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10471 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
10473         * config/arm/driver-arm.c: Include arm-native.h.
10474         (host_detect_local_cpu): Use auto-generated data tables.
10475         (vendors, arm_cpu_table): Delete.  Move part information to ...
10476         * config/arm/arm-cpus.in: ... here.
10477         * config/arm/parsecpu.awk (gen_native): New function.
10478         (vendor, part): New CPU fields.
10479         (END): Add support for building the native CPU detection tables.
10480         * config/arm/t-arm (arm-native.h): Add build rule.
10481         (driver-arm.o): Add dependency on arm-native.h.
10483 2018-07-13  Richard Biener  <rguenther@suse.de>
10485         PR middle-end/85974
10486         * match.pd (addr1 - addr2): Allow either of the operand to
10487         have a conversion.
10489 2018-07-13  Tom de Vries  <tdevries@suse.de>
10491         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10492         in remap_ssa_name.
10494 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
10496         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10497         arrays instead of numbered variables.
10499 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
10501         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10502         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10504 2018-07-13  Richard Biener  <rguenther@suse.de>
10506         PR debug/86452
10507         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10508         instead of get_context_die.
10510 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
10511             Richard Biener  <rguenther@suse.de>
10513         PR middle-end/86489
10514         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10515         that the loop latch destination where phi is defined.
10517 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
10519         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10520         (riscv_expand_epilogue): Add assertion to check interrupt mode.
10521         (riscv_set_current_function): Extract getting interrupt type to new
10522         function.
10523         (riscv_get_interrupt_type): New function.
10524         (riscv_merge_decl_attributes): New function, checking interrupt type is
10525         same.
10526         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10528 2018-07-12  Paul Koning  <ni1d@arrl.net>
10530         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10531         directive.
10533 2018-07-12  Paul Koning  <ni1d@arrl.net>
10535         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10536         zero reference, add doloop_end instead.
10537         * doc/md.texi (decrement_and_branch_until_zero): Remove.
10538         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
10539         detail for doloop_end.
10541 2018-07-12  Martin Sebor  <msebor@redhat.com>
10543         PR c/86453
10544         * attribs.c (decl_attributes): Reject conflicting attributes before
10545         calling attribute handlers.
10547 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
10549         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10550          parameter.
10551         (gcc::dump_manager::get_dump_file_name): likewise.
10552         (dump_begin): Likewise.
10553         * dumpfile.h (dump_begin): Update prototype.
10554         (gcc::dump_manager::get_dump_file_name,
10555         gcc::dump_manager::get_dump_file_name): Update prototype.
10557 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10559         * internal-fn.h (vectorizable_internal_fn_p): New function.
10560         * tree-vect-slp.c (compatible_calls_p): Likewise.
10561         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
10562         to internal functions.
10563         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10565 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10567         * fold-const.h (inverse_conditions_p): Declare.
10568         * fold-const.c (inverse_conditions_p): New function.
10569         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
10570         that test the inverse condition of a conditional internal function.
10571         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10572         * internal-fn.c (internal_fn_mask_index): Handle conditional
10573         internal functions.
10574         (vectorized_internal_fn_supported_p): New function.
10575         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10576         (any_pred_load_store): Replace with...
10577         (need_to_predicate): ...this new variable.
10578         (redundant_ssa_names): New variable.
10579         (ifcvt_can_use_mask_load_store): Move initial checks to...
10580         (ifcvt_can_predicate): ...this new function.  Handle tree codes
10581         for which a conditional internal function exists.
10582         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10583         instead of ifcvt_can_use_mask_load_store.  Update after variable
10584         name change.
10585         (predicate_load_or_store): New function, split out from
10586         predicate_mem_writes.
10587         (check_redundant_cond_expr): New function.
10588         (value_available_p): Likewise.
10589         (predicate_rhs_code): Likewise.
10590         (predicate_mem_writes): Rename to...
10591         (predicate_statements): ...this.  Use predicate_load_or_store
10592         and predicate_rhs_code.
10593         (combine_blocks, tree_if_conversion): Update after above name changes.
10594         (ifcvt_local_dce): Handle redundant_ssa_names.
10595         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10596         general conditional functions.
10597         * tree-vect-stmts.c (vectorizable_call): Likewise.
10599 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10600             Alan Hayward  <alan.hayward@arm.com>
10601             David Sherwood  <david.sherwood@arm.com>
10603         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10604         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10605         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10606         plus and minus and convert them into IFN_COND_FMA-based sequences.
10607         (convert_mult_to_fma): Handle conditional plus and minus.
10609 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10611         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10612         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10613         (cond_fnms_optab): New optabs.
10614         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10615         internal functions.
10616         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10617         * internal-fn.h (get_conditional_internal_fn): Declare.
10618         (get_unconditional_internal_fn): Likewise.
10619         * internal-fn.c (cond_ternary_direct): New macro.
10620         (expand_cond_ternary_optab_fn): Likewise.
10621         (direct_cond_ternary_optab_supported_p): Likewise.
10622         (FOR_EACH_COND_FN_PAIR): Likewise.
10623         (get_conditional_internal_fn): New function.
10624         (get_unconditional_internal_fn): Likewise.
10625         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10626         (gimple_match_op::gimple_match_op): Add a new overload for 5
10627         operands.
10628         (gimple_match_op::set_op): Likewise.
10629         (gimple_resimplify5): Declare.
10630         * genmatch.c (decision_tree::gen): Generate simplifications for
10631         5 operands.
10632         * gimple-match-head.c (gimple_simplify): Define an overload for
10633         5 operands.  Handle calls with 5 arguments in the top-level overload.
10634         (convert_conditional_op): Handle conversions from unconditional
10635         internal functions to conditional ones.
10636         (gimple_resimplify5): New function.
10637         (build_call_internal): Pass a fifth operand.
10638         (maybe_push_res_to_seq): Likewise.
10639         (try_conditional_simplification): Try converting conditional
10640         internal functions to unconditional internal functions.
10641         Handle 3-operand unconditional forms.
10642         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10643         Define ternary equivalents of the current rules for binary conditional
10644         internal functions.
10645         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10646         ternary operations.
10647         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10648         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10649         (optab): Handle them.
10650         (SVE_COND_FP_TERNARY): New int iterator.
10651         (sve_fmla_op, sve_fmad_op): New int attributes.
10652         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10653         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10654         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10656 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10658         * target.def (preferred_else_value): New target hook.
10659         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10660         * doc/tm.texi: Regenerate.
10661         * targhooks.h (default_preferred_else_value): Declare.
10662         * targhooks.c (default_preferred_else_value): New function.
10663         * internal-fn.h (conditional_internal_fn_code): Declare.
10664         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10665         (get_conditional_internal_fn): Use it.
10666         (conditional_internal_fn_code): New function.
10667         * gimple-match.h (gimple_match_cond): New struct.
10668         (gimple_match_op): Add a cond member function.
10669         (gimple_match_op::gimple_match_op): Update all forms to take a
10670         gimple_match_cond.
10671         * genmatch.c (expr::gen_transform): Use the same condition as res_op
10672         for the suboperation, but don't specify a particular else_value.
10673         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10674         (visit_nary_op, visit_reference_op_load): Pass
10675         gimple_match_cond::UNCOND to the gimple_match_op constructor.
10676         * gimple-match-head.c: Include tree-eh.h
10677         (convert_conditional_op): New function.
10678         (maybe_resimplify_conditional_op): Likewise.
10679         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10680         (gimple_resimplify2): Likewise.
10681         (gimple_resimplify3): Likewise.
10682         (gimple_resimplify4): Likewise.
10683         (maybe_push_res_to_seq): Return null for conditional operations.
10684         (try_conditional_simplification): New function.
10685         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
10686         constructor.
10687         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10688         IFN_COND_* call.
10689         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10690         function.
10691         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10693 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
10695         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10696         DECL_FCONTEXT
10697         (hash_tree): Do not hash DECL_FCONTEXT
10698         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10699         Do not stream DECL_FCONTEXT.
10700         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10701         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10703 2018-07-12  Richard Biener  <rguenther@suse.de>
10705         PR debug/86462
10706         * dwarf2out.c (gen_block_die): Only output blocks when they have
10707         at least one !DECL_IGNORED_P variable.
10709 2018-07-12  Richard Biener  <rguenther@suse.de>
10711         PR target/84829
10712         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10713         Remove -mieee-fp handling.
10715 2018-07-12  Richard Biener  <rguenther@suse.de>
10717         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10718         left-over from last patch.
10720 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
10722         PR tree-optimization/86492
10723         * gimple-ssa-store-merging.c
10724         (imm_store_chain_info::coalesce_immediate_stores): Call
10725         check_no_overlap even for the merge_overlapping case.  Formatting fix.
10727 2018-07-12  Richard Biener  <rguenther@suse.de>
10729         PR middle-end/86479
10730         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10731         move possibly trapping operations into the conditional.
10733 2018-07-12  Richard Biener  <rguenther@suse.de>
10735         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10736         (vn_lookup_simplify_result): Remove recursion limit applied
10737         here.
10738         (vn_nary_build_or_lookup_1): Adjust.
10739         (try_to_simplify): Likewise.
10740         * gimple-match-head.c (gimple_resimplify1): Instead apply one
10741         here.
10742         (gimple_resimplify2): Likewise.
10743         (gimple_resimplify3): Likewise.
10744         (gimple_resimplify4): Likewise.
10746 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
10748         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10749         Use __mmask64 type instead of __mmask8 for __M argument.
10750         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10751         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10752         __U argument.
10753         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10754         __mmask16 for __M argument.
10755         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10756         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10757         to __mmask16 instead of __mmask8.
10758         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10759         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10760         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10761         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10762         instead of __mmask16 for __U argument.
10763         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10764         __mmask16 instead of __mmask8 for __U argument.
10765         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10766         __U argument.
10767         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10768         __mmask16.
10769         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10770         argument.
10771         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10772         __U argument.
10773         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10774         __mmask16.
10775         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10776         of __mmask16.
10777         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10778         __U argument.
10779         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10780         __U argument.
10781         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10782         __U argument.
10783         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10784         __U argument.
10785         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10786         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10787         return type as well as __M argument type and all casts from __mmask8
10788         to __mmask32.
10789         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10790         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10791         return type as well as __M argument type and all casts from __mmask8
10792         to __mmask16.
10793         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10794         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10795         return type as well as __M argument type and all casts from __mmask8
10796         to __mmask32.
10797         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10798         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10799         return type as well as __M argument type and all casts from __mmask8
10800         to __mmask16.
10801         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10802         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10803         __mmask16.
10805 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
10807         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10808         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10809         for __U argument.
10811 2018-07-11  Paul Koning  <ni1d@arrl.net>
10813         * doc/md.texi (define_subst): Document how multiple occurrences of
10814         the same argument in the replacement pattern are handled.
10816 2018-07-11  Paul Koning  <ni1d@arrl.net>
10818         * doc/extend.texi (Common Variable Attributes): Move "mode" into
10819         alphabetical order.
10820         (Common Type Attributes): Add "mode" attribute.
10822 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
10824         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10825         stream DECL_ORIGINAL_TYPE.
10826         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10827         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10828         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10829         Do not walk original type.
10830         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10831         external decls.
10832         (write_ts_decl_non_common_tree_pointers): Do not stream
10833         DECL_ORIGINAL_TYPE
10834         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10835         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10837 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
10839         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10840         thread twice from the same starting edge.
10842 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
10844         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10845         * gimple.c (gimple_call_nonnull_result_p): ...here...
10846         (gimple_call_nonnull_arg): ...and here.
10847         * gimple.h (gimple_call_nonnull_result_p): New.
10848         (gimple_call_nonnull_arg): New.
10850 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
10852         * config/arm/arm-cpus.in: Move information from fpu field of each
10853         cpu definition to the isa field.
10854         * config/arm/parsecpu.awk (fpu): Delete match rule.
10855         (gen_comm_data): Don't add bits from the CPU's FPU entry.
10857 2018-07-11  Richard Biener  <rguenther@suse.de>
10859         PR debug/86457
10860         * dwarf2out.c (init_sections_and_labels): Use
10861         output_asm_line_debug_info consistently.
10862         (dwarf2out_early_finish): Likewise.
10863         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10864         type units.
10866 2018-07-11  Richard Biener  <rguenther@suse.de>
10868         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10869         Rework father_bb setting in a way to avoid propagating constants
10870         multiple times on a loop body.
10872 2018-07-10  Mark Wielaard  <mark@klomp.org>
10874         PR debug/86459
10875         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10877 2018-07-10  Richard Biener  <rguenther@suse.de>
10879         * hash-map.h (hash_map::iterator::operator*): Return
10880         references to key and value.
10882 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
10884         PR c++/86443
10885         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10886         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10887         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10888         (gimplify_omp_for): For composite loops, move outer
10889         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10890         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
10891         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
10892         TREE_LIST for both the original class iterator and the "last" helper
10893         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
10894         loop, remember has_decl_expr from outer composite loops for the
10895         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10897 2018-07-09  Martin Sebor  <msebor@redhat.com>
10899         PR middle-end/77357
10900         PR middle-end/86428
10901         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10902         accessing implicitly initialized array elements.
10903         * expr.c (string_constant): Handle string initializers of
10904         character arrays within aggregates.
10905         * gimple-fold.c (fold_array_ctor_reference): Add argument.
10906         Store element offset.  As a special case, handle zero size.
10907         (fold_nonarray_ctor_reference): Same.
10908         (fold_ctor_reference): Add argument.  Store subobject offset.
10909         * gimple-fold.h (fold_ctor_reference): Add argument.
10911 2018-07-09  Paul Koning  <ni1d@arrl.net>
10913         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10914         (pdp11_insn_cost): New function.
10915         (pdp11_md_asm_adjust): New function.
10916         (TARGET_INVALID_WITHIN_DOLOOP): Define.
10917         (pdp11_rtx_costs): Update to match machine better.
10918         (output_addr_const_pdp11): Correct format mismatch warnings.
10919         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10920         * config/pdp11/pdp11.md: General change to add base_cost and/or
10921         length attributes for use by new pdp11_insn_cost function.
10922         (MIN_BRANCH): Correct definition.
10923         (MIN_SOB): Ditto.
10924         (doloop_end): Use standard pattern name for looping pattern.
10925         (doloop_end_nocc): New.
10926         (movsf): Add another constraint alternative.
10927         (zero_extendqihi2): Add constraint alternatives for not in place
10928         extend.
10929         (zero_extendhisi2): Remove.
10930         (shift patterns): Add CC handling variants.
10931         (bswaphi2): New.
10932         (bswapsi2): New.
10933         (rothi3): New.
10934         (define_peephole2): New peephole to recognize mov that sets CC for
10935         subsequent test.
10937 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10939         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10940         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10941         wi::add.
10943 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
10945         PR c/86420
10946         * real.c (real_nextafter): Return true if result is denormal.
10948 2018-07-09  Martin Liska  <mliska@suse.cz>
10950         * common.opt: Add back wrongly removed attribute.
10952 2018-07-09  Richard Biener  <rguenther@suse.de>
10954         PR debug/86413
10955         * dwarf2out.c (gen_block_die): For an early generated DIE
10956         always output high/low PC attributes.
10958 2018-07-09  Tom de Vries  <tdevries@suse.de>
10960         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10961         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10962         onto VAR_DECL with abstract origin.
10964 2018-07-07  Jim Wilson  <jimw@sifive.com>
10966         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10968 2018-07-07  Tom de Vries  <tdevries@suse.de>
10970         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10972 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
10974         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10975         overflow_type.
10976         (combine_bound): Use wide-int overflow calculation instead of
10977         rolling our own.
10978         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10979         overflow_type.
10980         * fold-const.c (int_const_binop_2): Same.
10981         (extract_muldiv_1): Same.
10982         (fold_div_compare): Same.
10983         (fold_abs_const): Same.
10984         * match.pd: Same.
10985         * poly-int.h (add): Same.
10986         (sub): Same.
10987         (neg): Same.
10988         (mul): Same.
10989         * predict.c (predict_iv_comparison): Same.
10990         * profile-count.c (slow_safe_scale_64bit): Same.
10991         * simplify-rtx.c (simplify_const_binary_operation): Same.
10992         * tree-chrec.c (tree_fold_binomial): Same.
10993         * tree-data-ref.c (split_constant_offset_1): Same.
10994         * tree-if-conv.c (idx_within_array_bound): Same.
10995         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10996         * tree-ssa-phiopt.c (minmax_replacement): Same.
10997         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10998         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10999         * vr-values.c (vr_values::adjust_range_with_scev): Same.
11000         * wide-int.cc (wi::add_large): Same.
11001         (wi::mul_internal): Same.
11002         (wi::sub_large): Same.
11003         (wi::divmod_internal): Same.
11004         * wide-int.h: Change overflow type to overflow_type for neg, add,
11005         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
11006         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
11007         mul_internal, divmod_internal.
11008         (overflow_type): New enum.
11009         (accumulate_overflow): New.
11011 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
11013         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
11014         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
11016 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
11018         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
11019         argument is checked for zero before entering loop, avoid checking again.
11021 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
11023         * gimplify.h (generic_expr_could_trap_p): Set as global function.
11024         * gimplify.h (generic_expr_could_trap_p): Likwise.
11025         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
11027 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
11029         PR tree-optimization/86401
11030         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
11031         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
11032         (fold_bit_and_mask): ... here.  New helper function for match.pd.
11033         * fold-const.h (fold_bit_and_mask): Declare.
11034         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
11036 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
11038         PR target/86324
11039         * target.def (translate_mode_attribute): New hook.
11040         * targhooks.h (default_translate_mode_attribute): Declare.
11041         * targhooks.c (default_translate_mode_attribute): New function.
11042         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
11043         * doc/tm.texi: Regenerate.
11044         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
11045         (rs6000_translate_mode_attribute): New function.
11047 2018-07-06  Paul Koning  <ni1d@arrl.net>
11049         * doc/md.texi (define_split): Document DONE and FAIL.
11050         (define_peephole2): Ditto.
11052 2018-07-05  Jeff Law  <law@redhat.com>
11054         PR tree-optimization/86010
11055         * tree-ssa-dse.c (compute_trims): More aggressively trim at
11056         both the head and tail of mem* and str* calls.
11058 2018-07-05  Jim Wilson  <jimw@sifive.com>
11060         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
11062 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
11064         * config/aarch64/aarch64-simd.md: correct flags text for
11065         MIN_EXPR replacement.
11067 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
11069         * configure: Regenerated.
11071 2018-07-05  Carl Love  <cel@us.ibm.com>
11073         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
11074         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
11075         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
11076         VSX_BUILTIN_DOUBLEL_V4SF.
11078 2018-07-05  Martin Sebor  <msebor@redhat.com>
11080         PR c++/86400
11081         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
11082         than its domain to compute its the upper bound of a char array.
11084 2018-07-05  Nathan Sidwell  <nathan@acm.org>
11086         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
11087         * doc/cpp.texi: Update comment.
11088         * doc/tm.texi: Rebuilt.
11089         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
11090         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
11091         * doc/extend.texi (Backwards Compatibility): Clarify it is system
11092         headers affected by extern "C".
11093         * system.h: Poison NO_IMPLICIT_EXTERN_C.
11094         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
11095         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
11096         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
11097         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
11098         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
11099         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
11100         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
11101         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
11102         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
11103         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
11104         config/sparc/sp64-elf.h, config/spu/spu.h,
11105         config/stormy16/stormy16.h, config/v850/v850.h,
11106         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
11107         define NO_IMPLICIT_EXTERN_C.
11108         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
11110 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
11112         PR target/84711
11113         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11114         instead of GET_MODE_SIZE when comparing Units.
11116 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
11118         PR target/84711
11119         * rtlanal.c (set_noop_p): Constrain on mode change,
11120         include hard-reg-set.h
11122 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
11124         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
11126 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
11128         Revert
11129         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
11131         PR sanitizer/84250
11132         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11133         libasan.
11134         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11136 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
11138         PR sanitizer/84250
11139         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11140         libasan.
11141         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11143 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
11145         PR middle-end/86380
11146         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
11148 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
11150         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
11151         neg_*_op* variables.
11153 2018-07-04  Martin Liska  <mliska@suse.cz>
11155         * tree-switch-conversion.c: Define
11156         max_ratio_for_speed and max_ratio_for_size constants.
11158 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
11159             Martin Liska  <mliska@suse.cz>
11161         PR middle-end/66240
11162         PR target/45996
11163         PR c/84100
11164         * common.opt: Rename align options with 'str_' prefix.
11165         * common/config/i386/i386-common.c (set_malign_value): New
11166         function.
11167         (ix86_handle_option): Use it to set -falign-* options/
11168         * config/aarch64/aarch64-protos.h (struct tune_params): Change
11169         type from int to string.
11170         * config/aarch64/aarch64.c: Update default values from int
11171         to string.
11172         * config/alpha/alpha.c (alpha_override_options_after_change):
11173         Likewise.
11174         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
11175         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11176         max skip conditionally.
11177         * config/i386/freebsd.h (SUBALIGN_LOG): New.
11178         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11179         max skip conditionally.
11180         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11181         max skip conditionally.
11182         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
11183         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11184         max skip conditionally.
11185         * config/i386/i386.c (struct ptt): Change type from int to
11186         string.
11187         (ix86_default_align): Set default values.
11188         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
11189         max skip conditionally.
11190         * config/i386/iamcu.h (SUBALIGN_LOG): New.
11191         (ASM_OUTPUT_MAX_SKIP_ALIGN):
11192         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
11193         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11194         max skip conditionally.
11195         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
11196         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
11197         * config/i386/x86-64.h (SUBALIGN_LOG): New.
11198         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11199         max skip conditionally.
11200         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11201         * config/ia64/ia64.c (ia64_option_override): Set default values
11202         for alignment options.
11203         * config/m68k/m68k.c: Handle new str_align_* options.
11204         * config/mips/mips.c (mips_set_compression_mode): Change
11205         type of constants.
11206         (mips_option_override): Set default values for options.
11207         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
11208         Likewise.
11209         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11210         Likewise.
11211         * config/rx/rx.c (rx_option_override): Likewise.
11212         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
11213         (LABEL_ALIGN): Use align_labels_log.
11214         (LOOP_ALIGN): Use align_loops_align.
11215         * config/s390/s390.c (s390_asm_output_function_label): Use new
11216         macros.
11217         * config/sh/sh.c (sh_override_options_after_change):
11218         Change type of constants.
11219         * config/spu/spu.c (spu_sched_init): Likewise.
11220         * config/sparc/sparc.c (sparc_option_override): Set default
11221         values for options.
11222         * config/visium/visium.c (visium_option_override): Likewise.
11223         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
11224         emit p2align format with last argument if it's not needed.
11225         * doc/invoke.texi: Document extended format of -falign-*.
11226         * final.c: Use align_labels alignment.
11227         * flags.h (struct target_flag_state): Change type to use
11228         align_flags.
11229         (struct align_flags_tuple): New.
11230         (struct align_flags): Likewise.
11231         (align_loops_log): Redefine macro to use new types.
11232         (align_loops_max_skip): Redefine macro to use new types.
11233         (align_jumps_log): Redefine macro to use new types.
11234         (align_jumps_max_skip): Redefine macro to use new types.
11235         (align_labels_log): Redefine macro to use new types.
11236         (align_labels_max_skip): Redefine macro to use new types.
11237         (align_functions_log): Redefine macro to use new types.
11238         (align_loops): Redefine macro to use new types.
11239         (align_jumps): Redefine macro to use new types.
11240         (align_labels): Redefine macro to use new types.
11241         (align_functions): Redefine macro to use new types.
11242         (align_functions_max_skip): Redefine macro to use new types.
11243         (align_loops_value): New macro.
11244         (align_jumps_value): New macro.
11245         (align_labels_value): New macro.
11246         (align_functions_value): New macro.
11247         * function.c (invoke_set_current_function_hook): Propagate
11248         alignment values from flags to global variables default in
11249         topleev.h.
11250         * ipa-icf.c (sem_function::equals_wpa): Use
11251         cl_optimization_option_eq instead of memcmp.
11252         * lto-streamer.h (cl_optimization_stream_out): Support streaming
11253         of string types.
11254         (cl_optimization_stream_in): Likewise.
11255         * optc-save-gen.awk: Support strings in cl_optimization.
11256         * opth-gen.awk: Likewise.
11257         * opts.c (finish_options): Remove error checking of invalid
11258         value ranges.
11259         (MAX_CODE_ALIGN): Remove.
11260         (MAX_CODE_ALIGN_VALUE): Likewise.
11261         (parse_and_check_align_values): New function.
11262         (check_alignment_argument): Likewise.
11263         (common_handle_option): Use check_alignment_argument.
11264         * opts.h (parse_and_check_align_values): Declare.
11265         * toplev.c (init_alignments): Remove.
11266         (read_log_maxskip): New.
11267         (parse_N_M): Likewise.
11268         (parse_alignment_opts): Likewise.
11269         (backend_init_target): Remove usage of init_alignments.
11270         * toplev.h (parse_alignment_opts): Declare.
11271         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
11272         argument.
11273         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
11274         * tree.c (cl_option_hasher::equal): New.
11275         * varasm.c: Use new global macros.
11277 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
11279         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
11280         Use a simpler align directive also if MAXSKIP = ALIGN-1.
11281         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11282         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11283         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11284         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11285         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11286         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11287         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11288         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11289         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11290         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11291         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11293 2018-07-04  Martin Liska  <mliska@suse.cz>
11294             Jonathan Wakely  <jwakely@redhat.com>
11296         * coverage.c: Use correct type.
11297         * doc/invoke.texi: Language correction.
11299 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
11301         PR target/85620
11302         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11303         ENDBRANCH for non-tail call which may return via indirect branch.
11304         * doc/extend.texi: Document indirect_return attribute.
11306 2018-07-03  Martin Sebor  <msebor@redhat.com>
11308         PR tree-optimization/86274
11309         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11310         precondition.
11311         (format_floating): Correct handling of infinities and NaNs.
11313 2018-07-03  Martin Sebor  <msebor@redhat.com>
11315         * print-tree.c (print_real_cst): New function.
11316         (print_node_brief): Call it.
11317         (print_node): Ditto.
11319 2018-07-03  Jeff Law  <law@redhat.com>
11321         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11322         into a single pattern.
11324         * config/h8300/h8300.md (ors code_iterator): New.
11325         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11326         a single pattern and single splitter.
11327         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11328         (iorqi3_1, xorqi3_1): Likewise.
11329         (iorqi3, xorqi3 expanders): Similarly.
11331         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11332         (movmd_internal) into a single pattern using the P mode iterator.
11333         (movmd splitters): Similarly.
11334         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11335         (movsd splitters): Similarly.
11337         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11338         ADDB, ADDW and ADDL into a single ADD attribute which selects the
11339         right table based on the size of the operand.
11340         * config/h8300/h8300.md (length_table): Corresponding changes. All
11341         references to "addb", "addw" and "addl" changed to "add".
11342         (btst patterns): Merge two variants into a single pattern.
11343         (tstqi, tsthi): Likewise.
11344         (addhi3_incdec, addsi3_incdec): Likewise.
11345         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11346         (mulhi3, mulsi3): Likewise.
11347         (udivhi3, udivsi3): Likewise.
11348         (divhi3, divsi3): Likewise.
11349         (andorqi3, andorhi3, andorsi3): Likewise.
11351 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
11353         PR target/85694
11354         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11355         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11357 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11359         PR tree-optimization/85694
11360         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11361         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11362         UNSPEC_URHADD.
11363         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11364         (<u>avg<mode>3_ceil): New patterns.
11366 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
11368         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11369         scan-tree-dump directive.
11370         * gcc.dg/vect/slp-perm-2.c: Likewise.
11371         * gcc.dg/vect/slp-perm-3.c: Likewise.
11372         * gcc.dg/vect/slp-perm-5.c: Likewise.
11373         * gcc.dg/vect/slp-perm-6.c: Likewise.
11374         * gcc.dg/vect/slp-perm-7.c: Likewise.
11375         * gcc.dg/vect/slp-perm-8.c: Likewise.
11377 2018-07-03  Marek Polacek  <polacek@redhat.com>
11379         PR middle-end/86202
11380         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11382 2018-07-03  Richard Biener  <rguenther@suse.de>
11384         PR ipa/86389
11385         * tree-ssa-structalias.c (find_func_clobbers): Properly
11386         handle indirect calls.
11388 2018-07-03  Jeff Law  <law@redhat.com>
11390         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11391         (shifts): New code iterator.
11392         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11393         expander.  Fix HImode handling on H8/SX.
11394         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11395         (subqi3, subhi3, subsi3 expanders): Likewise.
11396         (andqi3, andhi3, andsi3 expanders): Likewise.
11397         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11398         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11399         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11400         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11401         (zero_extendqihi2, zero_extendqisi2): Likewise.
11402         (extendqihi2, extendqisi2): Likewise.
11403         (rotlqi3, rotlhi3, rotlsi3): Likewise.
11404         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11405         (rotlqi3_1, rotlhi3_1): Likewise.
11406         (logicalhi3_sn, logicalsi3_sn): Likewise.
11407         (logicalhi3, logicalsi3): Likewise.
11409 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11411         * tree-vect-patterns.c (vect_recog_rotate_pattern)
11412         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11413         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11414         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11415         type to append_pattern_def_seq instead of creating a stmt_vec_info
11416         directly.
11417         (build_mask_conversion): Likewise.  Remove vinfo argument.
11418         (vect_add_conversion_to_patterm): Likewise, renaming to...
11419         (vect_add_conversion_to_pattern): ...this.
11420         (vect_recog_mask_conversion_pattern): Update call to
11421         build_mask_conversion.  Pass the vector type to
11422         append_pattern_def_seq here too.
11423         (vect_recog_gather_scatter_pattern): Update call to
11424         vect_add_conversion_to_pattern.
11426 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11428         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11429         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11430         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11431         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11432         STMT_VINFO_PATTERN_DEF_SEQ to null here.
11433         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11434         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11435         append_pattern_def_seq instead of new_pattern_def_seq.
11436         (vect_recog_divmod_pattern): Do both of the above.
11437         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11438         is null.
11440 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11442         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11443         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11444         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11445         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11446         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11447         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11448         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11449         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11450         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11451         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11452         parameter with a single stmt_vec_info.
11453         (vect_recog_func_ptr): Likewise.
11454         (vect_recog_gather_scatter_pattern): Likewise, folding in...
11455         (vect_try_gather_scatter_pattern): ...this.
11456         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11457         the stmt_vec_info of the statement to be matched.  Don't clear
11458         STMT_VINFO_RELATED_STMT.
11459         (vect_pattern_recog): Update call accordingly.
11461 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11463         PR tree-optimization/85694
11464         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11465         (uavgM3_ceil): Document new optabs.
11466         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11467         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11468         functions.
11469         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11470         (savg_ceil_optab): New optabs.
11471         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11472         (vect_vect_recog_func_ptrs): Add it.
11473         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11474         constant directly from the associated lhs.
11476 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11478         * tree-vect-patterns.c (vect_split_statement): New function.
11479         (vect_convert_input): Use it to try to split an existing cast.
11481 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11483         * poly-int.h (print_hex): New function.
11484         * dumpfile.h (dump_dec, dump_hex): Declare.
11485         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11486         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11487         min_input_precision, operation_precision and operation_sign.
11488         * tree-vect-patterns.c (vect_get_range_info): New function.
11489         (vect_same_loop_or_bb_p, vect_single_imm_use)
11490         (vect_operation_fits_smaller_type): Delete.
11491         (vect_look_through_possible_promotion): Add an optional
11492         single_use_p parameter.
11493         (vect_recog_over_widening_pattern): Rewrite to use new
11494         stmt_vec_info infomration.  Handle one operation at a time.
11495         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11496         (vect_truncatable_operation_p, vect_set_operation_type)
11497         (vect_set_min_input_precision): New functions.
11498         (vect_determine_min_output_precision_1): Likewise.
11499         (vect_determine_min_output_precision): Likewise.
11500         (vect_determine_precisions_from_range): Likewise.
11501         (vect_determine_precisions_from_users): Likewise.
11502         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11503         (vect_vect_recog_func_ptrs): Put over_widening first.
11504         Add cast_forwprop.
11505         (vect_pattern_recog): Call vect_determine_precisions.
11507 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11509         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11510         statements that have been replaced by further pattern statements.
11511         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11513 2018-07-03  Richard Biener  <rguenther@suse.de>
11515         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11516         always set *dt.  Dump vectype in vectype overload.
11517         * dumpfile.h (dump_gimple_expr): New function.
11518         (dump_gimple_expr_loc): Likewise.
11519         * dumpfile.c (dump_gimple_expr): New function.
11520         (dump_gimple_expr_loc): Likewise.
11522 2018-07-02  Jeff Law  <law@redhat.com>
11524         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11525         the H8/300, H8/300H and H8/S variants into a single pattern.
11526         (movhi_h8300, movqi_h8300hs): Similarly.
11527         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11528         (QHI mode iterator): New.
11530         * config/h8300/h8300.md: Remove trailing whitespace.
11532 2018-07-02  Jim Wilson  <jimw@sifive.com>
11534         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11535         instead of emit_insn for interrupt returns.
11536         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11537         (riscv_sret, riscv_uret): Likewise.
11539 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
11541         * pretty-print.c (selftest::test_pp_format): Move save and restore
11542         of quotes to class auto_fix_quotes, and add an instance.
11543         * selftest.c: Include "intl.h".
11544         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11545         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11546         * selftest.h (selftest::auto_fix_quotes): New class.
11548 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
11550         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11551         (aarch64_sve_prepare_conditional_op): Remove.
11552         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11553         Allow aarch64_simd_reg_or_zero as select operand; remove
11554         the aarch64_sve_prepare_conditional_op call.
11555         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11556         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11557         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11558         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11559         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11560         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11561         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11562         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11563         and a splitters to match all of the *_any patterns.
11564         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11566         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11567         (SVE_COND_FP_BINARY_REV): Remove.
11568         (sve_int_op_rev, sve_fp_op_rev): New.
11569         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11570         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11571         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11572         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11573         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11574         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11575         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11576         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11577         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11579         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11580         Remove match_dup 1 from the inner unspec.
11581         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11583         * config/aarch64/aarch64.md (movprfx): New attr.
11584         (length): Default movprfx to 8.
11585         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11586         (*madd<SVE_I>, *msub<SVE_I): Likewise.
11587         (*<su>mul<SVE_I>3_highpart): Likewise.
11588         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11589         (*v<ASHIFT><SVE_I>3): Likewise.
11590         (*<su><MAXMIN><SVE_I>3): Likewise.
11591         (*<su><MAXMIN><SVE_F>3): Likewise.
11592         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11593         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11594         (*div<SVE_F>4): Likewise.
11596 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
11598         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11599         in dump string.
11601 2018-07-02  Richard Biener  <rguenther@suse.de>
11603         PR tree-optimization/86363
11604         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11605         memset argument refers to a non-variable address.
11607 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
11609         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11610         {PLUS,MINUS}_EXPR code to...
11611         (adjust_symbolic_bound): ...here,
11612         (combine_bound): ...here,
11613         (set_value_range_with_overflow): ...and here.
11615 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
11617         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11618         code...
11619         (extract_range_from_abs_expr): ...here.
11621 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
11623         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11624         -fno-omit-frame-pointer when not optimizing.
11626 2018-07-02  Martin Liska  <mliska@suse.cz>
11628         PR ipa/86279
11629         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11630         (propagate_nothrow): Likewise.
11632 2018-07-02  Martin Liska  <mliska@suse.cz>
11634         PR ipa/86323
11635         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11637 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
11639         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11640         function in r262149, changing "loc" param from source_location to
11641         const dump_location_t &.
11642         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11643         declaration, as above.
11645 2018-07-01  Paul Koning  <ni1d@arrl.net>
11647         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11648         -munit-asm, -mgnu-asm, -mdec-asm.
11649         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11650         (pdp11_output_labelref): New.
11651         (pdp11_output_def): New.
11652         (pdp11_output_addr_vec_elt): New.
11653         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
11654         %# and %@ format codes.
11655         (pdp11_option_override): New.
11656         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11657         (pdp11_output_ident): New.
11658         (pdp11_asm_named_section): New.
11659         (pdp11_asm_init_sections): New.
11660         (pdp11_file_start): New.
11661         (pdp11_file_end): New.
11662         (output_ascii): Use .ascii/.asciz for -mdec-asm.
11663         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
11664         %o, like %c but octal.
11665         (pdp11_option_override): New.
11666         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11667         -mdec-asm.
11668         (DATA_SECTION_ASM_OP): Ditto.
11669         (READONLY_DATA_SECTION_ASM_OP): New.
11670         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11671         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11672         (ASM_OUTPUT_LABELREF): Ditto.
11673         (ASM_OUTPUT_DEF): Ditto.
11674         (ASM_OUTPUT_EXTERNAL): New.
11675         (ASM_OUTPUT_SOURCE_FILENAME): New.
11676         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11677         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11678         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
11679         %# and %@ format codes.
11680         * config/pdp11/pdp11.opt (mgnu-asm): New.
11681         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11682         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11683         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11685 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
11687         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11688         dereferencing path[] beyond its length.
11689         (debug_path): New.
11690         (debug_all_paths): New.
11691         (rewire_first_differing_edge): New.
11692         (adjust_paths_after_duplication): New.
11693         (duplicate_thread_path): Call adjust_paths_after_duplication.
11694         Add new argument.
11695         (thread_through_all_blocks): Add new argument to
11696         duplicate_thread_path.
11698 2018-06-30  Jim Wilson  <jimw@sifive.com>
11700         * config/riscv/predicates.md (p2m1_shift_operand): New.
11701         (high_mask_shift_operand): New.
11702         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11703         pattern using p2m1_shift_operand.
11704         (lshsi3_zero_extend_3+2): New combiner pattern using
11705         high_mask_shift_operand.
11707 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11709         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11710         split out from...
11711         (vect_recog_rotate_pattern): ...here.
11712         (vect_convert_input): Try to insert casts of invariants in the
11713         preheader.
11714         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11715         preheader to be empty.
11717 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11719         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11720         vector type.  If given, install it in the new statement's
11721         STMT_VINFO_VECTYPE.
11722         (vect_element_precision): New function.
11723         (vect_unpromoted_value): New struct.
11724         (vect_unpromoted_value::vect_unpromoted_value): New function.
11725         (vect_unpromoted_value::set_op): Likewise.
11726         (vect_look_through_possible_promotion): Likewise.
11727         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11728         (vect_widened_op_tree, vect_convert_input): Likewise.
11729         (vect_convert_inputs, vect_convert_output): Likewise.
11730         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11731         to handle the optional cast of the multiplication result and
11732         vect_widened_op_tree to detect the widened multiplication itself.
11733         Do not require the input and output of promotion casts to have
11734         the same sign, but base the signedness of the operation on the
11735         input rather than the result.  If the pattern includes two
11736         promotions, check that those promotions have the same sign.
11737         Do not restrict the MULT_EXPR handling to a double-width result;
11738         handle quadruple-width results and wider.  Use vect_convert_inputs
11739         to convert the inputs to the common type.
11740         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
11741         to handle the optional cast of the ABS result.  Also allow a sign
11742         change or a sign extension between the ABS and MINUS.
11743         Use vect_widened_op_tree to detect the widened subtraction and use
11744         vect_convert_inputs to convert the inputs to the common type.
11745         (vect_handle_widen_op_by_const): Delete.
11746         (vect_recog_widen_op_pattern): New function.
11747         (vect_recog_widen_mult_pattern): Use it.
11748         (vect_recog_widen_shift_pattern): Likewise.
11749         (vect_recog_widen_sum_pattern): Use
11750         vect_look_through_possible_promotion to handle the promoted
11751         PLUS_EXPR operand.
11753 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11755         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11756         the containing gimple_seq *.
11757         * gimple-iterator.h (gsi_for_stmt): Declare it.
11758         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11759         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11760         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11761         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11762         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11763         checks.
11764         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11765         split out from...
11766         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
11767         statement being replaced is part of an existing pattern
11768         definition sequence, inserting the new pattern statements before
11769         the original one.
11770         (vect_pattern_recog_1): Don't return a bool.  If the statement
11771         is already part of a pattern, instead apply pattern matching
11772         to the pattern definition statements.  Don't clear the
11773         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11774         (vect_pattern_recog): Don't break after the first match;
11775         continue processing the pattern definition statements instead.
11776         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11778 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11780         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11781         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11782         (vect_recog_widen_sum_pattern): Use it.
11784 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11786         * tree-vect-loop.c (vectorizable_reduction): Assert that the
11787         phi is not a pattern statement and has not been replaced by
11788         a pattern statement.
11789         * tree-vect-patterns.c (type_conversion_p): Don't check
11790         STMT_VINFO_IN_PATTERN_P.
11791         (vect_recog_vector_vector_shift_pattern): Likewise.
11792         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11793         the pattern statement rather than the original statement; check
11794         directly for a WIDEN_MULT_EXPR here.
11795         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11796         vect_is_simple_use to return the pattern statement rather
11797         than the original statement; use is_pattern_stmt_p to check
11798         for such a pattern statement.
11799         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11800         to return the pattern statement rather than the original statement;
11801         don't do the same transformation here.
11802         (vect_is_simple_use): If the defining statement has been replaced
11803         by a pattern statement, return the pattern statement instead.
11804         Remove the corresponding (local) transformation from the vectype
11805         overload.
11807 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11809         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11810         end and default to null.
11811         * tree-vect-loop.c (vect_create_epilog_for_reduction)
11812         (vectorizable_reduction): Update calls accordingly, dropping the
11813         gimple ** argument if the passed-back statement isn't needed.
11814         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11815         (vect_recog_rotate_pattern): Likewise.
11816         (vect_recog_mask_conversion_pattern): Likewise.
11817         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11818         (vect_mask_constant_operand_p): Likewise.
11819         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11820         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11821         (get_group_load_store_type, get_load_store_type): Likewise.
11822         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11823         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11824         (vectorizable_conversion, vectorizable_assignment): Likewise.
11825         (vectorizable_shift, vectorizable_operation): Likewise.
11826         (vectorizable_store, vect_is_simple_cond): Likewise.
11827         (vectorizable_condition, vectorizable_comparison): Likewise.
11828         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11829         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11830         and move it to the end.  Cope with null def_stmt_outs.
11832 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11834         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11836 2018-06-29  Jeff Law  <law@redhat.com>
11838         * config/v850/v850.c (v850_legitimate_address_p): Handle large
11839         displacements for TARGET_V850E2V3 and newer.
11840         (TARGET_LRA_P): Remove.  Defaults to LRA now.
11841         * config/v850/v850.md (sign23byte_load): Remove.
11842         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11843         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11845 2018-06-29  Martin Liska  <mliska@suse.cz>
11847         PR lto/85759
11848         * coverage.c (coverage_init): Mangle full path name.
11849         * doc/invoke.texi: Document the change.
11850         * gcov-io.c (mangle_path): New.
11851         * gcov-io.h (mangle_path): Likewise.
11852         * gcov.c (mangle_name): Use mangle_path for path mangling.
11854 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11856         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11857         if starting source register is not even.
11859 2018-06-29  Martin Liska  <mliska@suse.cz>
11861         PR tree-optimization/86263
11862         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11863         Make edge redirection.
11865 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
11867         * dumpfile.c (dump_loc): Add indentation based on scope depth.
11868         (dump_scope_depth): New variable.
11869         (get_dump_scope_depth): New function.
11870         (dump_begin_scope): New function.
11871         (dump_end_scope): New function.
11872         * dumpfile.h (get_dump_scope_depth): New declaration.
11873         (dump_begin_scope): New declaration.
11874         (dump_end_scope): New declaration.
11875         (class auto_dump_scope): New class.
11876         (AUTO_DUMP_SCOPE): New macro.
11877         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11878         AUTO_DUMP_SCOPE.
11880 2018-06-29  Richard Biener  <rguenther@suse.de>
11882         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11883         compute_all_dependences succeeds.
11884         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11885         exceed --param loop-max-datarefs-for-datadeps.
11887 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
11889         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11891 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
11893         PR target/86348
11894         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11895         alternative 0 in preferred_for_speed attribute.
11897 2018-06-28  Paul Koning  <ni1d@arrl.net>
11899         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11900         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11901         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11902         * config/pdp11/pdp11.md: Correct "length" attribute calculation
11903         for shift insn patterns.
11905 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
11907         * cgraph.c (cgraph_node::get_body): Replace assignments to
11908         "dump_file" with calls to set_dump_file.
11909         * dumpfile.c (alt_dump_file): Make static, and group with...
11910         (alt_flags): ...this definition.
11911         (dumps_are_enabled): New variable.
11912         (refresh_dumps_are_enabled): New function.
11913         (set_dump_file): New function.
11914         (set_alt_dump_file): New function.
11915         (gcc::dump_manager::dump_start): Replace assignments to
11916         "dump_file" and "alt_dump_file" with calls to set_dump_file and
11917         set_alt_dump_file.
11918         (gcc::dump_manager::dump_finish): Likewise.
11919         * dumpfile.h (alt_dump_file): Delete decl.
11920         (dumps_are_enabled): New variable decl.
11921         (set_dump_file): New function decl.
11922         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11923         global.
11924         * tree-nested.c (lower_nested_functions): Replace assignments to
11925         "dump_file" with calls to set_dump_file.
11927 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
11929         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11930         goto_locus of each outgoing edge of each basic block.
11932 2018-06-28  Richard Biener  <rguenther@suse.de>
11934         * dwarf2out.c (decl_scope_table): Remove.
11935         (push_decl_scope): Likewise.
11936         (pop_decl_scope): Likewise.
11937         (gen_type_die_for_member): Do not call push/pop_decl_scope.
11938         (gen_struct_or_union_type_die): Likewise.
11939         (gen_tagged_type_die): Likewise.
11940         (dwarf2out_init): Do not initialize decl_scope_table.
11941         (dwarf2out_c_finalize): Do not free it.
11943 2018-06-28  Richard Biener  <rguenther@suse.de>
11945         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11946         deciding whether to not re-use a DIE.
11948 2018-06-28  Richard Biener  <rguenther@suse.de>
11950         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11951         DW_AT_abstract_origin attribute.
11953 2018-06-28  Martin Liska  <mliska@suse.cz>
11955         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11956         Use newly introduced constants.
11957         * tree-switch-conversion.h (struct jump_table_cluster):
11958         Define max_ratio_for_size and max_ratio_for_speed.
11960 2018-06-28  Martin Liska  <mliska@suse.cz>
11962         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11963         Add new checking assert to catch invalid state.
11964         (jump_table_cluster::can_be_handled): Handle single case
11965         clusters.
11966         (jump_table_cluster::is_beneficial): Bail out for such case.
11967         (bit_test_cluster::find_bit_tests):
11968         Add new checking assert to catch invalid state.
11969         (bit_test_cluster::can_be_handled): Handle single case
11970         clusters.
11971         (bit_test_cluster::is_beneficial): Bail out for such case.
11972         (switch_decision_tree::analyze_switch_statement):
11973         Fix comment.
11975 2018-06-28  Martin Liska  <mliska@suse.cz>
11977         * common.opt: Introduce -completion option.
11978         * gcc.c (driver_handle_option): Handle it.
11979         (driver::main): Print completions if completion
11980         is set.
11981         * opt-suggestions.c (option_proposer::get_completions):
11982         New function.
11983         (option_proposer::suggest_completion): Likewise.
11984         (option_proposer::find_param_completions): Likewise.
11985         (verify_autocompletions): Likewise.
11986         (test_completion_valid_options): Likewise.
11987         (test_completion_valid_params): Likewise.
11988         (in_completion_p): Likewise.
11989         (empty_completion_p): Likewise.
11990         (test_completion_partial_match): Likewise.
11991         (test_completion_garbage): Likewise.
11992         (opt_proposer_c_tests): Likewise.
11993         * opt-suggestions.h: Declare new functions.
11994         * opts.c (common_handle_option): Handle OPT__completion_.
11995         * selftest-run-tests.c (selftest::run_tests): Add
11996         opt_proposer_c_tests.
11997         * selftest.c (assert_str_startswith): New.
11998         * selftest.h (assert_str_startswith): Likewise.
11999         (opt_proposer_c_tests): New.
12000         (ASSERT_STR_STARTSWITH): Likewise.
12002 2018-06-28  Martin Liska  <mliska@suse.cz>
12004         * Makefile.in: Add opt-suggestions.o.
12005         * gcc-main.c: Include opt-suggestions.h.
12006         * gcc.c (driver::driver): Likewise.
12007         (driver::~driver): Remove m_option_suggestions.
12008         (driver::build_option_suggestions): Moved to option_proposer.
12009         (driver::suggest_option): Likewise.
12010         (driver::handle_unrecognized_options): Use option_proposer.
12011         * gcc.h (class driver): Add new memver m_option_proposer.
12012         * opt-suggestions.c: New file.
12013         * opt-suggestions.h: New file.
12015 2018-06-28  Martin Liska  <mliska@suse.cz>
12017         * vec.h (class auto_string_vec): New (moved from auto_argvec).
12018         (auto_string_vec::~auto_string_vec): Likewise.
12020 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
12022         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
12023         prevent_decl_creation_for_types fields up and add reset_location field.
12024         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
12025         statement if id->reset_location is true.
12026         (copy_edges_for_bb): Do not set goto_locus on the new edges if
12027         id->reset_location is true.
12028         (copy_phis_for_bb): Force input_location on the arguments if
12029         id->reset_location is true.
12030         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
12031         is set on the function to be inlined.
12033 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
12035         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
12037 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
12039         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
12040         registers for Pmode.
12041         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
12042         hard registers for the clobbered pseudo.
12044 2018-06-27  Paul Koning  <ni1d@arrl.net>
12046         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12047         mutually exclusive options.
12048         * config/pdp11/constraints.md (h): New constraint.
12049         (O): Update definition to match shift code generation.
12050         (D): New constraint.
12051         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
12052         (CCFP): Remove.
12053         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
12054         function.
12055         (output_jump): Change arguments.
12056         (pdp11_fixed_cc_regs): New function.
12057         (pdp11_cc_mode): Ditto.
12058         (pdp11_expand_shift): Ditto.
12059         (pdp11_assemble_shift): Ditto.
12060         (pdp11_small_shift): Ditto.
12061         (pdp11_branch_cost): Remove.
12062         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
12063         from output.
12064         (pdp11_register_move_cost): Update for CC registers.
12065         (pdp11_rtx_costs): Add case for LSHIFTRT.
12066         (pdp11_output_jump): Add CCNZ mode conditional branches.
12067         (notice_update_cc_on_set): Remove.
12068         (pdp11_cc_mode): New function.
12069         (simple_memory_operand): Correct pre/post decrement case.
12070         (no_side_effect_operand): New function.
12071         (pdp11_regno_reg_class): Add CC_REGS class.
12072         (pdp11_fixed_cc_regs): New function.
12073         (pdp11_small_shift): New function.
12074         (pdp11_expand_shift): New function to expand shift insns.
12075         (pdp11_assemble_shift): New function to output shifts.
12076         (pdp11_branch_cost): Remove.
12077         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
12078         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
12079         (WCHAR_TYPE): Ditto.
12080         (PTRDIFF_TYPE): Ditto.
12081         (ADJUST_INSN_LENGTH): New macro.
12082         (FIXED_REGISTERS): Add CC registers.
12083         (CALL_USED_REGISTERS): Ditto.
12084         (reg_class): Ditto.
12085         (REG_CLASS_NAMES): Ditto.
12086         (REG_CLASS_CONTENTS): Ditto.
12087         (SELECT_CC_MODE): Use new function.
12088         (TARGET_FLAGS_REGNUM): New macro.
12089         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
12090         (cc0_reg_rtx): Remove.
12091         (CC_STATUS_MDEP): Remove.
12092         (CC_STATUS_MDEFP_INIT): Remove.
12093         (CC_IN_FPU): Remove.
12094         (NOTICE_UPDATE_CC): Remove.
12095         (REGISTER_NAMES): Add CC registers.
12096         (BRANCH_COST): Change to constant 1.
12097         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
12098         handling.
12099         * config/pdp11/pdp11.opt (mbcopy): Remove.
12100         (mbcopy-builtin): Remove.
12101         (mbranch-cheap): Remove.
12102         (mbranch-expensive): Remove.
12103         * config/pdp11/predicates.md (expand_shift_operand): Update to
12104         match shift code generation.
12105         (ccnz_operator): New predicate.
12106         * doc/invoke.texi (PDP-11 Options): Remove deleted options
12107         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
12108         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
12109         exclusive options.
12110         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
12111         description of O constraint.
12113 2018-06-27  Jeff Law  <law@redhat.com>
12114             Austin Law  <austinklaw@gmail.com>
12116         * config/v850/v850.md (addsi3_set_flags): New pattern.
12117         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
12118         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
12119         (zero_extendhisi2_v850_set_flags): Likewise.
12120         (zero_extendqisi2_v850_set_flags): Likewise.
12121         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
12122         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
12123         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
12125         * config/v850/v850-protos.h (notice_update_cc): Remove.
12126         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
12127         (v850_print_operand): Handle 'D' and "d".
12128         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
12129         Add handling of arithmetic/logical operations compared against zero.
12130         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
12131         Do not look at v850_compare_op, instead get mode from last argument.
12132         (v850_gen_compare): Remove
12133         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
12134         after reload for prologue insns.
12135         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
12136         patterns.
12137         (construct_save_jarl): Likewise.
12138         (TARGET_FLAGS_REGNUM): Define.
12139         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
12140         (NOTICE_UPDATE_CC): Remove.
12141         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
12142         than cc0.  Conditionalize on reload_completed.
12143         (cmpsi_insn, setfcc_insn): Likewise.
12144         (tst1 splitter): Turn into define_and_split which sets the flags
12145         after reload.
12146         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
12147         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
12148         (cstoresf4, cstoredf4): Clobber the flags.
12149         (cmpsi, cmpsf, cmpdf): Remove expanders.
12150         (setf_insn): Remove pattern.
12151         (addsi3): Turn into define_and_split which clobbers the flags after
12152         reload and a suitable pattern (addsi3_clobber_flags) for use after
12153         reload.
12154         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
12155         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
12156         (ashrsi3, ashrsi3_v850e2): Likewise.
12157         (bins): Clobber the flags.
12158         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
12159         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
12160         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
12161         (call_value_internal_short, call_value_internal_long): Likewise.
12162         (callt_save_interrupt, callt_return_interrupt): Likewise.
12163         (save_interrupt, return_interrupt): Likewise.
12164         (callt_save_all_interrupt, save_all_interrupt): Likewise.
12165         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
12166         (restore_all_interrupt, _restore_all_interrupt): Likewise.
12167         (All FP comparisons): Only allow after reload has completed.
12168         (trfsr): Likewise.
12169         (divh, divhu): Tweak output template.
12170         (branch_z_normal, branch_z_invert): Remove
12171         (branch_nz_normal, branch_nz_invert): Likewise.
12172         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
12174         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
12175         * config/v850/v850.c (notice_update_cc): Remove.
12176         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
12177         (CC_NO_CARRY): Likewise.
12178         (NOTICE_UPDATE_CC): Define to nothing.
12179         * config/v850/v850.md: Remove block comment on cc0 handling
12180         Remove "cc" attribute from all patterns.  Remove cc_status handling
12181         from all patterns.  Minor formatting fixes.
12183 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12185         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
12186         (cortex-a76.cortex-a55): Likewise.
12187         * config/aarch64/aarch64-tune.md: Regenerate.
12188         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
12189         cortex-a76.cortex-a55.
12191 2018-06-27  Jeff Law  <law@redhat.com>
12193         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
12194         (MULTILIB_DIRNAMES): Similarly.
12196 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
12198         * gimple.h (gimple_return_retbnd): Delete.
12199         (gimple_return_set_retbnd): Likewise.
12200         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
12201         gimple_return_set_retbnd.
12202         * gimple-pretty-print.c (dump_gimple_return): Remove call to
12203         gimple_return_retbnd and adjust.
12204         * tree-inline.h (struct copy_body_data): Remove retbnd field.
12205         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
12206         Explicitly return NULL in a couple more cases.  Move assertion
12207         on debug statements and remove unreachable code.
12208         (reset_debug_binding): Do not test id->retbnd.
12209         (expand_call_inline): Do not set it.
12211 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
12213         * configure.ac: Add --disable-gcov option.
12214         * configure: Regenerate.
12215         * Makefile.in: Honour @enable_gcov@.
12216         * doc/install.texi: Document --disable-gcov.
12218 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12220         * config/arm/arm-cpus.in (cortex-a76): New entry.
12221         (cortex-a76.cortex-a55): Likewise.
12222         * config/arm/arm-tables.opt: Regenerate.
12223         * config/arm/arm-tune.md: Likewise.
12224         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
12225         * doc/invoke.texi (ARM Options): Document cortex-a76 and
12226         cortex-a76.cortex-a55.
12228 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
12230         PR target/85769
12231         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
12233 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
12235         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
12236         comment.
12237         (EPILOGUE_USES): Likewise.
12239 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
12241         * tree-inline.c (remap_location): New function extracted from...
12242         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
12243         (copy_phis_for_bb): ...here.  Call remap_location.
12244         (copy_cfg_body): Adjust call to copy_edges_for_bb.
12246 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
12248         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
12249         unaligned vsx for 16B memset.
12251 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
12253         PR target/86285
12254         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
12255         ieee128_float_type_node to long_double_type_node unless
12256         TARGET_LONG_DOUBLE_128 is set.
12258 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
12260         * cfgloop.c (get_loop_location): Convert return type from
12261         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
12262         by implicit construction from rtx_insn *, and using
12263         dump_user_location_t::from_function_decl for the fallback case.
12264         * cfgloop.h (get_loop_location): Convert return type from
12265         location_t to dump_user_location_t.
12266         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
12267         dump_printf_loc to pass in a dump_location_t rather than a
12268         location_t, via the gimple stmt.
12269         * coverage.c (get_coverage_counts): Update calls to
12270         dump_printf_loc to pass in dump_location_t rather than a
12271         location_t.
12272         * doc/optinfo.texi (Dump types): Convert example of
12273         dump_printf_loc from taking "locus" to taking "insn".  Update
12274         description of the "_loc" calls to cover dump_location_t.
12275         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
12276         "selftest.h".
12277         (dump_user_location_t::dump_user_location_t): New constructors,
12278         from gimple *stmt and rtx_insn *.
12279         (dump_user_location_t::from_function_decl): New function.
12280         (dump_loc): Make static.
12281         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
12282         const dump_location_t &.
12283         (dump_generic_expr_loc): Delete.
12284         (dump_printf_loc): Convert param "loc" from location_t to
12285         const dump_location_t &.
12286         (selftest::test_impl_location): New function.
12287         (selftest::dumpfile_c_tests): New function.
12288         * dumpfile.h: Include "profile-count.h".
12289         (class dump_user_location_t): New class.
12290         (struct dump_impl_location_t): New struct.
12291         (class dump_location_t): New class.
12292         (dump_printf_loc): Convert 2nd param from source_location to
12293         const dump_location_t &.
12294         (dump_generic_expr_loc): Delete.
12295         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12296         const dump_location_t &.
12297         * gimple-fold.c (fold_gimple_assign): Update call to
12298         dump_printf_loc to pass in a dump_location_t rather than a
12299         location_t, via the gimple stmt.
12300         (gimple_fold_call): Likewise.
12301         * gimple-loop-interchange.cc
12302         (loop_cand::analyze_iloop_reduction_var): Update for change to
12303         check_reduction_path.
12304         (tree_loop_interchange::interchange): Update for change to
12305         find_loop_location.
12306         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12307         change in return-type of find_loop_location.
12308         (graphite_regenerate_ast_isl): Likewise.
12309         * graphite-optimize-isl.c (optimize_isl): Likewise.
12310         * graphite.c (graphite_transform_loops): Likewise.
12311         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12312         pass in a dump_location_t rather than a location_t, via the
12313         gimple stmt.
12314         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12315         * ipa.c (walk_polymorphic_call_targets): Likewise.
12316         * loop-unroll.c (report_unroll): Convert "locus" param from
12317         location_t to dump_location_t.
12318         (decide_unrolling): Update for change to get_loop_location's
12319         return type.
12320         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12321         location_t to dump_user_location_t.
12322         (grid_find_single_omp_among_assignments_1): Updates calls to
12323         dump_printf_loc to pass in a dump_location_t rather than a
12324         location_t, via the gimple stmt.
12325         (grid_parallel_clauses_gridifiable): Convert "tloc" from
12326         location_t to dump_location_t.  Updates calls to dump_printf_loc
12327         to pass in a dump_location_t rather than a location_t, via the
12328         gimple stmt.
12329         (grid_inner_loop_gridifiable_p): Likewise.
12330         (grid_dist_follows_simple_pattern): Likewise.
12331         (grid_gfor_follows_tiling_pattern): Likewise.
12332         (grid_target_follows_gridifiable_pattern): Likewise.
12333         (grid_attempt_target_gridification): Convert initialization
12334         of local "grid" from memset to zero-initialization; FIXME: does
12335         this require C++11?  Update call to dump_printf_loc to pass in a
12336         optinfo_location rather than a location_t, via the gimple stmt.
12337         * profile.c (read_profile_edge_counts): Updates call to
12338         dump_printf_loc to pass in a dump_location_t rather than a
12339         location_t
12340         (compute_branch_probabilities): Likewise.
12341         * selftest-run-tests.c (selftest::run_tests): Call
12342         dumpfile_c_tests.
12343         * selftest.h (dumpfile_c_tests): New decl.
12344         * tree-loop-distribution.c (pass_loop_distribution::execute):
12345         Update for change in return type of find_loop_location.
12346         * tree-parloops.c (parallelize_loops): Likewise.
12347         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12348         "locus" from location_t to dump_user_location_t.
12349         (canonicalize_loop_induction_variables): Likewise.
12350         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12351         for change in return type of find_loop_location.
12352         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12353         to dump_printf_loc to pass in a dump_location_t rather than a
12354         location_t, via the stmt.
12355         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12356         Likewise.
12357         * tree-vect-loop-manip.c (find_loop_location): Convert return
12358         type from source_location to dump_user_location_t.
12359         (vect_do_peeling): Update for above change.
12360         (vect_loop_versioning): Update for change in type of
12361         vect_location.
12362         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12363         from location_t to dump_user_location_t.
12364         (vect_estimate_min_profitable_iters): Update for change in type
12365         of vect_location.
12366         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12367         location_t to dump_location_t.
12368         (vect_slp_bb): Update for change in type of vect_location.
12369         * tree-vectorizer.c (vect_location): Convert from source_location
12370         to dump_user_location_t.
12371         (try_vectorize_loop_1): Update for change in vect_location's type.
12372         (vectorize_loops): Likewise.
12373         (increase_alignment): Likewise.
12374         * tree-vectorizer.h (vect_location): Convert from source_location
12375         to dump_user_location_t.
12376         (find_loop_location): Convert return type from source_location to
12377         dump_user_location_t.
12378         (check_reduction_path): Convert 1st param from location_t to
12379         dump_user_location_t.
12380         * value-prof.c (check_counter): Update call to dump_printf_loc to
12381         pass in a dump_user_location_t rather than a location_t; update
12382         call to error_at for change in type of "locus".
12383         (check_ic_target): Update call to dump_printf_loc to
12384         pass in a dump_user_location_t rather than a location_t, via the
12385         call_stmt.
12387 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
12389         * config/s390/s390.h (enum processor_flags): Do not use
12390         default tune parameter when -march was specified.
12392 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
12394         PR target/86314
12395         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12396         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12397         operands.
12399 2018-06-26  Richard Biener  <rguenther@suse.de>
12401         PR tree-optimization/86287
12402         PR bootstrap/86316
12403         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12404         (vect_analyze_loop): Initialize n_stmts.
12406 2018-06-26  Richard Biener  <rguenther@suse.de>
12408         PR middle-end/86271
12409         * fold-const.c (fold_convertible_p): Pointer extension
12410         isn't valid.
12412 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
12414         PR debug/86064
12415         * dwarf2out.c (loc_list_has_views): Adjust comments.
12416         (dw_loc_list): Split single cross-partition range with
12417         nonzero locview.
12419 2018-06-25  Jeff Law  <law@redhat.com>
12421         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12422         on -mbig-switch by default.
12424         * config/v850/predicates.md (const_float_1_operand): Fix match_code
12425         test.
12426         (const_float_0_operand): Remove unused predicate.
12427         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12428         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12429         (recipsf2): New expander.  Original pattern now called
12430         (recipsf2_insn).
12431         (recipdf2, recipdf2_insn): Similarly.
12432         (rsqrtsf2, rsqrtsf2_insn): Similarly
12433         (rsqrtdf2, rsqrtdf2_insn): Similarly
12435 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
12437         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12438         Simplify logic for FreeBSD (twice).
12440 2018-06-25  Martin Sebor  <msebor@redhat.com>
12442         PR tree-optimization/86204
12443         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12444         a strnlen result if it's less than the length of the string.
12446 2018-06-25  Martin Sebor  <msebor@redhat.com>
12448         PR tree-optimization/85700
12449         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12450         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12451         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12453 2018-06-25  Martin Sebor  <msebor@redhat.com>
12455         * doc/extend.texi (Zero-length arrays): Update and clarify.
12457 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
12459         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12460         added IEEE/IBM long double multilib support on PowerPC little
12461         endian Linux systems.
12462         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12463         (MULTILIB_DEFAULTS): Likewise.
12464         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12465         Likewise.
12466         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12467         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12468         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12470 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
12472         PR middle-end/86311
12473         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12474         (REORDER_45): Likewise.
12476 2018-06-25  Jeff Law  <law@redhat.com>
12478         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12479         dividend to 32 bits.  Adjust length.
12480         (udivmodhi4): Cleanup output template.  Fix length.
12482 2018-06-25  Carl Love  <cel@us.ibm.com>
12484         * config/rs6000/vsx.md: Change word selector to prefered location.
12486 2018-06-25  Richard Biener  <rguenther@suse.de>
12488         PR tree-optimization/86304
12489         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12490         epilogue-if-converted loops as well.
12492 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
12494         * lto-section-out.c (lto_begin_section): Do not print section
12495         name for noaddr and unnumbered dumps.
12497 2018-06-25  Richard Biener  <rguenther@suse.de>
12499         * tree-vectorizer.h (struct vec_info_shared): New structure
12500         with parts split out from struct vec_info and loop_nest from
12501         struct _loop_vec_info.
12502         (struct vec_info): Adjust accordingly.
12503         (struct _loop_vec_info): Likewise.
12504         (LOOP_VINFO_LOOP_NEST): Adjust.
12505         (LOOP_VINFO_DATAREFS): Likewise.
12506         (LOOP_VINFO_DDRS): Likewise.
12507         (struct _bb_vec_info): Likewise.
12508         (BB_VINFO_DATAREFS): Likewise.
12509         (BB_VINFO_DDRS): Likewise.
12510         (struct _stmt_vec_info): Add dr_aux member.
12511         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12512         (DR_MISALIGNMENT_UNINITIALIZED): New.
12513         (set_dr_misalignment): Adjust.
12514         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12515         (vect_analyze_loop): Adjust prototype.
12516         (vect_analyze_loop_form): Likewise.
12517         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12518         Compute dependences lazily.
12519         (vect_record_base_alignments): Use shared datarefs/ddrs.
12520         (vect_verify_datarefs_alignment): Likewise.
12521         (vect_analyze_data_refs_alignment): Likewise.
12522         (vect_analyze_data_ref_accesses): Likewise.
12523         (vect_analyze_data_refs): Likewise.
12524         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12525         constructor parameter for shared part.
12526         (vect_analyze_loop_form): Pass in shared part and adjust.
12527         (vect_analyze_loop_2): Pass in storage for the number of
12528         stmts.  Move loop nest finding to the caller.  Compute
12529         datarefs lazily.
12530         (vect_analyze_loop): Pass in shared part.
12531         (vect_transform_loop): Verify shared datarefs are unchanged.
12532         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12533         constructor parameter for shared part.
12534         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12535         (vect_slp_bb): Verify shared datarefs are unchanged before
12536         transform.
12537         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12538         change.
12539         (new_stmt_vec_info): Initialize DR_AUX misalignment to
12540         DR_MISALIGNMENT_UNINITIALIZED.
12541         * tree-vectorizer.c (vec_info::vec_info): Add constructor
12542         parameter for shared part.
12543         (vec_info::~vec_info): Adjust.
12544         (vec_info_shared::vec_info_shared): New.
12545         (vec_info_shared::~vec_info_shared): Likewise.
12546         (vec_info_shared::save_datarefs): Likewise.
12547         (vec_info_shared::check_datarefs): Likewise.
12548         (try_vectorize_loop_1): Construct shared part live for analyses
12549         of a single loop for multiple vector sizes.
12550         * tree-parloops.c (gather_scalar_reductions): Adjust.
12552 2018-06-25  Richard Biener  <rguenther@suse.de>
12554         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12555         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12556         (vect_analyze_data_refs): Remove similar code from here and
12557         simplify accordingly.
12559 2018-06-25  Richard Biener  <rguenther@suse.de>
12561         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12562         for reverse storage order accesses rather than asserting
12563         they cannot happen here.
12565 2018-06-25  Tom de Vries  <tdevries@suse.de>
12567         PR debug/86257
12568         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12569         Use data16 instead of .byte for insn prefix.
12571 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
12573         PR C++/86082
12574         * parser.c (make_char_string_pack): Pass this literal chars
12575         through cpp_interpret_string.
12576         (cp_parser_userdef_numeric_literal): Check the result of
12577         make_char_string_pack.
12579 2018-06-24  Maya Rashish  <coypu@sdf.org>
12581         * ginclude/stddef.h: Simplify conditions around avoiding
12582         re-definition of __size_t.
12584 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
12586         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12587         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12589 2018-06-22  Maya Rashish  <coypu@sdf.org>
12591         * doc/invoke.texi (mno-fancy-math-387): Update for changes
12592         made to OpenBSD and NetBSD through the years.
12594 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12596         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12597         behavior of vec_pack (vector double, vector double) to match
12598         behavior of vec_float2 (vector double, vector double).
12600 2018-06-22  Olivier Hainque  <hainque@adacore.com>
12602         * gimplify.c (gimplify_function_tree): Prevent creation
12603         of a trampoline for the address of the current function
12604         passed to entry/exit instrumentation hooks.
12606 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
12608         PR target/86222
12609         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12610         correctly.
12612 2018-06-22  Martin Liska  <mliska@suse.cz>
12614         PR tree-optimization/86263
12615         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12616         Bail out if is_enabled is false.
12617         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12618         New declaration.
12619         (jump_table_cluster::is_enabled): New function.
12621 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
12623         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12624         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12625         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12626         (lto_input_ts_binfo_tree_pointers): Likewise.
12627         * tree-streamer-out.c (streamer_write_tree_bitfields,
12628         write_ts_binfo_tree_pointers): Likewise.
12629         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12631 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
12633         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12635 2018-06-22  Martin Liska  <mliska@suse.cz>
12637         * symbol-summary.h (get): Make it pure and inline move
12638         functionality from ::get function.
12639         (get): Remove and inline into ::get and ::get_create.
12640         (get_create): Move code from ::get function.
12642 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12644         PR target/85994
12645         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12646         -x assembler-with-cpp.
12648 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12650         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12651         _FILE_OFFSET_BITS=64 for C++.
12653 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
12655         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12656         conversion insn that shows up when pr85657-3.c is compiled using
12657         IEEE 128-bit long double.
12658         (neg<mode>2_internal): Use the correct mode to check whether the
12659         mode is IBM extended.
12660         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12661         multiply and divide external functions from being created more
12662         than once.
12664 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12666         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12667         functions.
12668         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
12669         the edge can be forwarded.
12670         (cfg_layout_merge_blocks): Likewise.
12672 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12674         * except.c (finish_eh_generation): Commit edge insertions only after
12675         the EH edges have been redirected from post-landing to landing pads.
12677 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12679         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12680         create_tmp_var_for to create the FRAME decl.
12681         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12683 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12685         * tree-inline.c (copy_edges_for_bb): Minor tweak.
12686         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12687         debug statement when resetting its value.
12688         (expand_call_inline): Copy the locus of the call onto the assignment
12689         of the return value, if any.  Use local variable in more cases.
12691 2018-06-21  Martin Liska  <mliska@suse.cz>
12693         * ipa-pure-const.c (propagate_nothrow): Use
12694         funct_state_summaries->get.
12695         (dump_malloc_lattice): Likewise.
12696         (propagate_malloc): Likewise.
12698 2018-06-21  Richard Biener  <rguenther@suse.de>
12700         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12701         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12702         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12703         comment.
12704         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12705         BLOCK_ABSTRACT_ORIGIN unconditionally.
12707 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
12709         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12710         deleting it.
12711         * ipa-reference.c (ipa_reference_c_finalize): Delete
12712         ipa_ref_opt_sum_summaries and set it to NULL.
12714 2018-06-21  Tom de Vries  <tdevries@suse.de>
12716         PR tree-optimization/85859
12717         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12718         test with comment from bb_no_side_effects_p.
12720 2018-06-21  Richard Biener  <rguenther@suse.de>
12722         PR tree-optimization/86232
12723         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12724         max for constant niter.
12726 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12728         * config/aarch64/aarch64-simd.md
12729         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12731 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12733         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12734         Make opernads of the unspec commutative.
12736 2018-06-21  Richard Biener  <rguenther@suse.de>
12738         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12739         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12740         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12741         (vect_analyze_data_ref_dependence): Re-order checks to deal with
12742         NULL DR_STEP.
12743         (vect_record_base_alignments): Do not record base alignment
12744         for gathers or scatters.
12745         (vect_compute_data_ref_alignment): Drop return value that is always
12746         true.  Bail out early for gathers or scatters.
12747         (vect_enhance_data_refs_alignment): Bail out early for gathers
12748         or scatters.
12749         (vect_find_same_alignment_drs): Likewise.
12750         (vect_analyze_data_refs_alignment): Remove dead code.
12751         (vect_slp_analyze_and_verify_node_alignment): Likewise.
12752         (vect_analyze_data_refs): For possible gathers or scatters do
12753         not create an alternate DR, just check their possible validity
12754         and mark them.  Adjust DECL_NONALIASED handling to not rely
12755         on DR_BASE_ADDRESS.
12756         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12757         update inits of gathers or scatters.
12758         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12759         Also copy gather/scatter flag to pattern vinfo.
12761 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12763         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12764         behavior of vec_packsu (vector unsigned long long, vector unsigned
12765         long long) to match behavior of vec_packs with same signature.
12767 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
12768             Thomas Schwinge <thomas@codesourcery.com>
12769             Cesar Philippidis  <cesar@codesourcery.com>
12771         * gimplify.c (gimplify_scan_omp_clauses): Add support for
12772         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12773         (gimplify_adjust_omp_clauses): Likewise.
12774         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12775         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12776         (gimplify_omp_target_update): Update handling of acc update and
12777         enter/exit data.
12778         * omp-low.c (install_var_field): Remove unused parameter
12779         base_pointers_restrict.
12780         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12781         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12782         FINALIZE}
12783         (omp_target_base_pointers_restrict_p): Delete.
12784         (scan_omp_target): Update call to scan_sharing_clauses.
12785         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12786         FINALIZE}.
12787         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12788         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12789         (convert_local_omp_clauses): Likewise.
12790         * tree-pretty-print.c (dump_omp_clause): Likewise.
12791         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
12792         FINALIZE}.
12793         (omp_clause_code_name): Likewise.
12795 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
12797         PR debug/86194
12798         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12799         be narrowed.
12801         PR tree-optimization/86231
12802         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
12803         anti-range don't overwrite *vr0min before using it to compute *vr0max.
12805 2018-06-20  Tom de Vries  <tdevries@suse.de>
12807         PR tree-optimization/86097
12808         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12809         iv type if signedness of iv type is not the same as that of *nit.
12811 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
12813         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
12814         EDGE_EH edges, verify they are all EDGE_EH.
12816 2018-06-20  Maya Rashish  <coypu@sdf.org>
12818         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12820 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12822         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12823         * config/aarch64/aarch64.c (xgene1_tunings): Add
12824         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12825         (aarch64_mode_valid_for_sched_fusion_p):
12826         Allow 16-byte modes.
12827         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12828         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12829         128-bit modes.
12830         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12831         New pattern.
12832         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12833         * config/aarch64/iterators.md (VQ2): New mode iterator.
12835 2018-06-20  Martin Liska  <mliska@suse.cz>
12837         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12838         Change default ratio from 10 to 8.
12840 2018-06-20  Martin Liska  <mliska@suse.cz>
12842         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12843         New.
12844         (bit_test_cluster::find_bit_tests): Likewise.
12845         (switch_decision_tree::analyze_switch_statement): Find clusters.
12846         * tree-switch-conversion.h (struct jump_table_cluster): Document
12847         hierarchy.
12849 2018-06-20  Martin Liska  <mliska@suse.cz>
12851         * tree-switch-conversion.c (switch_conversion::collect):
12852         Record m_uniq property.
12853         (switch_conversion::expand): Bail out for special conditions.
12854         (group_cluster::~group_cluster): New.
12855         (group_cluster::group_cluster): Likewise.
12856         (group_cluster::dump): Likewise.
12857         (jump_table_cluster::emit): New.
12858         (switch_decision_tree::fix_phi_operands_for_edges): New.
12859         (struct case_node): Remove struct.
12860         (jump_table_cluster::can_be_handled): New.
12861         (case_values_threshold): Moved to header.
12862         (reset_out_edges_aux): Likewise.
12863         (jump_table_cluster::is_beneficial): New.
12864         (bit_test_cluster::can_be_handled): Likewise.
12865         (add_case_node): Remove.
12866         (bit_test_cluster::is_beneficial): New.
12867         (case_bit_test::cmp): New.
12868         (bit_test_cluster::emit): New.
12869         (expand_switch_as_decision_tree_p): Remove.
12870         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12871         (fix_phi_operands_for_edge): Likewise.
12872         (switch_decision_tree::analyze_switch_statement): New.
12873         (compute_cases_per_edge): Move ...
12874         (switch_decision_tree::compute_cases_per_edge): ... here.
12875         (try_switch_expansion): Likewise.
12876         (switch_decision_tree::try_switch_expansion): Likewise.
12877         (record_phi_operand_mapping): Likewise.
12878         (switch_decision_tree::record_phi_operand_mapping): Likewise.
12879         (emit_case_decision_tree): Likewise.
12880         (switch_decision_tree::emit): Likewise.
12881         (balance_case_nodes): Likewise.
12882         (switch_decision_tree::balance_case_nodes): Likewise.
12883         (dump_case_nodes): Likewise.
12884         (switch_decision_tree::dump_case_nodes): Likewise.
12885         (emit_jump): Likewise.
12886         (switch_decision_tree::emit_jump): Likewise.
12887         (emit_cmp_and_jump_insns): Likewise.
12888         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12889         (emit_case_nodes): Likewise.
12890         (switch_decision_tree::emit_case_nodes): Likewise.
12891         (conditional_probability): Remove.
12892         * tree-switch-conversion.h (enum cluster_type): New.
12893         (PRINT_CASE): New.
12894         (struct cluster): Likewise.
12895         (cluster::cluster): Likewise.
12896         (struct simple_cluster): Likewise.
12897         (simple_cluster::simple_cluster): Likewise.
12898         (struct group_cluster): Likewise.
12899         (struct jump_table_cluster): Likewise.
12900         (struct bit_test_cluster): Likewise.
12901         (struct min_cluster_item): Likewise.
12902         (struct case_tree_node): Likewise.
12903         (case_tree_node::case_tree_node): Likewise.
12904         (jump_table_cluster::case_values_threshold): Likewise.
12905         (struct case_bit_test): Likewise.
12906         (struct switch_decision_tree): Likewise.
12907         (struct switch_conversion): Likewise.
12908         (switch_decision_tree::reset_out_edges_aux): Likewise.
12910 2018-06-20  Martin Liska  <mliska@suse.cz>
12912         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12913         (hoist_edge_and_branch_if_true): Likewise.
12914         (expand_switch_using_bit_tests_p): Likewise.
12915         (struct case_bit_test): Likewise.
12916         (case_bit_test_cmp): Likewise.
12917         (emit_case_bit_tests): Likewise.
12918         (switch_conversion::switch_conversion): New class.
12919         (struct switch_conv_info): Remove old struct.
12920         (collect_switch_conv_info): More to ...
12921         (switch_conversion::collect): ... this.
12922         (check_range): Likewise.
12923         (switch_conversion::check_range): Likewise.
12924         (check_all_empty_except_final): Likewise.
12925         (switch_conversion::check_all_empty_except_final): Likewise.
12926         (check_final_bb): Likewise.
12927         (switch_conversion::check_final_bb): Likewise.
12928         (create_temp_arrays): Likewise.
12929         (switch_conversion::create_temp_arrays): Likewise.
12930         (free_temp_arrays): Likewise.
12931         (gather_default_values): Likewise.
12932         (switch_conversion::gather_default_values): Likewise.
12933         (build_constructors): Likewise.
12934         (switch_conversion::build_constructors): Likewise.
12935         (constructor_contains_same_values_p): Likewise.
12936         (switch_conversion::contains_same_values_p): Likewise.
12937         (array_value_type): Likewise.
12938         (switch_conversion::array_value_type): Likewise.
12939         (build_one_array): Likewise.
12940         (switch_conversion::build_one_array): Likewise.
12941         (build_arrays): Likewise.
12942         (switch_conversion::build_arrays): Likewise.
12943         (gen_def_assigns): Likewise.
12944         (switch_conversion::gen_def_assigns): Likewise.
12945         (prune_bbs): Likewise.
12946         (switch_conversion::prune_bbs): Likewise.
12947         (fix_phi_nodes): Likewise.
12948         (switch_conversion::fix_phi_nodes): Likewise.
12949         (gen_inbound_check): Likewise.
12950         (switch_conversion::gen_inbound_check): Likewise.
12951         (process_switch): Use the newly created class.
12952         (switch_conversion::expand): New.
12953         (switch_conversion::~switch_conversion): New.
12954         * tree-switch-conversion.h: New file.
12956 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12958         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12959         tree-vect-patterns.c.
12960         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12961         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
12962         (vect_recog_sad_pattern): Likewise.
12963         (vect_recog_widen_sum_pattern): Likewise.
12964         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
12965         (vect_recog_widen_shift_pattern): Remove the type_in argument.
12966         (vect_recog_rotate_pattern): Likewise.
12967         (vect_recog_mult_pattern): Likewise.
12968         (vect_recog_vector_vector_shift_pattern): Likewise.
12969         (vect_recog_divmod_pattern): Likewise.
12970         (vect_recog_mixed_size_cond_pattern): Likewise.
12971         (vect_recog_bool_pattern): Likewise.
12972         (vect_recog_mask_conversion_pattern): Likewise.
12973         (vect_try_gather_scatter_pattern): Likewise.
12974         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
12975         (vect_recog_over_widening_pattern): Likewise.
12976         (vect_recog_gather_scatter_pattern): Likewise.
12977         (vect_recog_func_ptr): Move from tree-vectorizer.h
12978         (vect_vect_recog_func_ptrs): Move further down the file.
12979         (vect_recog_func): Likewise.  Remove the third argument.
12980         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12981         (vect_pattern_recog_1): Expect the pattern function to do any
12982         necessary target tests.  Also expect it to provide a vector type.
12983         Remove the type_in handling.
12985 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12987         * tree-vect-patterns.c (vect_pattern_detected): New function.
12988         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12989         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12990         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12991         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12992         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12993         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12994         (vect_recog_mask_conversion_pattern)
12995         (vect_try_gather_scatter_pattern): Likewise.
12997 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12999         * tree-vect-patterns.c (vect_get_internal_def): New function.
13000         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13001         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
13002         (search_type_for_mask_1): Use it.
13004 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
13006         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13007         redundant WIDEN_SUM_EXPR handling.
13008         (vect_recog_sad_pattern): Likewise.
13010 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
13012         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13013         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
13014         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
13015         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
13016         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
13018 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
13020         * tree-vect-stmts.c (vectorizable_call): Make sure that we
13021         use the stmt_vec_info of the original bb statement for the
13022         new zero assignment, even if the call is part of a pattern.
13024 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
13026         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
13027         that the sequence is attached to the original statement rather
13028         than the pattern statement.
13029         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
13030         PATTERN_DEF_SEQ from the original statement rather than
13031         the main pattern statement.
13032         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
13033         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
13034         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
13036 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
13038         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
13039         definition statements before the early exit for statements that aren't
13040         live or relevant.
13041         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
13042         split out from...
13043         (vect_transform_loop): ...here.  Process pattern definition
13044         statements without first checking whether the main pattern
13045         statement is live or relevant.
13047 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
13049         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
13050         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
13052 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
13054         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
13055         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
13056         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
13057         (expand_block_compare): Change select_block_compare_mode call.
13058         (expand_strncmp_align_check): Use new functions, fix comment.
13059         (emit_final_str_compare_gpr): New function.
13060         (expand_strn_compare): Refactor and clean up code.
13061         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
13063 2018-06-19  Tony Reix  <tony.reix@atos.com>
13064             Damien Bergamini  <damien.bergamini@atos.com>
13065             David Edelsohn  <dje.gcc@gmail.com>
13067         * collect2.c (static_obj): New variable.
13068         (static_libs): New variable.
13069         (is_in_list): Uncomment declaration.
13070         (main): Track AIX libraries linked statically.
13071         (is_in_list): Uncomment definition.
13072         (scan_prog_file): Don't add AIX shared libraries initializer
13073         to constructor list if linking statically.
13075 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
13077         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
13078         constant.
13079         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
13081 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
13083         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
13084         blocks.
13086 2018-06-19  Martin Liska  <mliska@suse.cz>
13088         * config/i386/i386.c (ix86_can_inline_p): Do not use
13089         ipa_fn_summaries::get_create.
13090         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
13091         get.
13092         (devirtualization_time_bonus): Likewise.
13093         (ipcp_propagate_stage): Likewise.
13094         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13095         (edge_set_predicate): Likewise.
13096         (evaluate_conditions_for_known_args): Likewise.
13097         (evaluate_properties_for_edge): Likewise.
13098         (ipa_call_summary::reset): Tranform to ...
13099         (ipa_call_summary::~ipa_call_summary): ... this.
13100         (ipa_fn_summary::reset): Transform to ...
13101         (ipa_fn_summary::~ipa_fn_summary): ... this.
13102         (ipa_fn_summary_t::remove): Rename to ...
13103         (ipa_fn_summary_t::remove_callees): ... this.
13104         (ipa_fn_summary_t::duplicate): Use placement new
13105         instead of memory copy.
13106         (ipa_call_summary_t::duplicate): Likewise.
13107         (ipa_call_summary_t::remove): Remove.
13108         (dump_ipa_call_summary): Change get_create to get.
13109         (ipa_dump_fn_summary): Dump only when summary exists.
13110         (analyze_function_body): Use symbol_summary::get instead
13111         of get_create.
13112         (compute_fn_summary): Likewise.
13113         (estimate_edge_devirt_benefit): Likewise.
13114         (estimate_edge_size_and_time): Likewise.
13115         (inline_update_callee_summaries): Likewise.
13116         (remap_edge_change_prob): Likewise.
13117         (remap_edge_summaries): Likewise.
13118         (ipa_merge_fn_summary_after_inlining): Likewise.
13119         (write_ipa_call_summary): Likewise.
13120         (ipa_fn_summary_write): Likewise.
13121         (ipa_free_fn_summary): Likewise.
13122         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
13123         (struct ipa_call_summary): Likewise.
13124         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
13125         of get_create.
13126         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
13127         (estimate_size_after_inlining): Likewise.
13128         (estimate_growth): Likewise.
13129         (growth_likely_positive): Likewise.
13130         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13131         (inline_call): Likewise.
13132         * ipa-inline.c (caller_growth_limits): Likewise.
13133         (can_inline_edge_p): Likewise.
13134         (can_inline_edge_by_limits_p): Likewise.
13135         (compute_uninlined_call_time): Likewise.
13136         (compute_inlined_call_time): Likewise.
13137         (want_inline_small_function_p): Likewise.
13138         (edge_badness): Likewise.
13139         (update_caller_keys): Likewise.
13140         (update_callee_keys): Likewise.
13141         (inline_small_functions): Likewise.
13142         (inline_to_all_callers_1): Likewise.
13143         (dump_overall_stats): Likewise.
13144         (early_inline_small_functions): Likewise.
13145         (early_inliner): Likewise.
13146         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13147         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13148         * ipa-pure-const.c (malloc_candidate_p): Likewise.
13149         * ipa-split.c (execute_split_functions): Likewise.
13150         * symbol-summary.h: Likewise.
13151         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13153 2018-06-19  Richard Biener  <rguenther@suse.de>
13155         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
13156         (vectorize_loops): ... here.  Fix dbgcnt handling.
13157         (try_vectorize_loop): Wrap try_vectorize_loop_1.
13159 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
13161         PR target/86197
13162         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
13163         ieee128 argument takes up only one (vector) register, not two (floating
13164         point) registers.
13166 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
13168         * gimplify.c (gimplify_init_constructor): Really never clear for an
13169         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
13171 2018-06-19  Richard Biener  <rguenther@suse.de>
13173         PR tree-optimization/86179
13174         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
13175         after failed recognition.
13177 2018-06-18  Martin Sebor  <msebor@redhat.com>
13179         PR middle-end/85602
13180         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
13181         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
13182         Handle integer subtraction.
13183         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
13184         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
13186 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
13188         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
13189         param from rtx to rtx_insn *.
13190         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
13191         param.
13192         (frv_ifcvt_modify_insn): Likwise.
13193         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
13194         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
13195         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
13196         as_a <rtx_insn *> cast to local "unprotected_region" once
13197         it's been established that it's not NULL or pc_rtx.
13198         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
13199         param "sethi" from rtx to rtx_insn *.
13200         (nds32_group_float_insns): Likewise for param "insn".
13201         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
13202         param.
13203         (vax_output_int_subtract): Likewise.
13204         * config/vax/vax.c (vax_output_int_add): Likewise for param
13205         "insn".
13206         (vax_output_int_subtract): Likewise.
13207         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
13208         (emit_pattern_after): Likewise for param "after".
13209         (emit_insn_after): Likewise.
13210         (emit_jump_insn_after): Likewise.
13211         (emit_call_insn_after): Likewise.
13212         (emit_debug_insn_after): Likewise.
13213         (emit_pattern_before): Likewise for param "before".
13214         (emit_insn_before): Likewise.
13215         (emit_jump_insn_before): Likewise.
13216         * final.c (get_insn_template): Likewise for param "insn", removing
13217         a cast.
13218         * output.h (get_insn_template): Likewise for 2nd param.
13219         * rtl.h (emit_insn_before): Likewise.
13220         (emit_jump_insn_before): Likewise.
13221         (emit_debug_insn_before_noloc): Likewise.
13222         (emit_insn_after): Likewise.
13223         (emit_jump_insn_after): Likewise.
13224         (emit_call_insn_after): Likewise.
13225         (emit_debug_insn_after): Likewise.
13226         (set_insn_deleted): Likewise for param.
13228 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
13230         PR target/85358
13231         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
13232         floating point modes, so that IFmode is numerically greater than
13233         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
13234         to declare the ordering.  This prevents IFmode from being
13235         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
13236         machine.  Include rs6000-modes.h to share the fractional values
13237         between genmodes* and the rest of the compiler.
13238         (IFmode): Likewise.
13239         (KFmode): Likewise.
13240         (TFmode): Likewise.
13241         * config/rs6000/rs6000-modes.h: New file.
13242         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
13243         meaning of rs6000_long_double_size so that 126..128 selects an
13244         appropriate 128-bit floating point type.
13245         (rs6000_option_override_internal): Likewise.
13246         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
13247         (TARGET_LONG_DOUBLE_128): Change the meaning of
13248         rs6000_long_double_size so that 126..128 selects an appropriate
13249         128-bit floating point type.
13250         (LONG_DOUBLE_TYPE_SIZE): Update comment.
13251         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
13252         source and destination to match the standard usage.
13253         (truncifkf2): Likewise.
13254         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
13255         ISA 2.07 to use an explicit clobber, instead of passing in a
13256         temporary.
13257         (copysign<mode>3_soft): Likewise.
13259 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
13261         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13262         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
13263         (vect_slp_analyze_instance_dependence): Likewise.
13264         (vect_enhance_data_refs_alignment): Likewise.
13265         (vect_analyze_data_refs_alignment): Likewise.
13266         (vect_slp_analyze_and_verify_instance_alignment
13267         (vect_analyze_data_ref_accesses): Likewise.
13268         (vect_prune_runtime_alias_test_list): Likewise.
13269         (vect_analyze_data_refs): Likewise.
13270         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
13271         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13272         (vect_analyze_scalar_cycles_1): Likewise.
13273         (vect_get_loop_niters): Likewise.
13274         (vect_analyze_loop_form_1): Likewise.
13275         (vect_update_vf_for_slp): Likewise.
13276         (vect_analyze_loop_operations): Likewise.
13277         (vect_analyze_loop): Likewise.
13278         (vectorizable_induction): Likewise.
13279         (vect_transform_loop): Likewise.
13280         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
13281         * tree-vect-slp.c (vect_analyze_slp): Likewise.
13282         (vect_make_slp_decision): Likewise.
13283         (vect_detect_hybrid_slp): Likewise.
13284         (vect_slp_analyze_operations): Likewise.
13285         (vect_slp_bb): Likewise.
13286         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13287         (vectorizable_bswap): Likewise.
13288         (vectorizable_call): Likewise.
13289         (vectorizable_simd_clone_call): Likewise.
13290         (vectorizable_conversion): Likewise.
13291         (vectorizable_assignment): Likewise.
13292         (vectorizable_shift): Likewise.
13293         (vectorizable_operation): Likewise.
13294         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13296 2018-06-18  Martin Sebor  <msebor@redhat.com>
13298         PR tree-optimization/81384
13299         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13300         * builtins.c (expand_builtin_strnlen): New function.
13301         (expand_builtin): Call it.
13302         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13303         * builtins.def (BUILT_IN_STRNLEN): New.
13304         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13305         Warn for bounds in excess of maximum object size.
13306         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13307         single-value ranges.  Handle strnlen.
13308         (handle_builtin_strlen): Handle strnlen.
13309         (strlen_check_and_optimize_stmt): Same.
13310         * doc/extend.texi (Other Builtins): Document strnlen.
13312 2018-06-18  Maya Rashish  <coypu@sdf.org>
13314         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13315         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13316         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13318         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13319         here to ...
13320         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13322 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13324         * tree.c (escaped_string::escape): Replace cast to char * by
13325         const_cast<char *> (unescaped).
13327 2018-06-18  Nick Clifton  <nickc@redhat.com>
13329         PR 84195
13330         * tree.c (escaped_string): New class.  Converts an unescaped
13331         string into its escaped equivalent.
13332         (warn_deprecated_use): Use the new class to convert the
13333         deprecation message, if present.
13334         (test_escaped_strings): New self test.
13335         (test_c_tests): Add test_escaped_strings.
13336         * doc/extend.texi (deprecated): Add a note that the
13337         deprecation message is affected by the -fmessage-length
13338         option, and that control characters will be escaped.
13339         (#pragma GCC error): Document this pragma.
13340         (#pragma GCC warning): Likewise.
13341         * doc/invoke.texi (-fmessage-length): Document this option's
13342         effect on the #warning and #error preprocessor directives and
13343         the deprecated attribute.
13345 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
13347         * tree.c (decl_value_expr_lookup): Revert latest change.
13348         (decl_value_expr_insert): Likewise.
13350 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
13352         * gimplify.c (nonlocal_vlas): Delete.
13353         (nonlocal_vla_vars): Likewise.
13354         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13355         referenced VLAs.
13356         (gimplify_body): Do not create and destroy nonlocal_vlas.
13357         * tree-nested.c: Include diagnostic.h.
13358         (use_pointer_in_frame): Tweak.
13359         (lookup_field_for_decl): Add assertion and declare the transformation.
13360         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13361         internal error when the reference is in a wrong context.  Do not
13362         create a debug decl by default.
13363         (note_nonlocal_block_vlas): Delete.
13364         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13365         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
13366         create a debug decl by default.
13367         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13368         call is in a wrong context.
13369         (fixup_vla_decls): New function.
13370         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
13371         debug variables were created.
13372         * tree.c (decl_value_expr_lookup): Add checking assertion.
13373         (decl_value_expr_insert): Likewise.
13375 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
13377         PR middle-end/82479
13378         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13379         * tree-scalar-evolution.c (interpret_expr): Likewise.
13380         (expression_expensive_p): Likewise.
13381         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13382         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13383         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13384         (ssa_defined_by_minus_one_stmt_p): New.
13386 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
13388         PR middle-end/64946
13389         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13390         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13391         * dojump.c (do_jump): Likewise.
13392         * expr.c (expand_expr_real_2): Check operand type's sign.
13393         * fold-const.c (const_unop): Handle ABSU_EXPR.
13394         (fold_abs_const): Likewise.
13395         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13396         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13397         (strip_sign_op_1): Likesise.
13398         * match.pd: Add new pattern to generate ABSU_EXPR.
13399         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13400         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13401         * tree-eh.c (operation_could_trap_helper_p): Likewise.
13402         * tree-inline.c (estimate_operator_cost): Likewise.
13403         * tree-pretty-print.c (dump_generic_node): Likewise.
13404         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13405         * tree.def (ABSU_EXPR): New.
13407 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
13409         PR middle-end/86095
13410         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13411         documented as preserved for backward compatibility only.
13412         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13414         PR rtl-optimization/86108
13415         * bb-reorder.c (create_forwarder_block): Renamed to ...
13416         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
13417         jump from new landing pad to the second part.
13418         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13419         Adjust callers.
13421 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
13423         PR middle-end/85878
13424         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13425         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13426         Only call store_expr for halves if the mode is the same.
13428         PR middle-end/86123
13429         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13430         Fix up comment formatting.
13432 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13434         * typed-splay-tree.h (typed_splay_tree::remove): New function.
13435         (typed_splay_tree::closure,
13436         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13437         (typed_splay_tree::typed_splay_tree,
13438         typed_splay_tree::operator =): Declared private.
13439         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13440         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13441         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13442         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13443         typed_splay_tree::splay_tree_splay,
13444         typed_splay_tree::splay_tree_foreach_helper,
13445         typed_splay_tree::splay_tree_insert,
13446         typed_splay_tree::splay_tree_remove,
13447         typed_splay_tree::splay_tree_lookup,
13448         typed_splay_tree::splay_tree_predecessor,
13449         typed_splay_tree::splay_tree_successor,
13450         typed_splay_tree::splay_tree_min,
13451         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13452         (typed_splay_tree::root, typed_splay_tree::comp,
13453         typed_splay_tree::delete_key,
13454         typed_splay_tree::delete_value): New data members.
13455         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13456         typed_splay_tree::remove.
13458 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
13460         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13461         -mginv and -mno-ginv to the assembler.
13462         * config/mips/mips.opt (-mcrc): New option.
13463         (-mginv): Likewise.
13464         * doc/invoke.text (-mcrc): Document.
13465         (-mginv): Likewise.
13467 2018-06-15  Nick Clifton  <nickc@redhat.com>
13469         PR 84195
13470         * tree.c (escaped_string): New class.  Converts an unescaped
13471         string into its escaped equivalent.
13472         (warn_deprecated_use): Use the new class to convert the
13473         deprecation message, if present.
13474         (test_escaped_strings): New self test.
13475         (test_c_tests): Add test_escaped_strings.
13476         * doc/extend.texi (deprecated): Add a note that the
13477         deprecation message is affected by the -fmessage-length
13478         option, and that control characters will be escaped.
13479         (#pragma GCC error): Document this pragma.
13480         (#pragma GCC warning): Likewise.
13481         * doc/invoke.texi (-fmessage-length): Document this option's
13482         effect on the #warning and #error preprocessor directives and
13483         the deprecated attribute.
13485 2018-06-15  Richard Biener  <rguenther@suse.de>
13487         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13488         here, also noting vector size used.
13489         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
13490         size used in MSG_OPTIMIZED_LOCATIONS dump.
13491         (pass_slp_vectorize::execute): Adjust.
13493 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
13495         PR target/85968
13496         * config/arc/arc.c (arc_return_address_register): Fix
13497         if-condition.
13499 2018-06-15  Richard Biener  <rguenther@suse.de>
13501         PR middle-end/86159
13502         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13503         leave useless conversion stripping to force_gimple_operand_gsi.
13504         (gimplify_build2): Likewise.
13505         (gimplify_build1): Likewise.
13507 2018-06-15  Richard Biener  <rguenther@suse.de>
13509         PR middle-end/86076
13510         * tree-cfg.c (move_stmt_op): unshare invariant addresses
13511         before adjusting their block.
13513 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13515         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13516         multilibs for *-*-rtems*.
13517         * config/riscv/t-rtems: New file.
13519 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
13521         PR middle-end/86122
13522         * match.pd ((A +- CST1) +- CST2): Punt if last resort
13523         unsigned_type_for returns NULL.
13525         PR target/85945
13526         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13527         subregs of multi-word pseudos unless the float mode has word size.
13529 2018-06-14  Richard Biener  <rguenther@suse.de>
13531         PR middle-end/86139
13532         * tree-vect-generic.c (build_word_mode_vector_type): Remove
13533         duplicate and harmful type_hash_canon.
13534         * tree.c (type_hash_canon): Assert we didn't find ourselves.
13536 2018-06-14  Richard Biener  <rguenther@suse.de>
13538         PR ipa/86124
13539         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13540         NULL cgraph_node.
13542 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13544         * config/rtems.h (STDINT_LONG32): Define.
13546 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
13547             Prachi Godbole  <prachi.godbole@imgtec.com>
13549         * config/mips/mips-cpus.def: Define P6600.
13550         * config/mips/mips-tables.opt: Regenerate.
13551         * config/mips/mips.c (mips_ucbranch_type): New enum.
13552         (mips_rtx_cost_data): Add support for P6600.
13553         (mips_issue_rate): Likewise.
13554         (mips_multipass_dfa_lookahead): Likewise.
13555         (mips_avoid_hazard): Likewise.
13556         (mips_reorg_process_insns): Likewise.
13557         (mips_classify_branch_p6600): New function.
13558         * config/mips/mips.h (TUNE_P6600): New define.
13559         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13560         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13561         * config/mips/mips.md: Include p6600.md.
13562         (processor): Add p6600.
13563         * config/mips/p6600.md: New file.
13564         * doc/invoke.texi: Add p6600 to supported architectures.
13566 2018-06-13  Martin Sebor  <msebor@redhat.com>
13568         PR tree-optimization/86114
13569         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13570         of integer types.
13571         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13573 2018-06-13  Richard Biener  <rguenther@suse.de>
13575         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13576         Properly set vector type of the intermediate stmt.
13577         * tree-vect-stmts.c (vectorizable_operation): The destination
13578         var always has vectype_out type.
13580 2018-06-13  Jeff Law  <law@redhat.com>
13582         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13583         integer 0 for argument to print_rtl_with_bb.
13584         (rl78_reorg): Likewise.
13586 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
13588         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13589         from rtx to rtx_insn *.
13590         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13591         "label".
13592         (add_sched_insns_for_speculation): Likewise for local "target",
13593         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13594         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13595         from rtx_insn ** to rtx_code_label **.
13596         (reorg_emit_nops): Likewise.
13597         (c6x_reorg): Likewise for local "call_labels".
13598         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13599         rtx to rtx_insn *.
13600         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13601         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13602         the loops over LABEL_REFS.
13603         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13604         braf_label.
13605         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13606         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13607         (split_branches): Strengthen local "olabel" from rtx to
13608         rtx_insn *, adding a safe_as_a cast.
13609         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13610         to "rtx_insn *".
13611         (add_insn_after): Likewise for first two params.
13612         (add_insn_before): Likewise.
13613         (remove_insn): Likewise for param.
13614         (emit_pattern_before_noloc): Likewise for second and third params.
13615         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13616         (emit_call_insn_before_noloc): Likewise.
13617         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13618         to "rtx_insn *".
13619         (emit_barrier_before): Likewise.
13620         (emit_label_before): Strengthen "label" param from "rtx" to
13621         "rtx_code_label *".  Strengthen "before" param from "rtx" to
13622         "rtx_insn *".
13623         (emit_insn_after_1): Strengthen "after" param from "rtx" to
13624         "rtx_insn *".
13625         (emit_pattern_after_noloc): Likewise.
13626         (emit_insn_after_noloc): Likewise.
13627         (emit_jump_insn_after_noloc): Likewise.
13628         (emit_call_insn_after_noloc): Likewise.
13629         (emit_debug_insn_after_noloc): Likewise.
13630         (emit_barrier_after): Likewise.
13631         (emit_label_after): Likewise for both params.
13632         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
13633         "loc" param from "int" to "location_t".
13634         (emit_insn_after_setloc): Likewise.
13635         (emit_jump_insn_after_setloc): Likewise.
13636         (emit_call_insn_after_setloc): Likewise.
13637         (emit_debug_insn_after_setloc): Likewise.
13638         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
13639         "loc" param from "int" to "location_t".
13640         (emit_pattern_before): Convert NULL_RTX to NULL.
13641         (emit_insn_before_setloc): Convert "loc" param from "int" to
13642         "location_t".
13643         (emit_jump_insn_before_setloc): Likewise.
13644         (emit_call_insn_before_setloc): Likewise.
13645         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13646         rtx_insn *.  Convert "loc" param from "int" to "location_t".
13647         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13648         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13649         Convert 3rd param from "int" to "location_t".
13650         (emit_barrier_before, emit_barrier_after, next_real_insn):
13651         Strengthen param from rtx to rtx_insn *.
13652         (emit_label_before): Strengthen 1st param from "rtx" to
13653         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
13654         "rtx_insn *".
13655         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13656         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13657         Strengthen 2nd param from "rtx" to "rtx_insn *".
13658         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13659         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13660         Likewise. Convert 3rd param from "int" to "location_t".
13661         (emit_label_after): Strengthen 1st param from "rtx" to
13662         "rtx_code_label *".
13663         (next_real_insn, remove_insn): Strengthen param from "rtx" to
13664         "rtx_insn *".
13665         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13666         from "rtx" to "rtx_insn *".
13668 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
13670         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13671         bodies streamed in with -Q.
13672         * dumpfile.c (dump_files): Add lto-stream-out dump file.
13673         * dumpfile.h (tree_dump_index): Add lto_stream_out.
13674         * gimple-streamer-out.c: Include gimple-pretty-print.h
13675         (output_bb): Dump stmts streamed.
13676         * lto-section-out.c: Include print-tree.h
13677         (lto_begin_section): Dump sections created.
13678         (lto_output_decl_index): Dump decl encoded.
13679         * lto-streamer-out.c: Include print-tree.h
13680         (create_output_block): Dump output block created.
13681         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13682         (output_function): Dump function output.
13683         (output_constructor): Dump constructor streamed.
13684         (write_global_stream): Output indexes encoded.
13685         (produce_asm_for_decls): Dump streams encoded.
13686         * lto-streamer.c (streamer_dump_file): New global var.
13687         * lto-streamer.h (streamer_dump_file): Declare.
13688         * passes.c (ipa_write_summaries): Initialize streamer dump.
13689         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13690         in.
13692 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
13694         PR target/86048
13695         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13696         offsets for register save directives.  Emit a second batch of save
13697         directives, if need be, when the function accesses prior frames.
13699 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13701         * config/arc/fpu.md (fmasf4): Force operand to register.
13702         (fnmasf4): Likewise.
13704 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13706         * config/arc/arc-protos.h (arc_pad_return): Remove.
13707         * config/arc/arc.c (machine_function): Remove force_short_suffix
13708         and size_reason.
13709         (arc_print_operand): Adjust printing of '&'.
13710         (arc_verify_short): Remove conditional printing of short suffix.
13711         (arc_final_prescan_insn): Remove reference to size_reason.
13712         (pad_return): New function.
13713         (arc_reorg): Call pad_return.
13714         (arc_pad_return): Remove.
13715         (arc_init_machine_status): Remove reference to force_short_suffix.
13716         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13717         (attr length): When attribute iscompact is true force to 2
13718         regardless; in the case of maybe check if we want to force the
13719         instruction to have 4 bytes length.
13720         (nopv): Change it to generate 4 byte long nop as well.
13721         (blockage): New pattern.
13722         (simple_return): Remove call to arc_pad_return.
13723         (p_return_i): Likewise.
13725 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13727         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13729 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13731         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13732         ARC cores.
13734 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13736         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13737         for ARC700 and ARCv2.
13739 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
13741         PR target/86076
13742         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13743         operands[2] instead of operands[1].
13746 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
13748         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13749         case, check whether the outer register overlaps an unallocatable
13750         register, not just whether it fits the required class.
13752 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
13754         * poly-int.h (can_div_trunc_p): Add new overload in which all values
13755         are poly_ints.
13756         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13757         (memrefs_conflict_p): Likewise.
13758         (init_alias_analysis): Likewise.
13759         * cfgexpand.c (expand_debug_expr): Likewise.
13760         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13761         * cse.c (fold_rtx): Likewise.
13762         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13763         * expr.c (emit_block_move_hints): Likewise.
13764         (clear_storage_hints, push_block, emit_push_insn): Likewise.
13765         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13766         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13767         (emit_group_store): Likewise.
13768         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
13769         to read the PRE/POST_MODIFY increment.
13770         * calls.c (store_one_arg): Use strip_offset.
13771         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13772         poly_int_rtx_p.
13773         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13774         by a VEC_SELECT.
13775         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13776         (simplify_binary_operation_1): Extend CONST_INT handling to
13777         poly_int_rtx_p.
13778         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13779         than a HOST_WIDE_INT.
13780         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13781         poly_int64.
13782         (adjust_mems, add_stores): Update accodingly.
13783         (vt_canonicalize_addr): Track polynomial offsets.
13784         (emit_note_insn_var_location): Likewise.
13785         (vt_add_function_parameter): Likewise.
13786         (vt_initialize): Likewise.
13788 2018-06-12  Jeff Law  <law@redhat.com>
13790         * config.gcc (alpha*-*-freebsd*): Remove.
13791         * config/alpha/freebsd.h: Remove.
13793 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
13795         PR other/69968
13796         * spellcheck-tree.c (levenshtein_distance): Rename to...
13797         (get_edit_distance): ...this, and update for underlying renaming.
13798         * spellcheck-tree.h (levenshtein_distance): Rename to...
13799         (get_edit_distance): ...this.
13800         * spellcheck.c (levenshtein_distance): Rename to...
13801         (get_edit_distance): ...this.  Convert from Levenshtein distance
13802         to Damerau-Levenshtein distance by supporting transpositions of
13803         adjacent characters.  Rename "v1" to "v_next" and "v0" to
13804         "v_one_ago".
13805         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13806         (selftest::test_edit_distance_unit_test_oneway): ...this, and
13807         update for underlying renaming.
13808         (selftest::levenshtein_distance_unit_test): Rename to...
13809         (selftest::test_get_edit_distance_unit): ...this, and update for
13810         underlying renaming.
13811         (selftest::test_find_closest_string): Add example from PR 69968
13812         where transposition helps
13813         (selftest::test_metric_conditions): Update for renaming.
13814         (selftest::test_metric_conditions): Likewise.
13815         (selftest::spellcheck_c_tests): Likewise.
13816         * spellcheck.h (levenshtein_distance): Rename both overloads to...
13817         (get_edit_distance): ...this.
13818         (best_match::consider): Update for renaming.
13820 2018-06-12  Martin Sebor  <msebor@redhat.com>
13822         PR tree-optimization/85259
13823         * builtins.c (compute_objsize): Handle constant offsets.
13824         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13825         true iff a warning has been issued.
13826         * gimple.h (gimple_nonartificial_location): New function.
13827         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13828         gimple_nonartificial_location and handle -Wno-system-headers.
13829         (handle_builtin_stxncpy): Same.
13831 2018-06-12  Martin Sebor  <msebor@redhat.com>
13833         PR c/85931
13834         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13836 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
13838         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13839         BUILTIN_VEC_XST entries for pointer to double and long long.
13841 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
13843         PR target/85990
13844         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13845         Update comments.
13846         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13847         Likewise.
13849 2018-06-12  Martin Liska  <mliska@suse.cz>
13851         * doc/options.texi: Document IntegerRange.
13853 2018-06-12  Martin Liska  <mliska@suse.cz>
13855         * config/i386/i386.opt: Make MPX-related options as Deprecated.
13856         * opt-functions.awk: Handle Deprecated flag.
13857         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13858         and report error.
13859         (read_cmdline_option): Report warning for a deprecated option.
13860         * opts.h (struct cl_option): Add new field cl_deprecated.
13861         (CL_ERR_DEPRECATED): New.
13863 2018-06-12  Martin Liska  <mliska@suse.cz>
13865         * doc/options.texi: Document Deprecated option flag.
13867 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13869         * config/arc/arc-arch.h (arc_extras): New enum.
13870         (arc_cpu_t):Add field extra.
13871         (arc_cpu_types): Consider the extras.
13872         * config/arc/arc-cpus.def: Add extras info.
13873         * config/arc/arc-opts.h (processor_type): Consider extra field.
13874         * config/arc/arc.c (arc_override_options): Handle extra field.
13876 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13878         * config/arc/arc-arch.h: Update ARC_OPTX macro.
13879         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13880         field.
13881         * config/arc/arc.c (arc_init): Update pic warning.
13882         (irq_range): Update irq range parsing warnings.
13883         (arc_override_options): Update various warning messages.
13884         (arc_handle_aux_attribute): Likewise.
13886 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
13888         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13890 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13892         * doc/sourcebuild.texi: Document usage of line number 0 in verify
13893         compiler messages directives.
13895 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
13897         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13898         * config/mips/mips-tables.opt: Regenerate.
13899         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13900         mips64r6.
13901         * doc/invoke.texi: Document -march=i6500.
13903 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
13905         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13906         (i6400_gpmul): Add cpu_unit.
13907         (i6400_gpdiv): Likewise.
13908         (i6400_msa_add_d): Update reservations.
13909         (i6400_msa_int_add) Likewise.
13910         (i6400_msa_short_logic3) Likewise.
13911         (i6400_msa_short_logic2) Likewise.
13912         (i6400_msa_short_logic) Likewise.
13913         (i6400_msa_move) Likewise.
13914         (i6400_msa_cmp) Likewise.
13915         (i6400_msa_short_float2) Likewise.
13916         (i6400_msa_div_d) Likewise.
13917         (i6400_msa_long_logic1) Likewise.
13918         (i6400_msa_long_logic2) Likewise.
13919         (i6400_msa_mult) Likewise.
13920         (i6400_msa_long_float2) Likewise.
13921         (i6400_msa_long_float4) Likewise.
13922         (i6400_msa_long_float5) Likewise.
13923         (i6400_msa_long_float8) Likewise.
13924         (i6400_fpu_fadd): Include frint type.
13925         (i6400_fpu_store): New define_insn_reservation.
13926         (i6400_fpu_load): Likewise.
13927         (i6400_fpu_move): Likewise.
13928         (i6400_fpu_fcmp): Likewise.
13929         (i6400_fpu_fmadd): Likewise.
13930         (i6400_int_mult): Include imul3nc type and update reservation.
13931         (i6400_int_div): Include idiv3 type and update reservation.
13932         (i6400_int_load): Update to check type not move_type.
13933         (i6400_int_store): Likewise.
13934         (i6400_int_prefetch): Set zero latency.
13936 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
13938         * gcc.c: Document new %@{...} sequence.
13939         (LINK_COMMAND_SPEC): Use it for the -L switches.
13940         (cpp_unique_options): Use it for the -I switches.
13941         (at_file_argbuf): New global variable.
13942         (in_at_file): Likewise.
13943         (alloc_args): Create at_file_argbuf.
13944         (clear_args): Truncate at_file_argbuf.
13945         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13946         (open_at_file): New function.
13947         (close_at_file): Likewise.
13948         (create_at_file): Delete.
13949         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13950         <'o'>: Likewise.
13951         <'@'>: New case.
13952         (validate_switches_from_spec): Deal with %@{...} sequence.
13953         (validate_switches): Likewise.
13954         (driver::finalize): Call clear_args.
13956 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
13958         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13960 2018-06-11  Martin Sebor  <msebor@redhat.com>
13962         * doc/invoke.texi (-Wall): List -Wc++17-compat.
13963         (Wno-class-memaccess): Add @opindex.
13964         (Wno-templates, Wno-multiple-inheritance): Same.
13965         (Wno-virtual-inheritance, Wno-namespaces): Same.
13966         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13967         (Wno-format-overflow, Wno-format-truncation): Same.
13968         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13969         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13970         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13971         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13972         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13973         (Wno-misspelled-isr): Same.
13975 2018-06-11  Martin Sebor  <msebor@redhat.com>
13977         * PR tree-optimization/86083
13978         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13980 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
13982         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13984 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
13986         PR target/85755
13987         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13988         on the correct operand.
13989         (*movdi_internal64): Ditto.
13991 2018-06-11  Martin Liska  <mliska@suse.cz>
13993         PR tree-optimization/86089
13994         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13996 2018-06-11  Julia Koval  <julia.koval@intel.com>
13998         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13999         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
14000         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
14002 2018-06-11  Olivier Hainque  <hainque@adacore.com>
14004         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
14005         for Ada with strict dwarf2.
14007 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
14009         PR target/85755
14010         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
14011         addresses.
14013 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
14015         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
14017 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
14019         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
14020         TARGET_ELF.
14022 2018-06-08  Martin Liska  <mliska@suse.cz>
14024         * tree-cfg.h (debug_function): Fix argument type to match
14025         implementation.
14027 2018-06-08  Martin Liska  <mliska@suse.cz>
14029         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
14030         Remove usage of MPX-related (and removed) fields.
14031         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
14033 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
14035         * cfg.c (debug): Use TDF_NONE rather than 0.
14036         * cfghooks.c (debug): Likewise.
14037         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
14038         (struct dump_option_value_info): Convert to...
14039         (struct kv_pair): ...this template type.
14040         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
14041         rather than 0.
14042         (optinfo_verbosity_options): Likewise.
14043         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
14044         OPTGROUP_NONE.
14045         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
14046         than int for "optgroup_flags" param.
14047         (dump_generic_expr_loc): Use dump_flags_t rather than int for
14048         "dump_kind" param.
14049         (dump_dec): Likewise.
14050         (dump_finish): Use TDF_NONE rather than 0.
14051         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
14052         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
14053         than 0.  Update for change to option_ptr.
14054         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
14055         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
14056         0.  Update for changes to optinfo_verbosity_options and
14057         optgroup_options.
14058         (opt_info_switch_p): Convert optgroup_flags from int to
14059         optgroup_flags_t.
14060         (dump_basic_block): Use dump_flags_t rather than int
14061         for "dump_kind" param.
14062         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
14063         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
14064         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
14065         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
14066         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
14067         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
14068         TDF_NONE): Convert from macros to...
14069         (enum dump_flag): ...this new enum.
14070         (dump_flags_t): Update to use enum.
14071         (operator|, operator&, operator~, operator|=, operator&=):
14072         Implement for dump_flags_t.
14073         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
14074         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
14075         Convert from macros to...
14076         (enum optgroup_flag): ...this new enum.
14077         (optgroup_flags_t): New typedef.
14078         (operator|, operator|=): Implement for optgroup_flags_t.
14079         (struct dump_file_info): Convert field "alt_flags" to
14080         dump_flags_t.  Convert field "optgroup_flags" to
14081         optgroup_flags_t.
14082         (dump_basic_block): Use dump_flags_t rather than int for param.
14083         (dump_generic_expr_loc): Likewise.
14084         (dump_dec): Likewise.
14085         (dump_register): Convert param "optgroup_flags" to
14086         optgroup_flags_t.
14087         (opt_info_enable_passes): Likewise.
14088         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
14089         than 0.
14090         * gimple-pretty-print.c (debug): Likewise.
14091         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
14092         (merged_store_group::apply_stores): Likewise.
14093         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
14094         * gimple.c (verify_gimple_pp): Likewise.
14095         * graphite-poly.c (print_pbb_body): Likewise.
14096         * passes.c (pass_manager::register_one_dump_file): Convert
14097         local "optgroup_flags" to optgroup_flags_t.
14098         * print-tree.c (print_node): Use TDF_NONE rather than 0.
14099         (debug): Likewise.
14100         (debug_body): Likewise.
14101         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
14102         to optgroup_flags_t.
14103         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
14104         than 0.
14105         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
14106         (convert_mult_to_fma): Likewise.
14107         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
14108         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
14109         * tree-vect-data-refs.c (dump_lower_bound): Convert param
14110         "dump_kind" to dump_flags_t.
14112 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
14114         * config/rs6000/rs6000.c (min, max): Delete.
14116 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
14118         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
14119         -mabi=spe and -mabi=no-spe.
14121 2018-06-08  Martin Liska  <mliska@suse.cz>
14123         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
14124         where we expect an existing summary.
14126 2018-06-08  Martin Liska  <mliska@suse.cz>
14128         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
14129         * ipa-inline.h (estimate_edge_growth): Likewise.
14131 2018-06-08  Martin Liska  <mliska@suse.cz>
14133         * cgraph.c (function_version_hasher::hash): Use
14134         cgraph_node::get_uid ().
14135         (function_version_hasher::equal):
14136         * cgraph.h (cgraph_node::get_uid): New method.
14137         * ipa-inline.c (update_caller_keys): Use
14138         cgraph_node::get_uid ().
14139         (update_callee_keys): Likewise.
14140         * ipa-utils.c (searchc): Likewise.
14141         (ipa_reduced_postorder): Likewise.
14142         * lto-cgraph.c (input_node): Likewise.
14143         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
14144         * symbol-summary.h (symtab_insertion): Likewise.
14145         (symtab_removal): Likewise.
14146         (symtab_duplication): Likewise.
14147         * tree-pretty-print.c (dump_function_header): Likewise.
14148         * tree-sra.c (convert_callers_for_node): Likewise.
14150 2018-06-08  Martin Liska  <mliska@suse.cz>
14152         * cgraph.c (symbol_table::create_edge): Always assign a new
14153         unique number.
14154         (symbol_table::free_edge): Do not recycle numbers.
14155         * cgraph.h (cgraph_edge::get): New method.
14156         * symbol-summary.h (symtab_removal): Use it.
14157         (symtab_duplication): Likewise.
14158         (call_summary::hashable_uid): Remove.
14160 2018-06-08  Martin Liska  <mliska@suse.cz>
14162         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
14163         (initialize_growth_caches): Remove.
14164         (free_growth_caches): Likewise.
14165         (do_estimate_edge_time): Use edge_growth_cache.
14166         (do_estimate_edge_size): Likewise.
14167         (do_estimate_edge_hints): Likewise.
14168         * ipa-inline.c (reset_edge_caches): Likewise.
14169         (recursive_inlining): Likewise.
14170         (inline_small_functions): Likewise.
14171         * ipa-inline.h (initialize_growth_caches): Remove.
14172         (estimate_edge_size): Likewise.
14173         (estimate_edge_time): Likewise.
14174         (estimate_edge_hints): Likewise.
14175         (reset_edge_growth_cache): Likewise.
14176         * symbol-summary.h (call_summary::remove): New method.
14178 2018-06-08  Martin Liska  <mliska@suse.cz>
14180         * ipa-cp.c (class edge_clone_summary): New summary.
14181         (grow_edge_clone_vectors): Remove.
14182         (ipcp_edge_duplication_hook): Remove.
14183         (class edge_clone_summary_t): New call_summary class.
14184         (ipcp_edge_removal_hook): Remove.
14185         (edge_clone_summary_t::duplicate): New function.
14186         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
14187         (create_specialized_node): Likewise.
14188         (ipcp_driver): Initialize edge_clone_summaries and do not
14189         register hooks.
14191 2018-06-08  Martin Liska  <mliska@suse.cz>
14193         * symbol-summary.h (get): New function.
14194         (call_summary::m_initialize_when_cloning): New class member.
14196 2018-06-08  Martin Liska  <mliska@suse.cz>
14198         * cgraph.c (cgraph_node::remove): Do not recycle uid.
14199         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
14200         (symbol_table::allocate_cgraph_symbol): Do not set uid.
14201         * passes.c (uid_hash_t): Record removed_nodes by their uids.
14202         (remove_cgraph_node_from_order): Use the removed_nodes set.
14203         (do_per_function_toporder): Likwise.
14204         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
14205         instead of summary_uid.
14206         (symtab_removal): Likewise.
14207         (symtab_duplication): Likewise.
14209 2018-06-08  Martin Liska  <mliska@suse.cz>
14211         * ipa-cp.c (ipcp_store_bits_results): Use
14212         ipcp_transformation_sum.
14213         (ipcp_store_vr_results): Likewise.
14214         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
14215         to ...
14216         (ipcp_transformation_initialize): ... this.
14217         (ipa_set_node_agg_value_chain):
14218         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
14219         (write_ipcp_transformation_info): Likewise.
14220         (read_ipcp_transformation_info): Likewise.
14221         (ipcp_update_bits): Likewise.
14222         (ipcp_update_vr): Likewise.
14223         (ipcp_transform_function): Likewise.
14224         * ipa-prop.h: Rename ipcp_transformation_summary to
14225         ipcp_transformation.
14226         (class ipcp_transformation_t): New function summary.
14227         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
14228         (ipa_get_agg_replacements_for_node): Likewise.
14230 2018-06-08  Martin Liska  <mliska@suse.cz>
14232         * ipa-pure-const.c (struct funct_state_d): Do it class instead
14233         of struct.
14234         (class funct_state_summary_t): New function_summary class.
14235         (has_function_state): Remove.
14236         (get_function_state): Likewise.
14237         (set_function_state): Likewise.
14238         (add_new_function): Likewise.
14239         (funct_state_summary_t::insert): New function.
14240         (duplicate_node_data): Remove.
14241         (remove_node_data): Remove.
14242         (funct_state_summary_t::duplicate): New function.
14243         (register_hooks): Create new funct_state_summaries.
14244         (pure_const_generate_summary): Use it.
14245         (pure_const_write_summary): Likewise.
14246         (pure_const_read_summary): Likewise.
14247         (propagate_pure_const): Likewise.
14248         (propagate_nothrow): Likewise.
14249         (dump_malloc_lattice): Likewise.
14250         (propagate_malloc): Likewise.
14251         (execute): Do not register hooks, just remove summary
14252         instead.
14253         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
14254         constructor.
14256 2018-06-08  Martin Liska  <mliska@suse.cz>
14258         * ipa-reference.c (remove_node_data): Remove.
14259         (duplicate_node_data): Likewise.
14260         (class ipa_ref_var_info_summary_t): New class.
14261         (class ipa_ref_opt_summary_t): Likewise.
14262         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
14263         (get_reference_optimization_summary): Use
14264         ipa_ref_opt_sum_summaries.
14265         (set_reference_vars_info): Remove.
14266         (set_reference_optimization_summary): Likewise.
14267         (ipa_init): Create summaries.
14268         (init_function_info): Use function summary.
14269         (ipa_ref_opt_summary_t::duplicate): New function.
14270         (ipa_ref_opt_summary_t::remove): New function.
14271         (get_read_write_all_from_node): Fix GNU coding style.
14272         (propagate): Use function summary.
14273         (write_node_summary_p): Fix GNU coding style.
14274         (stream_out_bitmap): Likewise.
14275         (ipa_reference_read_optimization_summary): Use function summary.
14276         (ipa_reference_c_finalize): Do not release hooks.
14278 2018-06-08  Martin Liska  <mliska@suse.cz>
14280         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
14281         (analyze_function_body): Extract multiple calls of get_create.
14282         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14283         * ipa-inline.c (recursive_inlining): Use ::get method.
14284         * ipa-inline.h (estimate_edge_growth): Likewise.
14286 2018-06-08  Martin Liska  <mliska@suse.cz>
14288         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14289         HSA_INVALID.
14290         (hsa_function_summary::hsa_function_summary): Use the new enum
14291         value.
14292         (hsa_gpu_implementation_p): Use hsa_summaries::get.
14293         * hsa-gen.c (hsa_get_host_function): Likewise.
14294         (get_brig_function_name): Likewise.
14295         * ipa-hsa.c (process_hsa_functions): Likewise.
14296         (ipa_hsa_write_summary): Likewise.
14297         * symbol-summary.h (symtab_duplication): Use ::get function/
14298         (get): New function.
14300 2018-06-08  Martin Liska  <mliska@suse.cz>
14302         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14303         of get.
14304         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14305         (hsa_register_kernel): Likewise.
14306         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14307         * hsa-gen.c (hsa_get_host_function): Likewise.
14308         (get_brig_function_name): Likewise.
14309         (generate_hsa): Likewise.
14310         (pass_gen_hsail::execute): Likewise.
14311         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14312         (devirtualization_time_bonus): Likewise.
14313         (ipcp_propagate_stage): Likewise.
14314         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14315         (edge_set_predicate): Likewise.
14316         (evaluate_conditions_for_known_args): Likewise.
14317         (evaluate_properties_for_edge): Likewise.
14318         (ipa_fn_summary::reset): Likewise.
14319         (ipa_fn_summary_t::duplicate): Likewise.
14320         (dump_ipa_call_summary): Likewise.
14321         (ipa_dump_fn_summary): Likewise.
14322         (analyze_function_body): Likewise.
14323         (compute_fn_summary): Likewise.
14324         (estimate_edge_devirt_benefit): Likewise.
14325         (estimate_edge_size_and_time): Likewise.
14326         (estimate_calls_size_and_time): Likewise.
14327         (estimate_node_size_and_time): Likewise.
14328         (inline_update_callee_summaries): Likewise.
14329         (remap_edge_change_prob): Likewise.
14330         (remap_edge_summaries): Likewise.
14331         (ipa_merge_fn_summary_after_inlining): Likewise.
14332         (ipa_update_overall_fn_summary): Likewise.
14333         (read_ipa_call_summary): Likewise.
14334         (inline_read_section): Likewise.
14335         (write_ipa_call_summary): Likewise.
14336         (ipa_fn_summary_write): Likewise.
14337         (ipa_free_fn_summary): Likewise.
14338         * ipa-hsa.c (process_hsa_functions): Likewise.
14339         (ipa_hsa_write_summary): Likewise.
14340         (ipa_hsa_read_section): Likewise.
14341         * ipa-icf.c (sem_function::merge): Likewise.
14342         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14343         (do_estimate_edge_time): Likewise.
14344         (estimate_size_after_inlining): Likewise.
14345         (estimate_growth): Likewise.
14346         (growth_likely_positive): Likewise.
14347         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14348         (inline_call): Likewise.
14349         * ipa-inline.c (caller_growth_limits): Likewise.
14350         (can_inline_edge_p): Likewise.
14351         (can_inline_edge_by_limits_p): Likewise.
14352         (compute_uninlined_call_time): Likewise.
14353         (compute_inlined_call_time): Likewise.
14354         (want_inline_small_function_p): Likewise.
14355         (edge_badness): Likewise.
14356         (update_caller_keys): Likewise.
14357         (update_callee_keys): Likewise.
14358         (recursive_inlining): Likewise.
14359         (inline_small_functions): Likewise.
14360         (inline_to_all_callers_1): Likewise.
14361         (dump_overall_stats): Likewise.
14362         (early_inline_small_functions): Likewise.
14363         (early_inliner): Likewise.
14364         * ipa-inline.h (estimate_edge_growth): Likewise.
14365         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14366         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14367         * ipa-prop.h (IPA_NODE_REF): Likewise.
14368         (IPA_EDGE_REF): Likewise.
14369         * ipa-pure-const.c (malloc_candidate_p): Likewise.
14370         (propagate_malloc): Likewise.
14371         * ipa-split.c (execute_split_functions): Likewise.
14372         * symbol-summary.h: Rename get to get_create.
14373         (get): Likewise.
14374         (get_create): Likewise.
14375         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14377 2018-06-08  Martin Liska  <mliska@suse.cz>
14379         * symbol-summary.h (release): Move definition out of class
14380         declaration.
14381         (symtab_removal): Likewise.
14382         (symtab_duplication): Likewise.
14384 2018-06-08  Martin Liska  <mliska@suse.cz>
14386         * symbol-summary.h (function_summary): Move constructor
14387         implementation out of class declaration.
14388         (release): Likewise.
14389         (symtab_insertion): Likewise.
14390         (symtab_removal): Likewise.
14391         (symtab_duplication): Likewise.
14392         (get): Likewise.
14394 2018-06-08  Martin Liska  <mliska@suse.cz>
14396         * Makefile.in: Remove support for MPX (macros, related functions,
14397         fields in cgraph_node, ...).
14398         * builtin-types.def (BT_BND): Likewise.
14399         (BT_FN_BND_CONST_PTR): Likewise.
14400         (BT_FN_CONST_PTR_BND): Likewise.
14401         (BT_FN_VOID_PTR_BND): Likewise.
14402         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14403         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14404         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14405         (expand_builtin_mempcpy_with_bounds): Likewise.
14406         (expand_builtin_memset_with_bounds): Likewise.
14407         (expand_builtin_memset_args): Likewise.
14408         (std_expand_builtin_va_start): Likewise.
14409         (expand_builtin): Likewise.
14410         (expand_builtin_with_bounds): Likewise.
14411         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14412         (DEF_LIB_BUILTIN_CHKP): Likewise.
14413         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14414         (DEF_CHKP_BUILTIN): Likewise.
14415         (BUILT_IN_MEMCPY): Likewise.
14416         (BUILT_IN_MEMMOVE): Likewise.
14417         (BUILT_IN_MEMPCPY): Likewise.
14418         (BUILT_IN_MEMSET): Likewise.
14419         (BUILT_IN_STPCPY): Likewise.
14420         (BUILT_IN_STRCAT): Likewise.
14421         (BUILT_IN_STRCHR): Likewise.
14422         (BUILT_IN_STRCPY): Likewise.
14423         (BUILT_IN_STRLEN): Likewise.
14424         (BUILT_IN_MEMCPY_CHK): Likewise.
14425         (BUILT_IN_MEMMOVE_CHK): Likewise.
14426         (BUILT_IN_MEMPCPY_CHK): Likewise.
14427         (BUILT_IN_MEMSET_CHK): Likewise.
14428         (BUILT_IN_STPCPY_CHK): Likewise.
14429         (BUILT_IN_STRCAT_CHK): Likewise.
14430         (BUILT_IN_STRCPY_CHK): Likewise.
14431         * calls.c (store_bounds): Likewise.
14432         (emit_call_1): Likewise.
14433         (special_function_p): Likewise.
14434         (maybe_warn_nonstring_arg): Likewise.
14435         (initialize_argument_information): Likewise.
14436         (finalize_must_preallocate): Likewise.
14437         (compute_argument_addresses): Likewise.
14438         (expand_call): Likewise.
14439         * cfgexpand.c (expand_call_stmt): Likewise.
14440         (expand_return): Likewise.
14441         (expand_gimple_stmt_1): Likewise.
14442         (pass_expand::execute): Likewise.
14443         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14444         (cgraph_node::remove): Likewise.
14445         (cgraph_node::dump): Likewise.
14446         (cgraph_node::verify_node): Likewise.
14447         * cgraph.h (chkp_function_instrumented_p): Likewise.
14448         (symtab_node::get_alias_target): Likewise.
14449         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14450         (cgraph_local_p): Likewise.
14451         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14452         (cgraph_edge::rebuild_references): Likewise.
14453         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14454         (walk_polymorphic_call_targets): Likewise.
14455         (cgraph_node::expand_thunk): Likewise.
14456         (symbol_table::output_weakrefs): Likewise.
14457         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14458         (ix86_handle_option): Likewise.
14459         * config/i386/constraints.md: Likewise.
14460         * config/i386/i386-builtin-types.def (BND): Likewise.
14461         (VOID): Likewise.
14462         (PVOID): Likewise.
14463         (ULONG): Likewise.
14464         * config/i386/i386-builtin.def (BDESC_END): Likewise.
14465         (BDESC_FIRST): Likewise.
14466         (BDESC): Likewise.
14467         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14468         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14469         * config/i386/i386.c (enum reg_class): Likewise.
14470         (ix86_target_string): Likewise.
14471         (ix86_option_override_internal): Likewise.
14472         (ix86_conditional_register_usage): Likewise.
14473         (ix86_valid_target_attribute_inner_p): Likewise.
14474         (ix86_set_indirect_branch_type): Likewise.
14475         (ix86_set_current_function): Likewise.
14476         (ix86_function_arg_regno_p): Likewise.
14477         (init_cumulative_args): Likewise.
14478         (ix86_function_arg_advance): Likewise.
14479         (ix86_function_arg): Likewise.
14480         (ix86_pass_by_reference): Likewise.
14481         (ix86_function_value_regno_p): Likewise.
14482         (ix86_function_value_1): Likewise.
14483         (ix86_function_value_bounds): Likewise.
14484         (ix86_return_in_memory): Likewise.
14485         (ix86_setup_incoming_vararg_bounds): Likewise.
14486         (ix86_va_start): Likewise.
14487         (indirect_thunk_need_prefix): Likewise.
14488         (print_reg): Likewise.
14489         (ix86_print_operand): Likewise.
14490         (ix86_expand_call): Likewise.
14491         (ix86_output_function_return): Likewise.
14492         (reg_encoded_number): Likewise.
14493         (BDESC_VERIFYS): Likewise.
14494         (ix86_init_mpx_builtins): Likewise.
14495         (ix86_init_builtins): Likewise.
14496         (ix86_emit_cmove): Likewise.
14497         (ix86_emit_move_max): Likewise.
14498         (ix86_expand_builtin): Likewise.
14499         (ix86_builtin_mpx_function): Likewise.
14500         (ix86_get_arg_address_for_bt): Likewise.
14501         (ix86_load_bounds): Likewise.
14502         (ix86_store_bounds): Likewise.
14503         (ix86_load_returned_bounds): Likewise.
14504         (ix86_store_returned_bounds): Likewise.
14505         (ix86_class_likely_spilled_p): Likewise.
14506         (ix86_hard_regno_mode_ok): Likewise.
14507         (x86_order_regs_for_local_alloc): Likewise.
14508         (ix86_mitigate_rop): Likewise.
14509         (ix86_bnd_prefixed_insn_p): Likewise.
14510         (ix86_mpx_bound_mode): Likewise.
14511         (ix86_make_bounds_constant): Likewise.
14512         (ix86_initialize_bounds): Likewise.
14513         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14514         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14515         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14516         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14517         (TARGET_CHKP_BOUND_MODE): Likewise.
14518         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14519         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14520         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14521         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14522         * config/i386/i386.h (TARGET_MPX): Likewise.
14523         (TARGET_MPX_P): Likewise.
14524         (VALID_BND_REG_MODE): Likewise.
14525         (FIRST_BND_REG): Likewise.
14526         (LAST_BND_REG): Likewise.
14527         (enum reg_class): Likewise.
14528         (BND_REG_P): Likewise.
14529         (BND_REGNO_P): Likewise.
14530         (BNDmode): Likewise.
14531         (ADJUST_INSN_LENGTH): Likewise.
14532         * config/i386/i386.md: Likewise.
14533         * config/i386/i386.opt: Likewise.
14534         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14535         (defined): Likewise.
14536         (LINK_MPX): Likewise.
14537         (MPX_SPEC): Likewise.
14538         (LIBMPX_SPEC): Likewise.
14539         (LIBMPXWRAPPERS_SPEC): Likewise.
14540         (CHKP_SPEC): Likewise.
14541         * config/i386/predicates.md: Likewise.
14542         * dbxout.c (dbxout_type): Likewise.
14543         * doc/extend.texi: Likewise.
14544         * doc/invoke.texi: Likewise.
14545         * doc/md.texi: Likewise.
14546         * doc/tm.texi: Likewise.
14547         * doc/tm.texi.in: Likewise.
14548         * dwarf2out.c (is_base_type): Likewise.
14549         (gen_formal_types_die): Likewise.
14550         (gen_subprogram_die): Likewise.
14551         (gen_type_die_with_usage): Likewise.
14552         (gen_decl_die): Likewise.
14553         (dwarf2out_late_global_decl): Likewise.
14554         * expr.c (expand_assignment): Likewise.
14555         (emit_storent_insn): Likewise.
14556         (store_expr_with_bounds): Likewise.
14557         (store_expr): Likewise.
14558         (expand_expr_real_1): Likewise.
14559         * expr.h (store_expr_with_bounds): Likewise.
14560         * function.c (use_register_for_decl): Likewise.
14561         (struct bounds_parm_data): Likewise.
14562         (assign_parms_augmented_arg_list): Likewise.
14563         (assign_parm_find_entry_rtl): Likewise.
14564         (assign_parm_is_stack_parm): Likewise.
14565         (assign_parm_load_bounds): Likewise.
14566         (assign_bounds): Likewise.
14567         (assign_parms): Likewise.
14568         (expand_function_start): Likewise.
14569         * gcc.c (CHKP_SPEC): Likewise.
14570         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14571         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14572         (wrestrict_dom_walker::check_call): Likewise.
14573         * gimple.c (gimple_build_call_from_tree): Likewise.
14574         * gimple.h (enum gf_mask): Likewise.
14575         (gimple_call_with_bounds_p): Likewise.
14576         (gimple_call_set_with_bounds): Likewise.
14577         * gimplify.c (gimplify_init_constructor): Likewise.
14578         * ipa-cp.c (initialize_node_lattices): Likewise.
14579         (propagate_constants_across_call): Likewise.
14580         (find_more_scalar_values_for_callers_subset): Likewise.
14581         * ipa-hsa.c (process_hsa_functions): Likewise.
14582         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14583         * ipa-icf.c (sem_function::merge): Likewise.
14584         * ipa-inline.c (early_inliner): Likewise.
14585         * ipa-pure-const.c (warn_function_noreturn): Likewise.
14586         (warn_function_cold): Likewise.
14587         (propagate_pure_const): Likewise.
14588         * ipa-ref.h (enum GTY): Likewise.
14589         * ipa-split.c (find_retbnd): Likewise.
14590         (consider_split): Likewise.
14591         (split_function): Likewise.
14592         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14593         * ipa.c (walk_polymorphic_call_targets): Likewise.
14594         (symbol_table::remove_unreachable_nodes): Likewise.
14595         (process_references): Likewise.
14596         (cgraph_build_static_cdtor_1): Likewise.
14597         * lto-cgraph.c (lto_output_node): Likewise.
14598         (output_refs): Likewise.
14599         (compute_ltrans_boundary): Likewise.
14600         (input_overwrite_node): Likewise.
14601         (input_node): Likewise.
14602         (input_cgraph_1): Likewise.
14603         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14604         * passes.c (pass_manager::execute_early_local_passes): Likewise.
14605         (class pass_chkp_instrumentation_passes): Likewise.
14606         (make_pass_chkp_instrumentation_passes): Likewise.
14607         * passes.def: Likewise.
14608         * rtl.h (struct GTY): Likewise.
14609         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14610         * stor-layout.c (layout_type): Likewise.
14611         * symtab.c: Likewise.
14612         * target.def: Likewise.
14613         * targhooks.c (default_chkp_bound_type): Likewise.
14614         (default_chkp_bound_mode): Likewise.
14615         (default_builtin_chkp_function): Likewise.
14616         (default_chkp_function_value_bounds): Likewise.
14617         (default_chkp_make_bounds_constant): Likewise.
14618         (default_chkp_initialize_bounds): Likewise.
14619         * targhooks.h (default_chkp_bound_type): Likewise.
14620         (default_chkp_bound_mode): Likewise.
14621         (default_builtin_chkp_function): Likewise.
14622         (default_chkp_function_value_bounds): Likewise.
14623         (default_chkp_make_bounds_constant): Likewise.
14624         (default_chkp_initialize_bounds): Likewise.
14625         * toplev.c (compile_file): Likewise.
14626         (process_options): Likewise.
14627         * tree-core.h (DEF_BUILTIN): Likewise.
14628         (DEF_BUILTIN_CHKP): Likewise.
14629         * tree-inline.c (declare_return_variable): Likewise.
14630         (remap_gimple_stmt): Likewise.
14631         (copy_bb): Likewise.
14632         (initialize_inlined_parameters): Likewise.
14633         (expand_call_inline): Likewise.
14634         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14635         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14636         (make_pass_ipa_chkp_produce_thunks): Likewise.
14637         (make_pass_chkp): Likewise.
14638         (make_pass_chkp_opt): Likewise.
14639         (make_pass_chkp_instrumentation_passes): Likewise.
14640         * tree-pretty-print.c (dump_generic_node): Likewise.
14641         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14642         * tree-ssa-dce.c (propagate_necessity): Likewise.
14643         (eliminate_unnecessary_stmts): Likewise.
14644         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14645         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14646         * tree-ssa-sccvn.h: Likewise.
14647         * tree-ssa-strlen.c (get_string_length): Likewise.
14648         (valid_builtin_call): Likewise.
14649         (adjust_last_stmt): Likewise.
14650         (handle_builtin_strchr): Likewise.
14651         (handle_builtin_strcpy): Likewise.
14652         (handle_builtin_stxncpy): Likewise.
14653         (handle_builtin_memcpy): Likewise.
14654         (handle_builtin_strcat): Likewise.
14655         (strlen_check_and_optimize_stmt): Likewise.
14656         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14657         * tree-streamer-in.c: Likewise.
14658         * tree-streamer.c (record_common_node): Likewise.
14659         * tree.c (tree_code_size): Likewise.
14660         (wide_int_to_tree_1): Likewise.
14661         (type_contains_placeholder_1): Likewise.
14662         (build_common_tree_nodes): Likewise.
14663         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14664         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14665         (POINTER_BOUNDS_P): Likewise.
14666         (BOUNDED_TYPE_P): Likewise.
14667         (BOUNDED_P): Likewise.
14668         (CALL_WITH_BOUNDS_P): Likewise.
14669         (pointer_bounds_type_node): Likewise.
14670         * value-prof.c (gimple_ic): Likewise.
14671         * var-tracking.c (vt_add_function_parameters): Likewise.
14672         * varasm.c (make_decl_rtl): Likewise.
14673         (assemble_start_function): Likewise.
14674         (output_constant): Likewise.
14675         (maybe_assemble_visibility): Likewise.
14676         * varpool.c (ctor_for_folding): Likewise.
14677         * chkp-builtins.def: Remove.
14678         * ipa-chkp.c: Remove.
14679         * ipa-chkp.h: Remove.
14680         * rtl-chkp.c: Remove.
14681         * rtl-chkp.h: Remove.
14682         * tree-chkp-opt.c: Remove.
14683         * tree-chkp.c: Remove.
14684         * tree-chkp.h: Remove.
14686 2018-06-07  Carl Love  <cel@us.ibm.com>
14688         * config/rs6000/vsx.md (vextract_fp_from_shorth,
14689         vextract_fp_from_shortl): Add BE support.
14691 2018-06-07  Paul Koning  <ni1d@arrl.net>
14693         * compare-elim.c (try_merge_compare): Don't merge compare if
14694         address contains a side effect.
14695         (try_eliminate_compare): Likewise.
14697 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
14699         * config.gcc: Support "tremont".
14700         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14701         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14702         PROCESSOR_TREMONT.
14703         * config/i386/i386.c (m_TREMONT): Define.
14704         (processor_target_table): Add "tremont".
14705         (PTA_TREMONT): Define.
14706         (ix86_lea_outperforms): Add TARGET_TREMONT.
14707         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14708         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14709         and M_INTEL_GOLDMONT_PLUS.
14710         (fold_builtin_cpu): Add "tremont".
14711         (ix86_add_stmt_cost): Add TARGET_TREMONT.
14712         (ix86_option_override_internal): Add "tremont".
14713         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14714         (processor_type): Add PROCESSOR_TREMONT.
14715         * config/i386/x86-tune.def: Add m_TREMONT.
14716         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14718 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14720         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14721         symbol defined for msp430i* devices to be lower case.
14723 2018-06-07  Richard Biener  <rguenther@suse.de>
14725         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14726         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
14727         Properly wrap signed arithmetic if overflow wraps.
14729 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
14731         PR tree-optimization/69615
14732         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14733         of a cast from a same precision integral SSA_NAME in a bb dominated
14734         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
14735         cast to utype if rhs2 has already a compatible type.
14737 2018-06-07  Richard Biener  <rguenther@suse.de>
14739         PR tree-optimization/85935
14740         * graphite-scop-detection.c (find_params_in_bb): Analyze
14741         condition operands with respect to the correct loop.  Assert
14742         the analysis doesn't fail.
14744 2018-06-04  Carl Love  <cel@us.ibm.com>
14746         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14747         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
14748         as it is slightly cheaper.
14749         (first_match_or_eos_index_<mode>):
14750         Calculate index using natural element order.
14751         (first_match_index_<mode>):
14752         Calculate index using natural element order.
14753         (first_match_or_eos_index_<mode>):
14754         Calculate index using natural order.
14755         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14756         for BE and LE modes.
14757         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14758         P9V_BUILTIN_VCLZLSBB_V16QI.
14759         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14760         specific.
14762 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14764         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14765         indentation and line wrap for many prototypes.  Add missing
14766         @smallexample directives around block of prototypes for vec_xl and
14767         vec_xst.
14769 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
14771         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14772         track if we pass or return IEEE 128-bit floating point.
14773         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14774         C++ mangling that is compatible with GCC 8.1.
14775         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14776         (init_cumulative_args): Note if we pass or return IEEE 128-bit
14777         floating point types.
14778         (rs6000_function_arg_advance_1): Likewise.
14779         (rs6000_mangle_type): Optionally generate mangled names that match
14780         what GCC 8.1 generated for IEEE 128-bit floating point types.
14781         (rs6000_globalize_decl_name): If we have an external function that
14782         passes or returns IEEE 128-bit types, generate a weak reference
14783         from the mangled name used in GCC 8.1 to the current mangled
14784         name.
14785         (rs6000_init_builtins): Make __ibm128 use the long double type if
14786         long double is IBM extended double.  Make __float128 use the long
14787         double type if long double is IEEE 128-bit.
14789         PR target/85657
14790         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14791         macro for __ibm128 built-in functions.
14792         (PACK_IF): Add __ibm128 pack/unpack functions.
14793         (UNPACK_IF): Likewise.
14794         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14795         enable long double built-in functions if long double is IEEE
14796         128-bit floating point.
14797         (rs6000_invalid_builtin): Update long double built-in function
14798         error message.
14799         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14800         functions, adjust the built-in function to use the long double
14801         built-in function if __ibm128 and long double are the same type.
14802         * doc/extend.texi (PowerPC builtins): Update documention for
14803         __builtin_{,un}pack_longdouble.  Add documentation for
14804         __builtin_{,un}pack_ibm128.
14806 2018-06-06  Jim Wilson  <jimw@sifive.com>
14808         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14809         (struct machine_function): New field interrupt_mode.
14810         (riscv_handle_type_attribute): New function.  Add forward declaration.
14811         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14812         (riscv_expand_epilogue): Check interrupt_mode field.
14813         (riscv_set_current_function): Check interrupt attribute args and
14814         set interrupt_mode field.
14815         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14816         (riscv_sret, riscv_uret): New.
14817         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14818         new arguments to interrupt attribute.
14820 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
14822         PR target/63177
14823         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14824         Don't handle -mcpu=power8 if -mpower9-vector is also used.
14826 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14828         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14829         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14830         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14831         several redundant entries.
14833 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
14835         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14836         type from "rtx" to "rtx_insn *".
14837         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14838         for local "call_insn", removing cast.
14839         (ix86_expand_call): Likewise, introducing a "call_insn" local.
14841 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14843         PR tree-optimization/86066
14844         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14845         for BIT_INSERT_EXPR stores.
14847 2018-06-06  Richard Biener  <rguenther@suse.de>
14849         PR tree-optimization/86062
14850         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14851         component refs ontop
14852         of to be offsetted base.
14854 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14856         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14857         to be static and remove check on interrupt attribute name.
14859 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14861         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14862         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14864 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
14866         PR target/79924
14867         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14868         second argument.
14869         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14870         Remove second argument, change how error is called.
14871         (aarch64_layout_arg): Remove second argument from
14872         aarch64_err_no_fpadvsimd call.
14873         (aarch64_init_cumulative_args): Ditto.
14874         (aarch64_gimplify_va_arg_expr): Ditto.
14875         * config/aarch64/aarch64.md (mov<mode>): Ditto.
14877 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
14879         * config/i386/i386.md (simple_return_indirect_internal): New expander.
14880         (*simple_return_indirect_internal<mode>): Rename from
14881         simple_return_indirect_internal.  Use W mode iterator.
14882         (rstorssp): New expander.
14883         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
14884         (clrssbsy): New expander.
14885         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
14887 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14889         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14890         __typeof__.
14891         (cmse_check_pointed_object): Likewise.
14893 2018-06-05  Martin Liska  <mliska@suse.cz>
14895         PR gcov-profile/47618
14896         * doc/invoke.texi: Document how -fprofile-dir format
14897         is extended.
14899 2018-06-05  Richard Biener  <rguenther@suse.de>
14901         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14902         removal pretend DOM info isn't available so we do not update
14903         it and only remove edges, not dominated blocks.  Actually free
14904         DOM info in case we removed something.  Remove unreachable blocks.
14905         (mfb_keep_latches): Work with either DOM info or marked backedges.
14906         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14907         first.  Mark backedges if DOM info isn't available.
14908         (Re-)compute DOM info after cleanup_control_flow_pre.
14910 2018-06-05  Richard Biener  <rguenther@suse.de>
14912         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14913         (locus_discrim_hasher::hash): Adjust.
14914         (locus_discrim_hasher::equal): Likewise.
14915         (next_discriminator_for_locus): Work on line directly.
14916         (same_line_p): Pass in expanded locus1 as well.
14917         (assign_discriminators): Avoid redundant location expansions.
14919 2018-06-05  Richard Biener  <rguenther@suse.de>
14921         PR tree-optimization/86046
14922         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14923         if required after clearing TREE_ADDRESSABLE.
14925 2018-06-05  Richard Biener  <rguenther@suse.de>
14927         PR tree-optimization/86047
14928         * tree-ssa-loop.c (for_each_index): Glob handling of all
14929         decls and constants and really handle all of them.
14931 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14933         PR target/81497
14934         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14935         qualifier_void_pointer and qualifier_const_void_pointer.
14936         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14937         (arm_init_builtins): Handle the above.
14938         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14939         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14940         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14941         void intrinsics.
14943 2018-06-05  Martin Liska  <mliska@suse.cz>
14945         * auto-profile.c (read_autofdo_file): Do not use
14946         gcov_ctr_summary struct.
14947         (afdo_callsite_hot_enough_for_early_inline): Likewise.
14948         * coverage.c (struct counts_entry): Likewise.
14949         (read_counts_file): Read just single summary entry.
14950         (get_coverage_counts): Use gcov_summary struct.
14951         * coverage.h (get_coverage_counts): Likewise.
14952         * gcov-dump.c (dump_working_sets): Likewise.
14953         (tag_summary): Dump just single summary.
14954         * gcov-io.c (gcov_write_summary): Write just histogram
14955         summary.
14956         (gcov_read_summary): Read just single summary.
14957         (compute_working_sets): Use gcov_summary struct.
14958         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14959         of GCOV_COUNTERS_SUMMABLE.
14960         (GCOV_COUNTERS_SUMMABLE): Remove.
14961         (GCOV_FIRST_VALUE_COUNTER): Replace with
14962         GCOV_COUNTER_V_INTERVAL.
14963         (struct gcov_ctr_summary): Remove.
14964         (struct gcov_summary): Directly use fields of former
14965         gcov_ctr_summary.
14966         (compute_working_sets): Use gcov_summary struct.
14967         * gcov.c (read_count_file): Do not use ctrs fields.
14968         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14969         struct.
14970         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14971         struct.
14972         * profile.c: Likewise.
14973         * profile.h: Likewise.
14975 2018-06-05  Martin Liska  <mliska@suse.cz>
14977         PR gcov-profile/84846
14978         * gcov.c (output_lines): Print working directory only
14979         in intermediate format.
14981 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
14983         * config/s390/s390-builtin-types.def: Add void function type.
14984         * config/s390/s390-builtins.def: Use the function type for the
14985         tbeginc builtin.
14987 2018-06-04  Jim Wilson  <jimw@sifive.com>
14989         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14990         to int.
14991         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14992         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
14993         handle EH_RETURN_DATA_REGNO registers properly.
14994         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14995         (riscv_expand_epilogue): Update comment.  Change argument name and
14996         type.  Update code to use new name and type.  Pass new args to
14997         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
14998         EXCEPTION_RETURN.
14999         * config/riscv/riscv.md (NORMAL_RETURN): New.
15000         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
15001         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
15002         (eh_return): Call gen_eh_return_internal and emit barrier.
15003         (eh_return_internal): Call riscv_expand_epilogue.
15005 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
15007         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
15008         bit_insertion field and declare can_be_merged_into method.
15009         (merged_store_group::can_be_merged_into): New method.
15010         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
15011         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
15012         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
15014 2018-06-04  Richard Biener  <rguenther@suse.de>
15016         PR tree-optimization/85955
15017         * builtins.c (fold_builtin_sincos): Convert pointers to
15018         destination to appropriate type before dereferencing.
15020 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
15022         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
15024 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
15026         * expr.c (expand_expr_real_1): Force the operand into memory if
15027         its TYPE_MODE is BLKmode and if there is no integer mode for
15028         the number of bits being extracted.
15030 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
15032         PR target/85832
15033         PR target/86036
15034         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15035         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
15037 2018-06-04  Richard Biener  <rguenther@suse.de>
15039         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
15040         (cleanup_tree_cfg_noloop): ... single caller.  Do
15041         start_recording_case_labels later.
15043 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
15045         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
15046         to _IMMINTRIN_H_INCLUDED.
15047         * config/i386/pconfigintrin.h: Ditto.
15048         * config/i386/waitpkgintrin.h: Ditto.
15049         * config/i386/immintrin.h: Add includes for sgxintrin.h,
15050         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
15051         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
15052         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
15053         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
15054         waitpkgintrin.h and cldemoteintrin.h.
15056 2018-06-04  Richard Biener  <rguenther@suse.de>
15058         PR tree-optimization/86038
15059         * tracer.c (find_best_successor): Check probability for
15060         being initialized, bail out if not.
15062 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
15064         PR target/86003
15065         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
15066         of bits to ignore when comparing architectures.
15068 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
15070         PR tree-optimization/69615
15071         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
15072         maximum or minimum of the type, try to merge it also as if
15073         range1 is + [-, x - 1] or + [x + 1, -].
15075         PR c++/86025
15076         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
15078 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
15080         PR tree-optimization/86034
15081         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
15082         the unsigned bitfield type in a bit insertion sequence if it does not
15083         have a larger precision than the bitfield size.
15084         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
15086 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
15088         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
15090 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15092         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
15093         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
15094         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
15095         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
15097 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15099         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
15100         Disable -fdelete-null-pointer-checks for ELF toolchain.
15102 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15103             Kito Cheng  <kito.cheng@gmail.com>
15105         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
15106         (nds32le-*-*, nds32be-*-*): Integrate checking process.
15107         (nds32*-*-*): Add glibc and uclibc conditions.
15108         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
15109         (TARGET_EXCEPT_UNWIND_INFO): Define.
15110         * config/nds32/elf.h: New file.
15111         * config/nds32/linux.h: New file.
15112         * config/nds32/nds32-elf.opt: New file.
15113         * config/nds32/nds32-linux.opt: New file.
15114         * config/nds32/nds32-fp-as-gp.c
15115         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
15116         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
15117         TARGET_LINUX_ABI.
15118         (nds32_asm_file_end): Ditto.
15119         (nds32_print_operand): Ditto.
15120         (nds32_insert_attributes): Ditto.
15121         (nds32_init_libfuncs): New function.
15122         (TARGET_HAVE_TLS): Define.
15123         (TARGET_INIT_LIBFUNCS): Define.
15124         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
15125         spec content.
15126         (TARGET_ELF): Apply different mcmodel setting.
15127         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
15128         been migrated into elf.h and linux.h files.
15129         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
15130         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
15131         (mcmodel): The content has been migrated into nds32-elf.opt and
15132         nds32-linux.opt files.
15133         * config/nds32/t-elf: New file.
15134         * config/nds32/t-linux: New file.
15136 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15137             Shiva Chen  <shiva0217@gmail.com>
15139         * config/nds32/constants.md (unspec_volatile_element): Add
15140         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
15141         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
15142         optimization.
15143         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
15144         (make_pass_nds32_fp_as_gp): Declare.
15145         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
15146         optmization pass.
15147         (nds32_asm_function_end_prologue): Remove unused asm output.
15148         (nds32_asm_function_begin_epilogue): Remove unused asm output.
15149         (nds32_asm_file_start): Output necessary fp_as_gp information.
15150         (nds32_option_override): Adjust register usage.
15151         (nds32_expand_prologue): Consider fp_as_gp situation.
15152         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
15153         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
15154         (epilogue): Ditto.
15155         (return): Ditto.
15156         (simple_return): Ditto.
15157         (omit_fp_begin): Output special directive for fp_as_gp.
15158         (omit_fp_end): Output special directive for fp_as_gp.
15159         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
15160         mforbid-fp-as-gp): New options.
15162 2018-06-01  Mark Wielaard  <mark@klomp.org>
15164         * dwarf2out.c (dwarf2out_finish): Remove generation of
15165         DW_AT_loclists_base.
15167 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
15169         * gimple-ssa-store-merging.c: Include gimple-fold.h.
15170         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
15171         (struct merged_store_group): Add bit_insertion field.
15172         (dump_char_array): Use standard hexadecimal format.
15173         (merged_store_group::merged_store_group): Set bit_insertion to false.
15174         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
15175         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
15176         also print the mask in the dump file.
15177         (pass_store_merging::gate): Minor tweak.
15178         (imm_store_chain_info::coalesce_immediate): Fix wrong association
15179         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
15180         stores with INTEGER_CST stores.
15181         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
15182         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
15183         and use it throughout.  Generate bit insertion sequences if need be.
15184         (pass_store_merging::process_store): Remove redundant condition.
15185         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
15187 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
15189         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
15190         the 128-bit floating point types.  Fix function comment.
15192 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15194         * config/aarch64/aarch64-simd.md
15195         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
15196         mnemonics.
15197         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
15198         mnemonics.
15200 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
15202         PR tree-optimization/85989
15203         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
15204         variable.
15205         (backprop::intersect_uses): Check it when deciding whether this
15206         is a backedge reference.
15207         (backprop::process_block): Add each phi to m_visited_phis
15208         after visiting it, then clear it at the end.
15210 2018-06-01  Richard Biener  <rguenther@suse.de>
15212         * tree-vectorizer.h (vect_dr_stmt): New function.
15213         (vect_get_load_cost): Adjust.
15214         (vect_get_store_cost): Likewise.
15215         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
15216         Use vect_dr_stmt instead of DR_SMTT.
15217         (vect_record_base_alignments): Likewise.
15218         (vect_calculate_target_alignment): Likewise.
15219         (vect_compute_data_ref_alignment): Likewise and make static.
15220         (vect_update_misalignment_for_peel): Likewise.
15221         (vect_verify_datarefs_alignment): Likewise.
15222         (vector_alignment_reachable_p): Likewise.
15223         (vect_get_data_access_cost): Likewise.  Pass down
15224         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
15225         (vect_get_peeling_costs_all_drs): Likewise.
15226         (vect_peeling_hash_get_lowest_cost): Likewise.
15227         (vect_enhance_data_refs_alignment): Likewise.
15228         (vect_find_same_alignment_drs): Likewise.
15229         (vect_analyze_data_refs_alignment): Likewise.
15230         (vect_analyze_group_access_1): Likewise.
15231         (vect_analyze_group_access): Likewise.
15232         (vect_analyze_data_ref_access): Likewise.
15233         (vect_analyze_data_ref_accesses): Likewise.
15234         (vect_vfa_segment_size): Likewise.
15235         (vect_small_gap_p): Likewise.
15236         (vectorizable_with_step_bound_p): Likewise.
15237         (vect_prune_runtime_alias_test_list): Likewise.
15238         (vect_analyze_data_refs): Likewise.
15239         (vect_supportable_dr_alignment): Likewise.
15240         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
15241         (vect_gen_prolog_loop_niters): Likewise.
15242         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
15243         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
15244         modify DR_STMT.
15245         (vect_recog_mask_conversion_pattern): Likewise.
15246         (vect_try_gather_scatter_pattern): Likewise.
15247         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
15248         to vect_get_store_cost.
15249         (vect_get_store_cost): Get stmt_info instead of DR.
15250         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
15251         (vect_get_load_cost): Get stmt_info instead of DR.
15253 2018-06-01  Richard Biener  <rguenther@suse.de>
15255         PR middle-end/86017
15256         * gimple-fold.c (var_decl_component_p): Also allow offsetted
15257         vars wrapped in MEM_REFs.
15259 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
15261         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15262         Fix subreg tests so that we only return a choice between
15263         GENERAL_REGS and FP_REGS if the original classes included both.
15265 2018-06-01  Richard Biener  <rguenther@suse.de>
15267         PR ipa/85960
15268         * tree-ssa-structalias.c (get_function_part_constraint):
15269         Handle NULL fi->decl.
15270         (find_func_aliases_for_call): Properly handle indirect
15271         fi from direct call.
15272         (find_func_clobbers): Likewise.
15273         (ipa_pta_execute): Likewise.
15274         (create_variable_info_for): For functions that are ifunc_resolver
15275         resolve to a varinfo that contains the result of the resolver call.
15276         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
15277         aliases.
15279 2018-05-31  Michael Collison  <michael.collison@arm.com>
15281         * config/aarch64/aarch64.md:
15282         (*fix_to_zero_extenddfdi2): New pattern.
15283         * gcc.target/aarch64/fix_extend1.c: New testcase.
15285 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
15287         PR middle-end/78809
15288         PR middle-end/83026
15289         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15290         and BUILT_IN_STRNCMP_EQ.
15291         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15292         BUILT_IN_STRNCMP_EQ.
15293         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15294         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15295         (gimple_fold_builtin): Likewise.
15296         * tree-ssa-strlen.c (compute_string_length): New function.
15297         (determine_min_obsize): New function.
15298         (handle_builtin_string_cmp): New function to handle calls to
15299         string compare functions.
15300         (strlen_optimize_stmt): Add handling to builtin string compare
15301         calls.
15302         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15303         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15304         * tree.c (build_common_builtin_nodes): Add new defines of
15305         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15307 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
15309         PR target/85984
15310         * bb-reorder.c (pass_partition_blocks::gate): Return false for
15311         functions with naked attribute.
15313 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
15315         * config/i386/sse.md (avx_vec_concat<mode>):
15316         Substitute concat_tg_mode mode attribute with xtg_mode.
15317         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15318         (concat_tg_mode): Remove mode attribute.
15320 2018-05-31  Martin Sebor  <msebor@redhat.com>
15322         PR c/82063
15323         * calls.c (alloc_max_size): Correct a logic error/typo.
15324         Treat excessive arguments as infinite.  Warn for invalid arguments.
15325         * doc/invoke.texi (-Walloc-size-larger-than): Update.
15327 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
15329         PR target/85829
15330         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15331         and movx for Haswell.
15333 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
15334             Cesar Philippidis  <cesar@codesourcery.com>
15336         PR middle-end/85879
15337         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15338         when emitting error on private/firstprivate reductions.
15339         * omp-low.c (lower_omp_target): Avoid reference-type processing
15340         on pointers for firstprivate clause.
15342 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
15344         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15345         (st1x2): Likewise.
15346         (st1x3): Likewise.
15347         * config/aarch64/aarch64-simd.md
15348         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15349         (aarch64_ld1_x3_<mode>): Likewise
15350         (aarch64_st1x2<VALLDIF:mode>): Likewise
15351         (aarch64_st1_x2_<mode>): Likewise
15352         (aarch64_st1x3<VALLDIF:mode>): Likewise
15353         (aarch64_st1_x3_<mode>): Likewise
15354         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15355         (vld1_s8_x3): Likewise.
15356         (vld1_u16_x3): Likewise.
15357         (vld1_s16_x3): Likewise.
15358         (vld1_u32_x3): Likewise.
15359         (vld1_s32_x3): Likewise.
15360         (vld1_u64_x3): Likewise.
15361         (vld1_s64_x3): Likewise.
15362         (vld1_f16_x3): Likewise.
15363         (vld1_f32_x3): Likewise.
15364         (vld1_f64_x3): Likewise.
15365         (vld1_p8_x3): Likewise.
15366         (vld1_p16_x3): Likewise.
15367         (vld1_p64_x3): Likewise.
15368         (vld1q_u8_x3): Likewise.
15369         (vld1q_s8_x3): Likewise.
15370         (vld1q_u16_x3): Likewise.
15371         (vld1q_s16_x3): Likewise.
15372         (vld1q_u32_x3): Likewise.
15373         (vld1q_s32_x3): Likewise.
15374         (vld1q_u64_x3): Likewise.
15375         (vld1q_s64_x3): Likewise.
15376         (vld1q_f16_x3): Likewise.
15377         (vld1q_f32_x3): Likewise.
15378         (vld1q_f64_x3): Likewise.
15379         (vld1q_p8_x3): Likewise.
15380         (vld1q_p16_x3): Likewise.
15381         (vld1q_p64_x3): Likewise.
15382         (vst1_s64_x2): Likewise.
15383         (vst1_u64_x2): Likewise.
15384         (vst1_f64_x2): Likewise.
15385         (vst1_s8_x2): Likewise.
15386         (vst1_p8_x2): Likewise.
15387         (vst1_s16_x2): Likewise.
15388         (vst1_p16_x2): Likewise.
15389         (vst1_s32_x2): Likewise.
15390         (vst1_u8_x2): Likewise.
15391         (vst1_u16_x2): Likewise.
15392         (vst1_u32_x2): Likewise.
15393         (vst1_f16_x2): Likewise.
15394         (vst1_f32_x2): Likewise.
15395         (vst1_p64_x2): Likewise.
15396         (vst1q_s8_x2): Likewise.
15397         (vst1q_p8_x2): Likewise.
15398         (vst1q_s16_x2): Likewise.
15399         (vst1q_p16_x2): Likewise.
15400         (vst1q_s32_x2): Likewise.
15401         (vst1q_s64_x2): Likewise.
15402         (vst1q_u8_x2): Likewise.
15403         (vst1q_u16_x2): Likewise.
15404         (vst1q_u32_x2): Likewise.
15405         (vst1q_u64_x2): Likewise.
15406         (vst1q_f16_x2): Likewise.
15407         (vst1q_f32_x2): Likewise.
15408         (vst1q_f64_x2): Likewise.
15409         (vst1q_p64_x2): Likewise.
15410         (vst1_s64_x3): Likewise.
15411         (vst1_u64_x3): Likewise.
15412         (vst1_f64_x3): Likewise.
15413         (vst1_s8_x3): Likewise.
15414         (vst1_p8_x3): Likewise.
15415         (vst1_s16_x3): Likewise.
15416         (vst1_p16_x3): Likewise.
15417         (vst1_s32_x3): Likewise.
15418         (vst1_u8_x3): Likewise.
15419         (vst1_u16_x3): Likewise.
15420         (vst1_u32_x3): Likewise.
15421         (vst1_f16_x3): Likewise.
15422         (vst1_f32_x3): Likewise.
15423         (vst1_p64_x3): Likewise.
15424         (vst1q_s8_x3): Likewise.
15425         (vst1q_p8_x3): Likewise.
15426         (vst1q_s16_x3): Likewise.
15427         (vst1q_p16_x3): Likewise.
15428         (vst1q_s32_x3): Likewise.
15429         (vst1q_s64_x3): Likewise.
15430         (vst1q_u8_x3): Likewise.
15431         (vst1q_u16_x3): Likewise.
15432         (vst1q_u32_x3): Likewise.
15433         (vst1q_u64_x3): Likewise.
15434         (vst1q_f16_x3): Likewise.
15435         (vst1q_f32_x3): Likewise.
15436         (vst1q_f64_x3): Likewise.
15437         (vst1q_p64_x3): Likewise.
15439 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
15441         * config/msp430/msp430.c (msp430_output_labelref): Prepend
15442         user_label_prefix to name.
15444         * tree-core.h: Update comment about the format of NAME string
15445         passed to handler in attribute_spec.
15447         * config/msp430/msp430.md: Remove erroneous subreg expression from
15448         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15449         zero_extend{q,h}isi2.
15451 2018-05-30  Borislav Petkov  <bp@suse.de>
15453         * doc/extend.texi: Document some architecture specific
15454         constraints and sort entries.
15456 2018-05-30  Martin Sebor  <msebor@redhat.com>
15458         PR middle-end/85369
15459         * builtins.c (expand_builtin_stpcpy_1): New function.
15460         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15461         only if the former succeeds.
15463 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
15465         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15466         in saphira.
15468 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
15470         * doc/invoke.texi (-flinker-output): Document
15472 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
15474         * passes.c (ipa_write_summaries): Only modify statements if body
15475         is in memory.
15476         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15477         incrementally linking.
15478         (ipa_passes): Likewise.
15479         * lto-cgraph.c (lto_output_node): When incrementally linking do not
15480         pass down resolution info.
15481         * common.opt (flag_incremental_link): Update info.
15482         * gcc.c (plugin specs): Turn flinker-output=* to
15483         -plugin-opt=-linker-output-known
15484         * toplev.c (compile_file): Also cut compilation when doing incremental
15485         link.
15486         * flag-types. (enum lto_partition_model): Add
15487         LTO_LINKER_OUTPUT_NOLTOREL.
15488         (invoke.texi): Add -flinker-output docs.
15489         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15490         link same way as WPA; do not stream in dead initializers.
15492         * dwarf2out.c (dwarf2out_die_ref_for_decl,
15493         darf2out_register_external_decl): Support incremental link.
15495 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
15497         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15499 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
15501         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15502         it down to simple_object_copy_lto_debug_sections.
15503         (run_gcc): Determine incremental LTO link time and configure
15504         lto1 into non-wpa mode, disable renaming of debug sections.
15506 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15508         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15509         descriptions of various incorrectly documented functions.
15511 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
15513         Revert:
15514         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15515         address check not strict.
15517 2018-05-30  Richard Biener  <rguenther@suse.de>
15519         PR tree-optimization/85964
15520         * tracer.c (better_p): Drop initialized count check, we only
15521         call the function with initialized counts now.
15522         (find_best_successor): Do find a best edge if one
15523         has uninitialized count.
15524         (find_best_predecessor): Likewise.  Do BB frequency check only
15525         if count is initialized.
15527 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
15529         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15530         (aarch64_ldrstr_offset_compare): New.
15531         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15532         load/store orderings.
15533         (aarch64_gen_adjusted_ldpstp): Likewise.
15535 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
15537         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15538         Check for subset of GENERAL_REGS and FP_REGS.
15539         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15540         r=w alternative.
15542 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
15544         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15545         and wi::to_poly_offset.  Add the current offset and then check
15546         whether the sum fits, rather than using an unchecked addition of
15547         a checked term.  Check for a shwi rather than a uhwi.
15548         * expr.c (get_bit_range): Use tree_to_poly_uint64.
15549         (store_constructor): Use poly_int_tree_p.
15550         (expand_expr_real_1): Likewise.
15551         * function.c (assign_temp): Likewise.
15552         * fold-const.c (const_binop): Use poly_int_tree_p and
15553         wi::to_poly_offset.
15554         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
15555         division.
15556         * ipa-icf-gimple.c (func_checker::compare_operand): Use
15557         to_poly_offset for MEM offsets.
15558         * ipa-icf.c (sem_variable::equals): Likewise.
15559         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15560         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15561         wi::to_poly_offset for BIT_FIELD_REF offsets.
15562         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15563         wi::to_poly_offset.
15564         * var-tracking.c (emit_note_insn_var_location): Use
15565         tree_to_poly_uint64.
15567 2018-05-29  Jim Wilson  <jimw@sifive.com>
15569         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15571 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
15573         PR target/85950
15574         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15575         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15576         sequence.
15577         (sse4_1_round<mode>2): Use nonimmediate_operand
15578         for operand 1 predicate.
15580 2018-05-29  Martin Sebor  <msebor@redhat.com>
15581             Richard Biener  <rguenther@suse.de>
15583         PR testsuite/85888
15584         * calls.c (get_size_range): Call determine_value_range instead
15585         of get_value_range..
15586         * tree-vrp.h (determine_value_range): Declared new function.
15587         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15589 2018-05-29  Richard Biener  <rguenther@suse.de>
15591         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15592         sure to use non-pattern stmts for get_earlier_stmt arguments.
15593         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15594         called on pattern stmts.
15595         (get_later_stmt): Likewise.
15597 2018-05-29  Martin Liska  <mliska@suse.cz>
15599         PR gcov-profile/85759
15600         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15601         env variables.
15603 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
15605         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15606         VEC_UNPACK_*_EXPR.
15607         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15608         VEC_PACK_*_EXPR.
15610         PR target/85918
15611         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15612         VEC_PACK_FLOAT_EXPR): New tree codes.
15613         * tree-pretty-print.c (op_code_prio): Handle
15614         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15615         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15616         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15617         * tree-inline.c (estimate_operator_cost): Likewise.
15618         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15619         * fold-const.c (const_binop): Likewise.
15620         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15621         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15622         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15623         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15624         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15625         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15626         * expr.c (expand_expr_real_2): Likewise.
15627         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15628         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15629         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15630         optabs.
15631         * optabs.c (expand_widen_pattern_expr): For
15632         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15633         sign from result type rather than operand's type.
15634         (expand_binop_directly): For vec_packu_float_optab and
15635         vec_packs_float_optab allow result type to be different from operand's
15636         type.
15637         * optabs-tree.c (optab_for_tree_code): Handle
15638         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15639         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
15640         * tree-vect-generic.c (expand_vector_operations_1):  Handle
15641         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15642         VEC_PACK_FLOAT_EXPR.
15643         * tree-vect-stmts.c (supportable_widening_operation): Handle
15644         FIX_TRUNC_EXPR.
15645         (supportable_narrowing_operation): Handle FLOAT_EXPR.
15646         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15647         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15648         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
15649         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15650         mode attributes.
15651         (vec_pack<floatprefix>_float_<mode>): New expander.
15652         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15653         attributes.
15654         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15655         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15656         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15657         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15658         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15659         Document.
15660         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15661         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15662         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15663         VEC_PACK_FLOAT_EXPR): Document.
15665 2018-05-29  Richard Biener  <rguenther@suse.de>
15667         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15668         member.
15669         (stmt_vec_info_vec): Make pointer.
15670         (init_stmt_vec_info_vec): Remove.
15671         (free_stmt_vec_info_vec): Likewise.
15672         (set_stmt_vec_info_vec): New function.
15673         (free_stmt_vec_infos): Likewise.
15674         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15675         (set_vinfo_for_stmt): Likewise.
15676         (get_earlier_stmt): Likewise.
15677         (get_later_stmt): Likewise.
15678         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15679         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15680         (vec_info::~vec_info): Free stmt_vec_infos.
15681         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15682         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15683         (pass_slp_vectorize::execute): Likewise.
15684         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15685         (free_stmt_vec_info_vec): Likewise.
15686         (set_stmt_vec_info_vec): New function.
15687         (free_stmt_vec_infos): Likewise.
15688         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15689         the global stmt_vec_info_vec.
15690         * tree-parloops.c (gather_scalar_reductions): Use
15691         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15692         vector.
15694 2018-05-29  Richard Biener  <rguenther@suse.de>
15696         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15698 2018-05-29  Martin Liska  <mliska@suse.cz>
15699             David Malcolm  <dmalcolm@redhat.com>
15701         * vec.c (test_reverse): New.
15702         (vec_c_tests): Add new test.
15703         * vec.h (vl_ptr>::reverse): New function.
15705 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
15707         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15709         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15710         and later.
15712 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15714         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15716 2018-05-28  Richard Biener  <rguenther@suse.de>
15718         PR tree-optimization/85933
15719         * tree-vect-data-refs.c (vect_record_base_alignments): Only
15720         look at stmts marked as vectorizable.
15722 2018-05-28  Richard Biener  <rguenther@suse.de>
15724         PR tree-optimization/85934
15725         * tree-vect-generic.c (expand_vector_operations_1): Hoist
15726         vector boolean check before scalar optimization.
15728 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
15730         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15731         for armv5te.
15733 2018-05-28  Mark Wielaard  <mark@klomp.org>
15735         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15736         if it is an expression containing a minus sign.
15738 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
15740         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15742 2018-05-27  Paul Koning  <ni1d@arrl.net>
15744         * config/pdp11/pdp11.md (truncsihi2): Remove.
15746 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
15747             Chung-Ju Wu  <jasonwucj@gmail.com>
15749         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15750         implementation.
15751         (unaligned_store_dw): Ditto.
15752         * config/nds32/nds32-memory-manipulation.c
15753         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15754         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15755         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15756         (emit_setmem_word_loop): Rename to ...
15757         (emit_setmem_doubleword_loop): ... this.
15758         (nds32_gen_dup_4_byte_to_word_value): New function.
15759         (nds32_gen_dup_8_byte_to_double_word_value): New function.
15760         (nds32_expand_setmem_loop): Refine implementation.
15761         (nds32_expand_setmem_loop_v3m): Ditto.
15762         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15763         pattern.
15765 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15767         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15769 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15771         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15772         (nds32_init_machine_status): Initialize machine->attr_naked_p and
15773         machine->attr_no_prologue_p.
15774         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15775         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15776         (nds32_expand_epilogue): Consider attr_naked_p.
15777         (nds32_expand_epilogue_v3pop): Likewise.
15778         (nds32_can_use_return_insn): Likewise.
15779         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15780         attr_no_prologue_p fields.
15781         * config/nds32/nds32.opt (mret-in-naked-func): New option.
15783 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
15785         PR target/85918
15786         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15787         attributes.
15788         * config/i386/sse.md
15789         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15790         Rename to ...
15791         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15792         ... this.
15793         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15794         Rename to ...
15795         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15796         ... this.
15797         (*<floatsuffix>floatv2div2sf2): Rename to ...
15798         (*float<floatunssuffix>v2div2sf2): ... this.
15799         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15800         (float<floatunssuffix>v2div2sf2_mask): ... this.
15801         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15802         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15803         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15804         to ...
15805         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15806         ... this.
15807         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15808         Rename to ...
15809         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15810         ... this.
15811         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15812         Rename to ...
15813         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15814         ... this.
15815         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15816         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15817         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15818         gen_ufix_truncv8dfv8si2.
15819         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15820         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15821         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15822         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15823         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15824         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15825         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15826         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15828 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
15830         PR target/85900
15831         PR target/85345
15832         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15834 2018-05-25  Jim Wilson  <jimw@sifive.com>
15836         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15837         * config/riscv/riscv.c (struct machine_function): Add
15838         interrupt_handler_p and attribute_checked_p fields.
15839         (riscv_attribute_table): Add interrupt.
15840         (riscv_interrupt_type_p): New.
15841         (riscv_save_reg_p): Save extra regs for interrupt handler.
15842         (riscv_use_save_libcall): Return false  for interrupt handler.
15843         (riscv_first_stack_step): Add forward declaration.
15844         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
15845         for interrupt handler with large frame.  Use it for saved reg list.
15846         (riscv_expand_prologue): Move flag_stack_usage_info support to
15847         eliminate duplication.
15848         (riscv_expand_epilogue): Generate mret for interrupt handler.
15849         (riscv_epilogue_uses): New.
15850         (riscv_can_use_return_insn): Return false for interrupt handler.
15851         (riscv_function_ok_for_sibcall): Likewise.
15852         (riscv_set_current_function): Add interrupt handler support.
15853         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15854         * config/riscv/riscv.md (UNSPECV_MRET): New.
15855         (GP_REGNUM): New.
15856         (riscv_frflags, riscv_fsflags): Use tab after opcode.
15857         (riscv_mret): New.
15858         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15860 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
15862         PR tree-optimization/85712
15863         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15864         this candidate has already been replaced in-situ by a copy.
15866 2018-05-25  Jason Merrill  <jason@redhat.com>
15868         PR c++/80485 - inline function non-zero address.
15869         * symtab.c (nonzero_address): Check DECL_COMDAT.
15871 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
15873         PR target/83628
15874         * config/alpha/alpha.md (ashlsi3): New insn pattern.
15875         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
15876         extension of SImode operation.  Use const123_operand predicate.
15877         (*saddsi_1): Remove.
15878         (*saddl_se_1): Ditto.
15879         (*ssubsi_1): Ditto.
15880         (*ssubl_se_1): Ditto.
15881         * config/alpha/predicates.md (const123_operand): New predicate.
15882         * config/alpha/constraints.md (P): Use IN_RANGE.
15884 2018-05-25  Richard Biener  <rguenther@suse.de>
15886         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15887         defaulted to true.
15888         (ref_maybe_used_by_stmt_p): Likewise.
15889         (stmt_may_clobber_ref_p): Likewise.
15890         (stmt_may_clobber_ref_p_1): Likewise.
15891         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15892         and pass it along.
15893         (ref_maybe_used_by_stmt_p): Likewise.
15894         (stmt_may_clobber_ref_p): Likewise.
15895         (stmt_may_clobber_ref_p_1): Likewise.
15896         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15897         the alias oracle to disambiguate DRs with stmts DR analysis
15898         couldn't handle.
15899         (vect_analyze_data_refs): Do not give up on not analyzable
15900         DRs for BB vectorization.  Remove code truncating the dataref
15901         vector.
15903 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
15905         PR target/85832
15906         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15907         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
15908         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15910 2018-05-25  Richard Biener  <rguenther@suse.de>
15912         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15913         function, combining stmt data ref gathering and fatal analysis
15914         parts.
15915         (vect_analyze_data_refs): Remove now redudnant code and simplify.
15916         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15917         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15918         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15919         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15921 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15923         PR tree-optimization/85720
15924         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15925         SCC if all partitions are builtins.
15926         (version_loop_by_alias_check): New parameter.  Generate cancelable
15927         runtime alias check if all partitions are builtins.
15928         (distribute_loop): Update call to above function.
15930 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15932         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15933         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15934         (parm_default_def_partition_arg): Ditto.
15935         (set_parm_default_def_partition): Ditto.
15936         (get_parm_default_def_partitions): Ditto and make it static.
15937         (get_undefined_value_partitions): Ditto and make it static.
15938         (remove_ssa_form): Refactor call to init_var_map here.
15939         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15940         computation for loop region.
15941         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15942         (register_default_def): Delete.
15943         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15944         (parm_default_def_partition_arg): Ditto.
15945         (set_parm_default_def_partition): Ditto.
15946         (get_parm_default_def_partitions): Ditto and make it static.
15947         (get_undefined_value_partitions): Ditto and make it static.
15948         (coalesce_with_default, coalesce_with_default): Update comment.
15949         (create_coalesce_list_for_region): New func factored out from
15950         create_outofssa_var_map.
15951         (populate_coalesce_list_for_outofssa): New func factored out from
15952         create_outofssa_var_map and coalesce_ssa_name.
15953         (create_outofssa_var_map): Delete.
15954         (coalesce_ssa_name): Refactor to support live range computation.
15955         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15956         (get_parm_default_def_partitions): Delete.
15957         (get_undefined_value_partitions): Ditto.
15958         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15959         computation for loop region.
15960         (new_tree_live_info, loe_visit_block): Ditto.
15961         (live_worklist, set_var_live_on_entry): Ditto.
15962         (calculate_live_on_exit, verify_live_on_entry): Ditto.
15963         * tree-ssa-live.h (struct _var_map): New fields.
15964         (init_var_map): Change decl.
15965         (region_contains_p): New.
15967 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15969         * tree-ssa-live.h (live_merge_and_clear): Delete.
15971 2018-05-25  Richard Biener  <rguenther@suse.de>
15973         PR c++/85912
15974         * tree-dump.c (dequeue_and_dump): Remove access to removed
15975         operand 2 of a SWITCH_EXPR.
15977 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15979         * doc/sourcebuild.texi (vect_double_cond_arith): Include
15980         multiplication and division.
15981         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15982         (cond_udiv@var{m}, cond_umod@var{m}): Document.
15983         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15984         (cond_udiv_optab, cond_umod_optab): New optabs.
15985         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15986         (IFN_COND_RDIV): New internal functions.
15987         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15988         TRUNC_MOD_EXPR and RDIV_EXPR.
15989         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15990         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15991         New unspecs.
15992         (SVE_INT_BINARY): Include mult.
15993         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15994         (optab, sve_int_op): Handle mult.
15995         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15996         UNSPEC_COND_DIV.
15997         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15998         for SVE_INT_BINARY_SD.
16000 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
16002         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
16003         (optab, sve_int_op): Handle div and udiv.
16004         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
16005         for SVE_INT_BINARY_SD.
16006         (*<optab><mode>3): New insn for the same.
16008 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
16010         * tree-vect-patterns.c: Include predict.h.
16011         (vect_recog_divmod_pattern): Restrict check for division support
16012         to when optimizing for size.
16014 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
16016         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
16017         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
16018         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
16019         (gimple_match_op::set_op): Likewise.
16020         (gimple_resimplify4): Declare.
16021         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
16022         (expr::gen_transform): Likewise.
16023         (decision_tree::gen): Generate a simplification routine for 4 operands.
16024         * gimple-match-head.c (gimple_simplify): Add an overload for
16025         4 operands.  In the top-level function, handle up to 4 call
16026         arguments and call gimple_resimplify4.
16027         (gimple_resimplify4): New function.
16028         (build_call_internal): Pass a fourth operand.
16029         (maybe_push_to_seq): Likewise.
16030         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
16031         Fold VEC_COND_EXPRs of an operation and a default value into
16032         an IFN_COND_* function if possible.
16033         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
16034         New unspecs.
16035         (SVE_COND_FP_BINARY): Include them.
16036         (optab, sve_fp_op): Handle them.
16037         (SVE_INT_BINARY_REV): New code iterator.
16038         (SVE_COND_FP_BINARY_REV): New int iterator.
16039         (commutative): New int attribute.
16040         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
16041         Declare.
16042         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
16043         function.
16044         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
16045         (*cond_<optab><mode>): New patterns for reversed operands.
16047 2018-05-25  Richard Biener  <rguenther@suse.de>
16049         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
16050         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
16051         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
16052         (STMT_VINFO_GROUPED_ACCESS): Adjust.
16053         * tree-vect-data-refs.c (everywhere): Adjust users.
16054         * tree-vect-loop.c (everywhere): Likewise.
16055         * tree-vect-slp.c (everywhere): Likewise.
16056         * tree-vect-stmts.c (everywhere): Likewise.
16057         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
16059 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16061         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
16062         Rename to...
16063         (gcc_cv_as_section_exclude): ... this.
16064         Try Solaris as #exclude syntax.
16065         * configure: Regenerate.
16066         * config.in: Regenerate.
16067         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
16068         SECTION_EXCLUDE.
16069         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
16070         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
16072         * varasm.c (default_elf_asm_named_section): Don't check if
16073         HAVE_GAS_SECTION_EXCLUDE is defined.
16075 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
16077         * doc/md.texi: Update the documentation of the cond_* optabs
16078         to mention the new final operand.  Fix GET_MODE_NUNITS call.
16079         Describe the scalar case too.
16080         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
16081         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
16082         instead of 2.
16083         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
16084         (get_conditional_internal_fn): Update comment.
16085         * tree-vect-loop.c (vectorizable_reduction): Pass the original
16086         accumulator value as a final argument to conditional functions.
16087         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
16088         a define_expand and add an "else" operand.  Assert for now that
16089         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
16090         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
16091         (*cond_<optab><mode>): New patterns.
16092         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
16093         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16094         (UNSPEC_COND_EOR): Delete.
16095         (optab): Remove associated mappings.
16096         (SVE_INT_BINARY): New code iterator.
16097         (sve_int_op): Remove int attribute and add "minus" to the code
16098         attribute.
16099         (SVE_COND_INT_OP): Delete.
16100         (SVE_COND_FP_OP): Rename to...
16101         (SVE_COND_FP_BINARY): ...this.
16103 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
16105         * optabs.c (can_reuse_operands_p): New function.
16106         (maybe_legitimize_operands): Try to reuse the results for
16107         earlier operands.
16109 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
16111         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
16112         Add {q} suffix to insn mnemonic.
16114 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16116         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
16117         (msp430_warn_func_return): New.
16119 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
16121         * fold-const.c (tree_nonzero_bits): New function.
16122         * fold-const.h (tree_nonzero_bits): Likewise.
16123         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
16124         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
16126 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
16128         PR target/85900
16129         PR target/85345
16130         * varasm.c (assemble_alias): Check ifunc_resolver only on
16131         FUNCTION_DECL.
16133 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
16135         PR target/85903
16136         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
16137         when memory input operand is handled.
16139 2018-05-24  Luis Machado  <luis.machado@linaro.org>
16141         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
16142         global.
16143         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
16145 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
16147         * match.pd: Delay FMA folds until after vectorization.
16149 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16151         PR target/83009
16152         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16153         address check not strict.
16155 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
16157         * gimple-match.h (gimple_match_op): New class.
16158         (mprts_hook): Replace parameters with a gimple_match_op *.
16159         (maybe_build_generic_op): Likewise.
16160         (gimple_simplified_result_is_gimple_val): Replace parameters with
16161         a const gimple_match_op *.
16162         (gimple_simplify): Replace code_helper * and tree * parameters with
16163         a gimple_match_op * parameter.
16164         (gimple_resimplify1): Replace code_helper *, tree and tree *
16165         parameters with a gimple_match_op * parameter.
16166         (gimple_resimplify2): Likewise.
16167         (gimple_resimplify3): Likewise.
16168         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
16169         parameters with a gimple_match_op * parameter.
16170         * gimple-match-head.c (gimple_simplify): Change prototypes of
16171         auto-generated functions to take a gimple_match_op * instead of
16172         separate code_helper * and tree * parameters.  Make the same
16173         change in the top-level overload and update calls to the
16174         gimple_resimplify routines.  Update calls to the auto-generated
16175         functions and to maybe_push_res_to_seq in the publicly-facing
16176         operation-specific gimple_simplify overloads.
16177         (gimple_match_op::MAX_NUM_OPS): Define.
16178         (gimple_resimplify1): Replace rcode and ops with a single res_op
16179         parameter.  Update call to gimple_simplify.
16180         (gimple_resimplify2): Likewise.
16181         (gimple_resimplify3): Likewise.
16182         (mprts_hook): Replace parameters with a gimple_match_op *.
16183         (maybe_build_generic_op): Likewise.
16184         (build_call_internal): Replace type, nargs and ops with
16185         a gimple_match_op *.
16186         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
16187         with a single gimple_match_op *.  Update calls to mprts_hook,
16188         build_call_internal and gimple_simplified_result_is_gimple_val.
16189         Factor out code that is common to the tree_code and combined_fn cases.
16190         * genmatch.c (expr::gen_transform): Replace tem_code and
16191         tem_ops with a gimple_match_op called tem_op.  Update calls
16192         to the gimple_resimplify functions and maybe_push_res_to_seq.
16193         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
16194         res_ops.  Update call to the gimple_resimplify functions.
16195         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
16196         (decision_tree::gen): Make the functions take a gimple_match_op *
16197         called res_op instead of separate res_code and res_ops parameters.
16198         Update call accordingly.
16199         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
16200         and ops with a single res_op parameter.  Update calls to
16201         maybe_build_generic_op and maybe_push_res_to_seq.
16202         (fold_stmt_1): Update calls to gimple_simplify and
16203         replace_stmt_with_simplification.
16204         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
16205         and gimple_simplified_result_is_gimple_val.
16206         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
16207         gimple_simplify.
16208         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
16209         with a gimple_match_op *.
16210         (vn_nary_build_or_lookup): Likewise.  Update call to
16211         vn_nary_build_or_lookup_1.
16212         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
16213         gimple_match_op *.  Update calls to the gimple_resimplify routines
16214         and to gimple_simplified_result_is_gimple_val.
16215         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
16216         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
16217         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
16218         (visit_nary_op): Likewise.
16219         (visit_reference_op_load): Likewise.
16221 2018-05-23  Luis Machado  <luis.machado@linaro.org>
16223         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
16224         modifier for printing the step amount.
16226 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
16228         PR target/78849
16229         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
16230         types.
16232 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
16234         * doc/sourcebuild.texi (Endianness): New subsubsection.
16236 2018-05-23  Luis Machado  <luis.machado@linaro.org>
16238         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16239         <prefetch_dynamic_strides>: New const bool field.
16240         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16241         prefetch_dynamic_strides.
16242         (exynosm1_prefetch_tune): Likewise.
16243         (thunderxt88_prefetch_tune): Likewise.
16244         (thunderx_prefetch_tune): Likewise.
16245         (thunderx2t99_prefetch_tune): Likewise.
16246         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
16247         false.
16248         (aarch64_override_options_internal): Update to set
16249         PARAM_PREFETCH_DYNAMIC_STRIDES.
16250         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16251         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16252         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16253         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16254         prefetch-dynamic-strides setting.
16256 2018-05-23  Luis Machado  <luis.machado@linaro.org>
16258         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16259         <minimum_stride>: New const int field.
16260         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16261         minimum_stride field defaulting to -1.
16262         (exynosm1_prefetch_tune): Likewise.
16263         (thunderxt88_prefetch_tune): Likewise.
16264         (thunderx_prefetch_tune): Likewise.
16265         (thunderx2t99_prefetch_tune): Likewise.
16266         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
16267         <default_opt_level>: Set to 3.
16268         (aarch64_override_options_internal): Update to set
16269         PARAM_PREFETCH_MINIMUM_STRIDE.
16270         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16271         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16272         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16273         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16274         stride is constant and is below the minimum stride threshold.
16276 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16278         * config/arm/arm-cpus.in (mode26): Delete.
16279         (armv4): Delete mode26 reference.
16280         * config/arm/arm.c (arm_configure_build_target): Delete use of
16281         isa_bit_mode26.
16283 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
16285         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16286         New insn pattern.
16287         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16288         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
16289         for non-SSE modes.
16290         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
16291         (floatunsdidf2): Ditto.
16293 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
16295         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16296         (fixuns_trunc<mode>si2_avx512f): Ditto.
16297         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16298         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16299         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16301 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
16303         PR rtl-optimization/79985
16304         * df-scan.c (df_insn_refs_collect): Remove special case for
16305         global registers and asm statements.
16307 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
16309         * extend.texi (Global Register Variables): Rewrite the bullet list.
16310         Note that the register is available for allocation. Note that access
16311         via inline asm must use constraints. Add note about async-signal
16312         handlers. Remove paragraph about automagic register selection.
16314 2018-05-23  Richard Biener  <rguenther@suse.de>
16316         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16317         of fixed offset from memset VN.
16319 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
16321         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16322         first_interp field.
16323         (alloc_cand_and_find_basis): Initialize first_interp field.
16324         (slsr_process_mul): Modify first_interp field.
16325         (slsr_process_add): Likewise.
16326         (slsr_process_cast): Modify first_interp field for each new
16327         interpretation.
16328         (slsr_process_copy): Likewise.
16329         (dump_candidate): Dump first_interp field.
16330         (replace_mult_candidate): Process all interpretations, not just
16331         subsequent ones.
16332         (replace_rhs_if_not_dup): Likewise.
16333         (replace_one_candidate): Likewise.
16335 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
16337         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16338         Add new boolean.
16339         (aarch64_needs_frame_chain): New function.
16340         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16342 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
16344         PR target/84882
16345         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16346         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16347         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16348         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16349         as true for strict-align.
16350         (aarch64_can_inline_p): Perform checks even when callee has no
16351         attributes to check for strict alignment.
16352         * doc/extend.texi (AArch64 Function Attributes): Document
16353         no-strict-align.
16354         * doc/invoke.texi: (AArch64 Options): Likewise.
16356 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
16358         PR tree-optimization/85853
16359         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16360         the handling of the root of the node to...
16361         (vect_slp_analyze_node_operations_1): ...this new function,
16362         and run the whole thing with the child nodes' def types
16363         set according to their SLP node's def type.
16365 2018-05-23  Richard Biener  <rguenther@suse.de>
16367         PR middle-end/85874
16368         * tree-data-ref.c (create_runtime_alias_checks): Defer
16369         and ignore overflow warnings.
16371 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
16373         PR tree-optimization/85822
16374         * tree-vrp.c (is_masked_range_test): Fix handling of negative
16375         constants.
16377 2018-05-23  Richard Biener  <rguenther@suse.de>
16379         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16380         memset constants via native_interpret_expr.
16382 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
16384         PR target/85345
16385         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16386         attribute.
16387         (cgraph_node::create_alias): Likewise.
16388         (cgraph_node::get_availability): Check ifunc_resolver instead
16389         of looking up ifunc attribute.
16390         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16391         * varasm.c (do_assemble_alias): Likewise.
16392         (assemble_alias): Likewise.
16393         (default_binds_local_p_3): Likewise.
16394         * cgraph.h (cgraph_node): Add ifunc_resolver.
16395         (cgraph_node::only_called_directly_or_aliased_p): Return false
16396         for IFUNC resolver.
16397         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16398         attribute.
16399         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16400         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16401         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16402         instead of looking up ifunc attribute.
16404 2018-05-22  Luis Machado  <luis.machado@linaro.org>
16406         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16408 2018-05-22  Martin Sebor  <msebor@redhat.com>
16410         PR middle-end/85359
16411         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16412         only when expasion succeeds.
16413         (expand_builtin_strcmp): Same.
16414         (expand_builtin_strncmp): Same.
16416 2018-05-22  Martin Sebor  <msebor@redhat.com>
16418         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16420 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
16421             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16423         * config/aarch64/aarch64-ldpstp.md: Replace uses of
16424         aarch64_mem_pair_operand with memory_operand and delete operand swapping
16425         code.
16426         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16427         Add check for legitimate_address.
16428         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16429         (aarch64_swap_ldrstr_operands): New.
16430         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16431         Define prototype.
16433 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
16434             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16436         * config/aarch64/aarch64.md: New patterns to generate stp
16437         and ldp.
16438         (store_pair_sw, store_pair_dw): New patterns to generate stp for
16439         single words and double words.
16440         (load_pair_sw, load_pair_dw): Likewise.
16441         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16442         Delete.
16443         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16444         Delete.
16445         * config/aarch64/aarch64-ldpstp.md: Modify peephole
16446         for different mode ldpstp and add peephole for merged zero stores.
16447         Likewise for loads.
16448         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16449         Add size check.
16450         (aarch64_gen_store_pair): Rename calls to match new patterns.
16451         (aarch64_gen_load_pair): Rename calls to match new patterns.
16452         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16453         (load_pair<DREG:mode><DREG2:mode>): ... This.
16454         (store_pair<mode>): Rename to...
16455         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16456         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16457         New mode iterators.
16458         (V_INT_EQUIV): Handle SImode.
16459         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16460         New predicate.
16462 2018-05-22  Martin Sebor  <msebor@redhat.com>
16464         PR c/85623
16465         * calls.c (maybe_warn_nonstring_arg): Use string length to set
16466         or ajust the presumed bound on an operation to avoid unnecessary
16467         warnings.
16469 2018-05-22  Martin Sebor  <msebor@redhat.com>
16471         PR tree-optimization/85826
16472         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16473         assuming that a DECL necesarily has a constant size.
16475 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
16477         PR middle-end/85862
16478         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16480 2018-05-22  Richard Biener  <rguenther@suse.de>
16482         PR tree-optimization/85834
16483         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16484         non-constant and non-zero memset arguments.
16486 2018-05-22  Martin Liska  <mliska@suse.cz>
16488         PR ipa/85607
16489         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16491 2018-05-22  Richard Biener  <rguenther@suse.de>
16493         PR tree-optimization/85863
16494         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16495         comparisons when vectype is specified.
16496         (vectorizable_condition): Do not specify vectype for
16497         vect_is_simple_cond when SLP vectorizing.
16499 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
16501         PR target/85657
16502         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16503         define __ibm128 as long double.
16504         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16505         as a distinct type when IEEE 128-bit support is enabled.
16506         (init_float128_ieee): Fix up conversions between IFmode and IEEE
16507         128-bit types to use the correct functions.
16508         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16509         convert between 128-bit floating point types that have different
16510         modes but the same representation, instead of using gen_lowpart to
16511         makean alias.
16512         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16513         KFmode.
16514         (IFKF_reg): New attributes to give the register constraints for
16515         IFmode and KFmode.
16516         (extend<mode>tf2_internal): New insns to mark an explicit
16517         conversion between 128-bit floating point types that have a
16518         different mode but share the same representation.
16520 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
16522         PR tree-optimization/85814
16523         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16524         a null return from get_strinfo when unsharing the next
16525         strinfo in the chain.
16527 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
16529         PR gcc/84923
16530         * varasm.c (weak_finish): Clean up weak_decls.
16532 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16534         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16535         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16536         UNSPEC_UADALP values.
16537         * config/aarch64/iterators.md (ABAL): New int iterator.
16538         (ABDL2): Likewise.
16539         (ADALP): Likewise.
16540         (sur): Add mappings for the above.
16541         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16542         New define_insn.
16543         (aarch64_<sur>abal<mode>_4): Likewise.
16544         (aarch64_<sur>adalp<mode>_3): Likewise.
16545         (<sur>sadv16qi): New define_expand.
16547 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
16549         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16550         (*movdf_internal): Ditto.
16551         (*rcpsf2_sse): Ditto.
16552         (*rsqrtsf2_sse): Ditto.
16553         (*sqrt<mode>2_sse): Ditto.
16555 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
16557         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16558         eor3q<mode>4.
16559         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16560         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16561         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16562         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16563         vbcaxq_s64): New.
16564         * config/aarch64/arm_neon.h: Likewise.
16565         * config/aarch64/iterators.md (VQ_I): New.
16567 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
16569         * config.gcc: Add arc/t-multilib-linux to tmake_file for
16570         arc*-*-linux*.
16571         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16572         MULTILIB_DIRNAMES
16574 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
16576         * config/nds32/constraints.md (S): New constraint.
16577         * config/nds32/nds32.md (call_internal): Use constraint S.
16578         (call_value_internal): Likewise.
16579         (sibcall_internal): Likewise.
16580         (sibcall_value_internal): Likewise.
16582 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
16583             Chung-Ju Wu  <jasonwucj@gmail.com>
16585         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16586         into consideration.
16588 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
16589             Chung-Ju Wu  <jasonwucj@gmail.com>
16591         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16592         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16593         (nds32_rtx_costs_impl): Simplify.
16594         (nds32_address_cost_impl): Simplify.
16595         (nds32_init_rtx_costs): New function.
16596         (nds32_rtx_costs_speed_prefer): Likewise.
16597         (nds32_rtx_costs_size_prefer): Likewise.
16598         (nds32_address_cost_speed_prefer): Likewise.
16599         (nds32_address_cost_speed_fwprop): Likewise.
16600         (nds32_address_cost_size_prefer): Likewise.
16601         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16602         * config/nds32/nds32.c (nds32_option_override): Use
16603         nds32_init_rtx_costs function.
16605 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
16607         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16608         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16609         (TARGET_PIPELINE_N8): Likewise.
16610         (TARGET_PIPELINE_N10): Likewise.
16611         (TARGET_PIPELINE_N13): Likewise.
16612         (TARGET_PIPELINE_GRAYWOLF): Likewise.
16614 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
16616         * config/nds32/nds32-fpu.md: Update copyright year.
16618 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16620         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16622 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16624         * config/nds32/nds32.c
16625         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16626         * config/nds32/nds32.opt (minline-asm-r15): New option.
16628 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16630         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16631         MASK_HW_ABS.
16632         * config/nds32/nds32.md (abssi2): New pattern.
16634 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
16636         * config/i386/i386.md (rex64namesuffix): New mode attribute.
16637         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16638         Merge insn pattern from sse_cvtsi2ss<round_name> and
16639         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16640         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16641         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16642         using SWI48 mode iterator.
16643         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16644         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16645         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16646         pattern from sse_cvttss2si<round_saeonly_name>
16647         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16648         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16649         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16650         using SWI48 mode iterator.
16651         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16652         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16653         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16654         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16655         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16656         using SWI48 mode iterator.
16657         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16658         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16659         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16660         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16661         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16662         SWI48 mode iterator.
16663         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16664         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16665         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16666         pattern from sse_cvttsd2si<round_saeonly_name>
16667         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16669 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16671         * config/nds32/nds32-md-auxiliary.c
16672         (nds32_valid_smw_lwm_base_p): Refine.
16673         (nds32_output_smw_single_word): Refine.
16674         (nds32_output_smw_double_word): New.
16675         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16677 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16679         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16680         (nds32_output_stack_pop): Refine.
16681         (nds32_expand_unaligned_load): Refine.
16682         (nds32_expand_unaligned_store): Refine.
16684 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
16685             Chung-Ju Wu  <jasonwucj@gmail.com>
16687         * config/nds32/constants.md: Add TP_REGNUM constant.
16688         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16689         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16690         UNSPEC_ADD32.
16691         * config/nds32/nds32-doubleword.md: Consider flag_pic.
16692         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16693         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16694         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16695         and PIC code generation.
16696         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16697         code generation.
16698         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16699         optimization.
16700         * config/nds32/nds32.md: Support TLS and PIC.
16701         * config/nds32/nds32.c: Support TLS and PIC.
16702         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16703         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16704         predicate.
16706 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16708         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16709         mode with E_ prefix.
16711 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
16712             Chung-Ju Wu  <jasonwucj@gmail.com>
16714         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16715         * config/nds32/nds32-md-auxiliary.c
16716         (symbolic_reference_mentioned_p): New.
16717         (nds32_legitimize_ict_address): New.
16718         (nds32_expand_ict_move): New.
16719         (nds32_indirect_call_referenced_p): New.
16720         (nds32_symbol_binds_local_p): Delete.
16721         (nds32_long_call_p): Modify.
16722         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16723         * config/nds32/nds32-protos.h
16724         (symbolic_reference_mentioned_p): Declare.
16725         (nds32_legitimize_ict_address): Declare.
16726         (nds32_expand_ict_move): Declare.
16727         (nds32_indirect_call_referenced_p): Declare.
16728         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16729         (nds32_relax_group): Use nds32_ict_const_p as condition.
16730         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16731         (nds32_asm_file_start): Output ict_model directive in asm code.
16732         (nds32_legitimate_address_p): Consider indirect call.
16733         (nds32_print_operand): Consider indirect call.
16734         (nds32_print_operand_address): Consider indirect call.
16735         (nds32_insert_attributes): Handle "indirect_call" attribute.
16736         (TARGET_LEGITIMATE_ADDRESS_P): Define.
16737         (TARGET_LEGITIMATE_CONSTANT_P): Define.
16738         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16739         (TARGET_DELEGITIMIZE_ADDRESS): Define.
16740         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16741         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16742         (TARGET_ICT_MODEL_SMALL): Define.
16743         (TARGET_ICT_MODEL_LARGE): Define.
16744         * config/nds32/nds32.md (movsi): Consider ict model.
16745         (call, call_value): Consider ict model.
16746         (sibcall, sibcall_value): Consider ict model.
16747         * config/nds32/nds32.opt (mict-model): New option.
16748         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16749         model.
16751 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
16752             Monk Chiang  <sh.chiang04@gmail.com>
16753             Jim Wilson <jimw@sifive.com>
16755         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16756         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
16757         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16758         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16759         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
16760         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16761         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16762         compute save_libcall_adjustment properly.
16763         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16764         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16765         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16766         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16767         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16768         (ABI_SPEC): Handle mabi=ilp32e.
16769         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16770         (RVE): Add RVE mask.
16771         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16772         <-march>: Add rv32e as an example.
16774 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
16776         PR c++/82899
16777         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16778         (intra_create_variable_infos): Handle C++ constructors.
16780 2018-05-18  Martin Liska  <mliska@suse.cz>
16782         * passes.def: Remove a redundant pass.
16784 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
16786         PR bootstrap/85838
16787         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16789 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16791         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16792         (ARMv4): Update.
16793         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16794         (ARMv6m): Update.
16795         (armv2, armv2a, armv3, armv3m): Delete architectures.
16796         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16797         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16798         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16799         Delete cpus.
16800         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16801         (*mulsidi3adddi): Likewise.
16802         (mulsidi3): Likewise.
16803         (*mulsidi3_nov6): Likewise.
16804         (umulsidi3): Likewise.
16805         (umulsidi3_nov6): Likewise.
16806         (umaddsidi4): Likewise.
16807         (*umulsidi3adddi): Likewise.
16808         (smulsi3_highpart): Likewise.
16809         (*smulsi3_highpart_nov6): Likewise.
16810         (umulsi3_highpart): Likewise.
16811         (*umulsi3_highpart_nov6): Likewise.
16812         * config/arm/arm.h (arm_arch3m): Delete.
16813         * config/arm/arm.c (arm_arch3m): Delete.
16814         (arm_option_override_internal): Update armv3-related comment.
16815         (arm_configure_build_target): Delete use of isa_bit_mode32.
16816         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16817         (arm_rtx_costs_internal): Delete check of arm_arch3m.
16818         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16819         (mulsa3): Likewise.
16820         (mulusa3): Likewise.
16821         * config/arm/arm-protos.h (arm_arch3m): Delete.
16822         * config/arm/arm-tables.opt: Regenerate.
16823         * config/arm/arm-tune.md: Likewise.
16824         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16825         deleted architectures.
16827 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16829         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16830         (armv5t, armv5te): New features.
16831         (ARMv5, ARMv5e): Delete fgroups.
16832         (ARMv5t, ARMv5te): Adjust for above changes.
16833         (ARMv6m): Likewise.
16834         (armv5, armv5e): Delete arches.
16835         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16836         arm_arch5.
16837         (*call_reg_arm): Likewise.
16838         (*call_value_reg_armv5): Likewise.
16839         (*call_value_reg_arm): Likewise.
16840         (*call_symbol): Likewise.
16841         (*call_value_symbol): Likewise.
16842         (*sibcall_insn): Likewise.
16843         (*sibcall_value_insn): Likewise.
16844         (clzsi2): Likewise.
16845         (prefetch): Likewise.
16846         (define_split and define_peephole2 dependent on arm_arch5):
16847         Likewise.
16848         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16849         arm_arch5e.
16850         (TARGET_ARM_QBIT): Likewise.
16851         (TARGET_DSP_MULTIPLY): Likewise.
16852         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16853         (arm_arch5, arm_arch5e): Delete.
16854         (arm_arch5t, arm_arch5te): Declare.
16855         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16856         (arm_arch5t): Declare.
16857         (arm_option_reconfigure_globals): Update for the above.
16858         (arm_options_perform_arch_sanity_checks): Update comment, replace
16859         use of arm_arch5 with arm_arch5t.
16860         (use_return_insn): Likewise.
16861         (arm_emit_call_insn): Likewise.
16862         (output_return_instruction): Likewise.
16863         (arm_final_prescan_insn): Likewise.
16864         (arm_coproc_builtin_available): Likewise.
16865         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16866         arm_arch5e with arm_arch5t and arm_arch5te.
16867         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16868         (arm_arch5t, arm_arch5te): Declare.
16869         * config/arm/arm-tables.opt: Regenerate.
16870         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16871         * config/arm/t-multilib: Likewise.
16872         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16873         instead of arm_arch5.
16874         (*call_reg_thumb1): Likewise.
16875         (*call_value_reg_thumb1_v5): Likewise.
16876         (*call_value_reg_thumb1): Likewise.
16877         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16878         unreachable path.
16879         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16881 2018-05-18  Martin Liska  <mliska@suse.cz>
16883         PR gcov-profile/84846
16884         * doc/gcov.texi: Document -t option of gcov tool.
16886 2018-05-18  Martin Liska  <mliska@suse.cz>
16888         PR gcov-profile/84846
16889         * gcov.c (print_usage): Add new -t option.
16890         (process_args): Handle the option.
16891         (generate_results): Use stdout as output when requested by
16892         the option.
16894 2018-05-18  Martin Liska  <mliska@suse.cz>
16896         PR gcov-profile/84846
16897         * coverage.c (coverage_init): Write PWD to .gcno file.
16898         * doc/gcov.texi: Document how working directory is printed.
16899         * gcov-dump.c (dump_gcov_file): Print PWD.
16900         * gcov.c (output_intermediate_file): Likewise.
16901         (read_graph_file): Read PWD string.
16902         (output_lines): Print PWD.
16904 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16906         PR middle-end/85817
16907         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16908         for retval and return false if all args to phi are zero.
16910 2018-05-18  Richard Biener  <rguenther@suse.de>
16912         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16913         method.
16914         (evrp_dom_walker::before_dom_children): Call it.
16916 2018-05-18  Richard Biener  <rguenther@suse.de>
16918         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16919         results when processing array refs with variable index.
16921 2018-05-18  Toon Moene  <toon@moene.org>
16923         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16924         directly after that of -floop-interchange. Indicate that both
16925         options are enabled by default when specifying -O3.
16927 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16929         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16930         iterator.  Delete separate integer-mode vec_set<mode> expander.
16931         (aarch64_simd_vec_setv2di): Delete.
16932         (vec_setv2di): Delete.
16933         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16934         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
16935         the "w, r" alternative.
16937 2018-05-18  Martin Liska  <mliska@suse.cz>
16939         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16940         * tree-pass.h (make_pass_lower_switch_O0): New function.
16941         * tree-switch-conversion.c (node_has_low_bound): Remove.
16942         (node_has_high_bound): Likewise.
16943         (node_is_bounded): Likewise.
16944         (class pass_lower_switch): Make it a template type and create
16945         two instances.
16946         (pass_lower_switch::execute): Add template argument.
16947         (make_pass_lower_switch): New function.
16948         (make_pass_lower_switch_O0): New function.
16949         (do_jump_if_equal): Remove.
16950         (emit_case_nodes): Simplify to just handle all 3 cases and leave
16951         all the hard work to tree optimization passes.
16953 2018-05-18  Martin Liska  <mliska@suse.cz>
16955         * dbgcnt.c (limit_low): Renamed from limit.
16956         (limit_high): New variable.
16957         (dbg_cnt_is_enabled): Check for upper limit.
16958         (dbg_cnt): Adjust dumping.
16959         (dbg_cnt_set_limit_by_index): Add new argument for high
16960         value.
16961         (dbg_cnt_set_limit_by_name): Likewise.
16962         (dbg_cnt_process_single_pair): Parse new format.
16963         (dbg_cnt_process_opt): Use strtok.
16964         (dbg_cnt_list_all_counters): Remove 'value' and add
16965         'limit_high'.
16966         * doc/invoke.texi: Document changes.
16968 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
16970         * doc/sourcebuild.texi (scalar_all_fma): Document.
16971         * tree.def (FMA_EXPR): Delete.
16972         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16973         * internal-fn.c (ternary_direct): New macro.
16974         (expand_ternary_optab_fn): Likewise.
16975         (direct_ternary_optab_supported_p): Likewise.
16976         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16977         * builtins.c (fold_builtin_fma): Delete.
16978         (fold_builtin_3): Don't call it.
16979         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16980         * expr.c (expand_expr_real_2): Likewise.
16981         * fold-const.c (operand_equal_p): Likewise.
16982         (fold_ternary_loc): Likewise.
16983         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16984         * gimple.c (DEFTREECODE): Likewise.
16985         * gimplify.c (gimplify_expr): Likewise.
16986         * optabs-tree.c (optab_for_tree_code): Likewise.
16987         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16988         * tree-eh.c (operation_could_trap_p): Likewise.
16989         (stmt_could_throw_1_p): Likewise.
16990         * tree-inline.c (estimate_operator_cost): Likewise.
16991         * tree-pretty-print.c (dump_generic_node): Likewise.
16992         (op_code_prio): Likewise.
16993         * tree-ssa-loop-im.c (stmt_cost): Likewise.
16994         * tree-ssa-operands.c (get_expr_operands): Likewise.
16995         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16996         * fold-const-call.h (fold_fma): Delete.
16997         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16998         CFN_FNMA and CFN_FNMS.
16999         (fold_fma): Delete.
17000         * genmatch.c (combined_fn): New enum.
17001         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
17002         (commutative_op): New function.
17003         (commutate): Use it.  Handle more than 2 operands.
17004         (dt_operand::gen_gimple_expr): Use commutative_op.
17005         (parser::parse_expr): Allow :c to be used with non-binary
17006         operators if the commutative operand is known.
17007         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
17008         CFN_FMS, CFN_FNMA and CFN_FNMS.
17009         (backprop::process_assign_use): Remove FMA_EXPR handling.
17010         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
17011         (gen_hsa_fma): New function.
17012         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
17013         IFN_FNMA and IFN_FNMS.
17014         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
17015         * gimple-fold.h (follow_all_ssa_edges): Declare.
17016         * gimple-fold.c (follow_all_ssa_edges): New function.
17017         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
17018         gimple_build interface and use follow_all_ssa_edges to fold the result.
17019         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
17020         instead of checking for optabs directly.
17021         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
17022         rather than FMA_EXPRs.
17023         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
17024         call to IFN_FMA instead of an FMA_EXPR.
17026 2018-05-17  Jim Wilson  <jimw@sifive.com>
17028         * expr.c (do_tablejump): When converting index to Pmode, if we have a
17029         sign extended promoted subreg, and the range does not have the sign bit
17030         set, then do a sign extend.
17032         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
17033         test, check for sign extended subreg and/or constant operands, and
17034         do a sign extend in that case.
17036 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
17038         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
17039         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
17040         Add untyped.
17041         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
17042         Change logics_shift_reg to logics_shift_imm.
17043         (thunderx2t99_fp_loadpair_basic): Delete.
17044         (thunderx2t99_fp_storepair_basic): Delete.
17045         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
17046         (thunderx2t99_asimd_polynomial): Delete.
17047         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
17048         and neon_fp_mul_d_scalar_q.
17049         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
17050         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
17051         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
17052         (thunderx2t99_asimd_lut): Add missing tbl types.
17053         (thunderx2t99_asimd_ext): Delete.
17054         (thunderx2t99_asimd_load1_1_mult): Delete.
17055         (thunderx2t99_asimd_load1_2_mult): Delete.
17056         (thunderx2t99_asimd_load1_ldp): New.
17057         (thunderx2t99_asimd_load1): New.
17058         (thunderx2t99_asimd_load2): Add missing *load2* types.
17059         (thunderx2t99_asimd_load3): New.
17060         (thunderx2t99_asimd_load4): New.
17061         (thunderx2t99_asimd_store1_1_mult): Delete.
17062         (thunderx2t99_asimd_store1_2_mult): Delete.
17063         (thunderx2t99_asimd_store2_mult): Delete.
17064         (thunderx2t99_asimd_store2_onelane): Delete.
17065         (thunderx2t99_asimd_store_stp): New.
17066         (thunderx2t99_asimd_store1): New.
17067         (thunderx2t99_asimd_store2): New.
17068         (thunderx2t99_asimd_store3): New.
17069         (thunderx2t99_asimd_store4): New.
17071 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
17073         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
17074         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
17076 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
17077             Segher Boessenkool  <segher@kernel.crashing.org>
17079         PR target/85698
17080         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
17081         operand.
17083 2018-05-17  Richard Biener  <rguenther@suse.de>
17085         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
17086         for pruning loop and prune defs feeding only already visited PHIs.
17088 2018-05-17  Richard Biener  <rguenther@suse.de>
17090         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
17092 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
17093             Richard Biener  <rguenther@suse.de>
17095         PR tree-optimization/85793
17096         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
17097         for VMAT_ELEMENTWISE.
17099 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
17101         * internal-fn.h (lookup_internal_fn): Declare
17102         * internal-fn.c (lookup_internal_fn): New function.
17103         * gimple.c (gimple_build_call_from_tree): Handle calls to
17104         internal functions.
17105         * gimple-pretty-print.c (dump_gimple_call): Print "." before
17106         internal function names.
17107         * tree-pretty-print.c (dump_generic_node): Likewise.
17108         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
17110 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
17112         * gimple-fold.h (gimple_build): Make the function forms take
17113         combined_fn rather than built_in_function.
17114         (gimple_simplify): Likewise.
17115         * gimple-match-head.c (gimple_simplify): Likewise.
17116         * gimple-fold.c (gimple_build): Likewise.
17117         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
17118         rather than gimple_build_call_internal.
17119         (get_initial_defs_for_reduction): Likewise.
17120         (vect_create_epilog_for_reduction): Likewise.
17121         (vectorizable_live_operation): Likewise.
17123 2018-05-17  Martin Liska  <mliska@suse.cz>
17125         * gimple-ssa-sprintf.c (format_directive): Do not use
17126         space in between 'G_' and '('.
17128 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
17130         PR target/85323
17131         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
17132         even if the mask is not all ones.
17134         PR target/85323
17135         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
17136         vector.
17137         (ix86_gimple_fold_builtin): Likewise.
17139         PR target/85323
17140         * config/i386/i386.c: Include tree-vector-builder.h.
17141         (ix86_vector_shift_count): New function.
17142         (ix86_fold_builtin): Fold shift builtins by scalar count.
17143         (ix86_gimple_fold_builtin): Likewise.
17145         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
17146         _mm512_setzero): New intrinsics.
17148 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
17149             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17151         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
17152         code generation for cases where splatting a value is not useful.
17153         * simplify-rtx.c (simplify_ternary_operation): Simplify
17154         vec_merge across a vec_duplicate and a paradoxical subreg forming
17155         a vector mode to a vec_concat.
17157 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
17159         * config.gcc: Support "goldmont-plus".
17160         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17161         "goldmont-plus".
17162         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17163         PROCESSOR_GOLDMONT_PLUS.
17164         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
17165         (processor_target_table): Add "goldmont-plus".
17166         (PTA_GOLDMONT_PLUS): Define.
17167         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
17168         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
17169         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
17170         (fold_builtin_cpu): Add "goldmont-plus".
17171         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
17172         (ix86_option_override_internal): Add "goldmont-plus".
17173         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
17174         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
17175         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
17176         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
17178 2018-05-17  Richard Biener  <rguenther@suse.de>
17180         PR tree-optimization/85757
17181         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
17182         remove defs that only feed that PHI from further processing.
17184 2018-05-16  Jim Wilson  <jimw@sifive.com>
17186         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
17187         asterisk to name.
17188         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
17190 2018-05-16  Mark Wielaard  <mark@klomp.org>
17192         * dwarf2out.c (count_index_strings): New function.
17193         (output_indirect_strings): Call count_index_strings and generate
17194         header for dwarf_version >= 5.
17196 2018-05-16  Mark Wielaard  <mark@klomp.org>
17198         * dwarf2out.c (dwarf_FORM): New function.
17199         (set_indirect_string): Use dwarf_FORM.
17200         (reset_indirect_string): Likewise.
17201         (size_of_die): Likewise.
17202         (value_format): Likewise.
17203         (output_die): Likewise.
17204         (add_skeleton_AT_string): Likewise.
17205         (output_macinfo_op): Likewise.
17206         (index_string): Likewise.
17207         (output_index_string_offset): Likewise.
17208         (output_index_string): Likewise.
17209         (count_index_strings): Likewise.
17211 2018-05-16  Carl Love  <cel@us.ibm.com>
17213         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17214         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
17216 2018-05-16  Martin Jambor  <mjambor@suse.cz>
17218         * ipa-prop.c (ipa_free_all_edge_args): Remove.
17219         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
17221 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
17223         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
17224         (fnma<mode>4): Likewise.
17225         (fms<mode>4): Likewise.
17226         (fnms<mode>4): Likewise.
17227         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
17228         (aarch64_fnma<mode>4): Likewise.
17229         (aarch64_fms<mode>4): Likewise.
17230         (aarch64_fnms<mode>4): Likewise.
17231         (aarch64_fnmadd<mode>4): Likewise.
17233 2018-05-16  Jason Merrill  <jason@redhat.com>
17235         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
17237 2018-05-16  Richard Biener  <rguenther@suse.de>
17239         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
17240         (dump_stmt_cost): Declare.
17241         (add_stmt_cost): Dump cost we add.
17242         (add_stmt_costs): New function.
17243         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
17244         No longer exported.
17245         (vect_analyze_stmt): Adjust prototype.
17246         (vectorizable_condition): Likewise.
17247         (vectorizable_live_operation): Likewise.
17248         (vectorizable_reduction): Likewise.
17249         (vectorizable_induction): Likewise.
17250         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
17251         cost vector to pass to vectorizable_ and record afterwards.
17252         (vect_model_reduction_cost): Take cost vector argument and adjust.
17253         (vect_model_induction_cost): Likewise.
17254         (vectorizable_reduction): Likewise.
17255         (vectorizable_induction): Likewise.
17256         (vectorizable_live_operation): Likewise.
17257         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
17258         SLP_TREE_NUMBER_OF_VEC_STMTS.
17259         (vect_analyze_slp_cost_1): Remove.
17260         (vect_analyze_slp_cost): Likewise.
17261         (vect_slp_analyze_node_operations): Take visited args and
17262         a target cost vector.  Avoid processing already visited stmt sets.
17263         (vect_slp_analyze_operations): Use a local cost vector to gather
17264         costs and register those of non-discarded instances.
17265         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
17266         (vect_schedule_slp_instance): Remove copying of
17267         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
17268         zero.
17269         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
17270         adding cost.  Record cost entry location.
17271         (vect_prologue_cost_for_slp_op): Function to compute cost of
17272         a constant or invariant generated for SLP vect in the prologue,
17273         split out from vect_analyze_slp_cost_1.
17274         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
17275         (vect_model_promotion_demotion_cost): Likewise.
17276         (vect_model_store_cost): Likewise, make static.
17277         (vect_model_load_cost): Likewise.
17278         (vectorizable_bswap): Add cost vector arg and adjust.
17279         (vectorizable_call): Likewise.
17280         (vectorizable_simd_clone_call): Likewise.
17281         (vectorizable_conversion): Likewise.
17282         (vectorizable_assignment): Likewise.
17283         (vectorizable_shift): Likewise.
17284         (vectorizable_operation): Likewise.
17285         (vectorizable_store): Likewise.
17286         (vectorizable_load): Likewise.
17287         (vectorizable_condition): Likewise.
17288         (vectorizable_comparison): Likewise.
17289         (can_vectorize_live_stmts): Likewise.
17290         (vect_analyze_stmt): Likewise.
17291         (vect_transform_stmt): Adjust calls to vectorizable_*.
17292         * tree-vectorizer.c: Include gimple-pretty-print.h.
17293         (dump_stmt_cost): New function.
17295 2018-05-16  Richard Biener  <rguenther@suse.de>
17297         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17298         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17299         * tree-ssa-dse.c: Include tree-ssa-loop.h.
17300         (check_name): New callback.
17301         (dse_classify_store): Track cycles via a visited bitmap of PHI
17302         defs and simplify handling of in-loop and across loop dead stores
17303         and properly fail for loop-variant refs.  Handle byte-tracking with
17304         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17305         limiting the walk.
17307 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
17309         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17310         (vect_get_mask_type_for_stmt): Likewise.
17311         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17312         split out from...
17313         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
17314         to determine the statement's vector type and the vector type that
17315         should be used for calculating nunits.  Deal with cases in which
17316         the type has to be deferred.
17317         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17318         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17319         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17320         (vect_determine_vf_for_stmt): New functions, split out from...
17321         (vect_determine_vectorization_factor): ...here.
17322         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17323         (vect_get_mask_type_for_stmt): New functions, split out from
17324         vect_determine_vectorization_factor.
17326 2018-05-16  Richard Biener  <rguenther@suse.de>
17328         * tree-cfg.c (verify_gimple_assign_ternary): Properly
17329         verify the [VEC_]COND_EXPR embedded comparison.
17331 2018-05-15  Martin Sebor  <msebor@redhat.com>
17333         PR tree-optimization/85753
17334         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17335         RECORD_TYPE in addition to ARRAY_TYPE.
17337 2018-05-15  Martin Sebor  <msebor@redhat.com>
17339         PR middle-end/85643
17340         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17342 2018-05-15  Richard Biener  <rguenther@suse.de>
17344         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17345         add by_clobber_p one.  Change algorithm to collect all defs
17346         representing uses we need to walk and try reducing them to
17347         a single one before failing.
17348         (dse_dom_walker::dse_optimize_stmt): Adjust.
17350 2018-05-13  Mark Wielaard  <mark@klomp.org>
17352         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17353         (size_of_loc_descr): Likewise.
17354         (output_loc_operands): Likewise.
17355         (output_loc_operands_raw): Likewise.
17356         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17357         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17358         (hash_loc_operands): Likewise.
17359         (compare_loc_operands): Likewise.
17361 2018-05-14  Mark Wielaard  <mark@klomp.org>
17363         * dwarf2out.c (count_index_addrs): New function.
17364         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17366 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17368         PR tree-optimization/83648
17369         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17370         return value as malloc candidate.
17372 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17374         PR ipa/85734
17375         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17376         param as true in call to suggest_attribute.
17378 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
17380         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17381         -mreadonly-in-sdata.
17383 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17385         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17386         New pattern.
17387         (aarch64_crypto_aesd_fused): Likewise.
17389 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
17391         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17392         (movsi_aarch64): Likewise.
17393         (load_pairsi): Likewise.
17394         (load_pairdi): Likewise.
17395         (store_pairsi): Likewise.
17396         (store_pairdi): Likewise.
17397         (load_pairsf): Likewise.
17398         (load_pairdf): Likewise.
17399         (store_pairsf): Likewise.
17400         (store_pairdf): Likewise.
17401         (zero_extend): Likewise.
17402         (trunc): Swap alternatives.
17403         (fcvt_target): Add '?' to prefer w over r.
17405 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
17407         PR target/85756
17408         * config/i386/i386.md: Disallow non-commutative arithmetics in
17409         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17410         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
17411         in the peephole2 before it.
17413 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
17415         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17416         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17417         (ix86_handle_option): Handle -mcldemote.
17418         * config.gcc: New header.
17419         * config/i386/cldemoteintrin.h: New file.
17420         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17421         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17422         -mcldemote.
17423         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17424         OPTION_MASK_ISA_CLDEMOTE.
17425         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17426         (ix86_valid_target_attribute_inner_p): Ditto.
17427         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17428         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17429         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17430         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17431         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17432         (cldemote): New.
17433         * config/i386/i386.opt: Add -mcldemote.
17434         * config/i386/x86intrin.h: New header.
17435         * doc/invoke.texi: Add -mcldemote.
17437 2018-05-14  Richard Biener  <rguenther@suse.de>
17439         * doc/match-and-simplify.texi: Adjust :s documentation.
17441 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
17443         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17444         intended memcpy size.
17445         (REORDER_45): Likewise.
17447 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
17449         * sort.cc: New file.
17450         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17451         * vec.c (qsort_chk): Use gcc_qsort.
17452         * Makefile.in (OBJS-libcommon): Add sort.o.
17453         (build/sort.o): New target.  Use it...
17454         (BUILD_RTL): ... here, and...
17455         (build/gencfn-macros): ... here, and...
17456         (build/genmatch): ... here.
17458 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
17459             Chung-Ju Wu  <jasonwucj@gmail.com>
17461         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17462         * config/nds32/nds32-graywolf.md: New file.
17463         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17464         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17465         pipeline.
17466         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17467         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17468         * config/nds32/nds32.md (pipeline_model): Add graywolf.
17469         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17470         * config/nds32/pipelines.md: Include n15 settings.
17472 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
17473             Chung-Ju Wu  <jasonwucj@gmail.com>
17475         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17476         * config/nds32/nds32-n13.md: New file.
17477         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17478         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17479         pipeline.
17480         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17481         * config/nds32/nds32.md (pipeline_model): Add n13.
17482         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17483         * config/nds32/pipelines.md: Include n13 settings.
17485 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
17486             Chung-Ju Wu  <jasonwucj@gmail.com>
17488         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17489         * config/nds32/nds32-n10.md: New file.
17490         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17491         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17492         pipeline.
17493         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17494         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17495         * config/nds32/nds32.md (pipeline_model): Add n10.
17496         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17497         * config/nds32/pipelines.md: Include n10 settings.
17499 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
17500             Kito Cheng  <kito.cheng@gmail.com>
17501             Chung-Ju Wu  <jasonwucj@gmail.com>
17503         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17504         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17505         Add enum values for DSP extension instructions.
17506         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17507         New constraints.
17508         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17509         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17510         New code iterators.
17511         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17512         * config/nds32/nds32-dspext.md: New file for DSP implementation.
17513         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17514         * config/nds32/nds32-intrinsic.md: Likewise.
17515         * config/nds32/nds32_intrinsic.h: Likewise.
17516         * config/nds32/nds32-md-auxiliary.c: Likewise.
17517         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17518         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17519         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17520         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17521         * config/nds32/nds32-protos.h: New declarations for DSP extension.
17522         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17523         TYPE_DMAC in switch statement.
17524         * config/nds32/nds32.c: New checking and implementation for DSP
17525         extension instructions.
17526         * config/nds32/nds32.h: Likewise.
17527         * config/nds32/nds32.md: Likewise.
17528         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17529         * config/nds32/predicates.md: Implement new predicates for DSP
17530         extension.
17532 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
17534         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17535         Reformat alternatives and attributes so it is easier to identify
17536         which constraints/attributes go with which instruction.
17537         (mov<mode>_hardfloat32, FMOVE64): Likewise.
17538         (mov<mode>_softfloat32, FMOVE64): Likewise.
17539         (mov<mode>_hardfloat64, FMOVE64): Likewise.
17540         (mov<mode>_softfloat64, FMOVE64): Likewise.
17542 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17544         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17545         subsection.
17546         (Basic PowerPC Built-in Functions): The new name of the
17547         subsection previously known as "PowerPC Built-in Functions".
17548         (Basic PowerPC Built-in Functions Available on all Configurations):
17549         New subsubsection.
17550         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17551         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17552         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17553         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17555 2018-05-11  Martin Jambor  <mjambor@suse.cz>
17557         PR ipa/85655
17558         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17559         single const.
17561 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
17563         PR target/85733
17564         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17566 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
17568         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17569         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17570         (ix86_handle_option): Handle -mwaitpkg.
17571         * config.gcc: New header.
17572         * config/i386/cpuid.h (bit_WAITPKG): New bit.
17573         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17574         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17575         function type.
17576         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17577         OPTION_MASK_ISA_WAITPKG.
17578         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17579         (ix86_option_override_internal): Add PTA_WAITPKG.
17580         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17581         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17582         IX86_BUILTIN_TPAUSE.
17583         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17584         __builtin_ia32_umwait and __builtin_ia32_tpause.
17585         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17586         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17587         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17588         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17589         UNSPECV_TPAUSE): New.
17590         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17591         * config/i386/i386.opt: Add -mwaitpkg.
17592         * config/i386/waitpkgintrin.h: New file.
17593         * config/i386/x86intrin.h: New header.
17594         * doc/invoke.texi: Add -mwaitpkg.
17596 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
17598         PR target/85606
17599         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17600         equivalent.
17601         (cortex-m0): Use armv6s-m isa.
17602         (cortex-m0plus): Likewise.
17603         (cortex-m1): Likewise.
17604         (cortex-m0.small-multiply): Likewise.
17605         (cortex-m0plus.small-multiply): Likewise.
17606         (cortex-m1.small-multiply): Likewise.
17608 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
17609             Jakub Jelinek  <jakub@redhat.com>
17611         PR tree-optimization/85692
17612         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17613         source permute as well.
17615 2018-05-11  Martin Liska  <mliska@suse.cz>
17617         PR sanitizer/85556
17618         * doc/extend.texi: Document LLVM style format for no_sanitize
17619         attribute.
17621 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
17623         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17624         mode_supports_vsx_dform_quad to mode_supports_dq_form.
17625         (mode_supports_vsx_dform_quad): Likewise.
17626         (mode_supports_vmx_dform): Move these functions to be next to the
17627         other mode_supports functions.
17628         (mode_supports_dq_form): Likewise.
17629         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17630         mode_supports_dq_form.
17631         (reg_offset_addressing_ok_p): Likewise.
17632         (offsettable_ok_by_alignment): Likewise.
17633         (rs6000_legitimate_offset_address_p): Likewise.
17634         (legitimate_lo_sum_address_p): Likewise.
17635         (rs6000_legitimize_address): Likewise.
17636         (rs6000_legitimize_reload_address): Likewise.
17637         (rs6000_secondary_reload_inner): Likewise.
17638         (rs6000_preferred_reload_class): Likewise.
17639         (rs6000_output_move_128bit): Likewise.
17641 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
17643         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17644         Generate SImode target register for null target.
17645         <case IX86_BUILTIN_XGETBV>: Ditto.
17646         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17647         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17649 2018-05-10  Carl Love  <cel@us.ibm.com>
17651         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17652         dcbtt and dcbtstt if operands[2] is 0.
17654 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
17656         PR target/85693
17657         * config/i386/sse.md (usadv64qi): New expander.
17659 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
17661         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17662         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17663         -maltivec=be support.
17664         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17665         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17666         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17667         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17668         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17669         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17670         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17671         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17672         altivec_vsumsws): Adjust.
17673         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17674         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17675         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17676         support.
17677         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17678         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17679         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17680         (altivec_lve<VI_char>x): Delete expand.
17681         (*altivec_lve<VI_char>x_internal): Rename to...
17682         (altivec_lve<VI_char>x): ... this.
17683         (altivec_lvxl_<mode>): Delete expand.
17684         (*altivec_lvxl_<mode>_internal): Rename to ...
17685         (altivec_lvxl_<mode>): ... this.
17686         (altivec_stvxl_<mode>): Delete expand.
17687         (*altivec_stvxl_<mode>_internal): Rename to ...
17688         (altivec_stvxl_<mode>): ... this.
17689         (altivec_stve<VI_char>x): Delete expand.
17690         (*altivec_stve<VI_char>x_internal): Rename to ...
17691         (altivec_stve<VI_char>x): ... this.
17692         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17693         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17694         reduc_plus_scal_<mode>): Adjust.
17695         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17696         comment.
17697         (rs6000_cpu_cpp_builtins): Adjust.
17698         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17699         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17700         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17701         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17702         -maltivec=be support.
17703         (rs6000_split_vec_extract_var): Adjust.
17704         (rs6000_split_v4si_init): Adjust.
17705         (swap_selector_for_mode): Delete.
17706         (altivec_expand_lvx_be, altivec_expand_stvx_be,
17707         altivec_expand_stvex_be): Delete.
17708         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17709         -maltivec=be support.
17710         (rs6000_gimple_fold_builtin): Ditto.
17711         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17712         Adjust.
17713         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17714         (TARGET_DIRECT_MOVE_64BIT): Adjust.
17715         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17716         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17717         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17718         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17719         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17720         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17721         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17722         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17723         anonymous split): Adjust.
17724         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17725         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17727 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
17729         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17730         when --with-gxx-include-dir is also specified.
17731         * configure: Regenerate.
17733 2018-05-09  Jim Wilson  <jimw@sifive.com>
17735         PR target/84797
17736         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17737         * config/riscv/t-withmultilib: New.
17738         * config/riscv/withmultilib.h: New.
17739         * doc/install.texi: Document RISC-V --with-multilib-list support.
17741 2018-05-09  Richard Biener  <rguenther@suse.de>
17743         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17744         vector.
17745         (vect_bb_vectorization_profitable_p): Adjust.  Compute
17746         actual scalar cost using the cost vector and the add_stmt_cost
17747         machinery.
17749 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17751         PR rtl-optimization/85645
17752         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17753         in the REG_CFA_REGISTER note for LR, don't leave it empty.
17755 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17757         PR rtl-optimization/85645
17758         * shrink-wrap.c (spread_components): Return a boolean saying if
17759         anything was changed.
17760         (try_shrink_wrapping_separate): Iterate spread_components until
17761         nothing changes anymore.
17763 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17765         PR rtl-optimization/85645
17766         * regrename.c (build_def_use): Also kill the chains that include the
17767         destination of a REG_CFA_REGISTER note.
17769 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17771         PR rtl-optimization/85645
17772         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17773         insn that has a REG_CFA_REGISTER note.
17775 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
17777         * cfgexpand.c (expand_clobber): New function.
17778         (expand_gimple_stmt_1): Use it.
17779         * tree-vect-stmts.c (vect_clobber_variable): New function,
17780         split out from...
17781         (vectorizable_simd_clone_call): ...here.
17782         (vectorizable_store): Emit a clobber either side of an
17783         IFN_STORE_LANES sequence.
17784         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17786 2018-05-09  Tom de Vries  <tom@codesourcery.com>
17788         PR target/85626
17789         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17790         (define_insn "trap_if_false"): Add exit after trap.
17792 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
17794         PR rtl-optimization/85638
17795         * bb-reorder.c: Include common/common-target.h.
17796         (create_forwarder_block): New function extracted from...
17797         (fix_up_crossing_landing_pad): ...here.  Rename into...
17798         (dw2_fix_up_crossing_landing_pad): ...this.
17799         (sjlj_fix_up_crossing_landing_pad): New function.
17800         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17801         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17802         from both partitions and exit the loop after one iteration.
17804 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17806         Revert:
17807         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17808         subsection.
17809         (Basic PowerPC Built-in Functions): The new name of the
17810         subsection previously known as "PowerPC Built-in Functions".
17811         (Basic PowerPC Built-in Functions Available on all Configurations):
17812         New subsubsection.
17813         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17814         subsubsection.
17815         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17816         subsubsection.
17817         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17818         subsubsection.
17819         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17820         subsubsection.
17822 2018-05-08  Jim Wilson  <jimw@sifive.com>
17824         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17825         (LD_EMUL_SUFFIX): New.
17826         (LINK_SPEC): Use it.
17828 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17830         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17831         subsection.
17832         (Basic PowerPC Built-in Functions): The new name of the
17833         subsection previously known as "PowerPC Built-in Functions".
17834         (Basic PowerPC Built-in Functions Available on all Configurations):
17835         New subsubsection.
17836         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17837         subsubsection.
17838         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17839         subsubsection.
17840         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17841         subsubsection.
17842         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17843         subsubsection.
17845 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
17847         PR target/85683
17848         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17849         after cmpelim optimization.
17851 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
17853         * config.gcc: Support "goldmont".
17854         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17855         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17856         PROCESSOR_GOLDMONT.
17857         * config/i386/i386.c (m_GOLDMONT): Define.
17858         (processor_target_table): Add "goldmont".
17859         (PTA_GOLDMONT): Define.
17860         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17861         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17862         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17863         (fold_builtin_cpu): Add "goldmont".
17864         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17865         (ix86_option_override_internal): Add "goldmont".
17866         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17867         (processor_type): Add PROCESSOR_GOLDMONT.
17868         * config/i386/i386.md: Add CPU "glm".
17869         * config/i386/glm.md: New file.
17870         * config/i386/x86-tune.def: Add m_GOLDMONT.
17871         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17873 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
17875         PR target/85572
17876         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17877         E_V4DImode.
17878         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17879         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
17880         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
17882         PR target/85317
17883         * config/i386/i386.c (ix86_fold_builtin): Handle
17884         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17886         PR target/85480
17887         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17888         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17890 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
17892         PR target/85658
17893         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17894         (check_arch): Likewise.
17895         (check_fpu): Return the result rather than printing it.
17896         (end arch): Fix operator precedence.
17897         (end cpu): Likewise.
17898         (END): Print the result from check_fpu.
17900 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
17901             Alan Hayward  <alan.hayward@arm.com>
17902             David Sherwood  <david.sherwood@arm.com>
17904         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17905         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17906         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17907         (*fcmuo<mode>_and): New patterns.
17909 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
17911         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17912         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17913         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17914         (cmp_op, sve_imm_con): New code attributes.
17915         (SVE_COND_INT_CMP, imm_con): Delete.
17916         (cmp_op): Remove above unspecs from int attribute.
17917         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17918         to...
17919         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
17920         comparison-specific unspecs.
17921         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17922         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17923         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17924         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17925         (*vec_fcm<cmp_op><mode>): Rename to...
17926         (*fcm<cmp_op><mode>): ...this and adjust likewise.
17927         (*vec_fcmuo<mode>): Rename to...
17928         (*fcmuo<mode>): ...this and adjust likewise.
17929         (*pred_fcm<cmp_op><mode>): New pattern.
17930         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17931         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17932         functions.
17933         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17934         and UNORDERED.
17935         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17936         (aarch64_emit_sve_predicated_cond): New function.
17937         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17938         (aarch64_emit_unspec_cond_or): Replace with...
17939         (aarch64_emit_sve_or_conds): ...this new function.  Use
17940         aarch64_emit_sve_ptrue_op for the individual comparisons and
17941         aarch64_emit_binop to OR them together.
17942         (aarch64_emit_inverted_unspec_cond): Replace with...
17943         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
17944         aarch64_emit_sve_ptrue_op for the comparison and
17945         aarch64_emit_unop to invert the result.
17946         (aarch64_expand_sve_vec_cmp_float): Update after the above
17947         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
17949 2018-05-07  Nathan Sidwell  <nathan@acm.org>
17951         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17952         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17953         (Backwards Compatibility): Likewise.
17955 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17957         PR bootstrap/85681
17958         Revert:
17959         2018-05-07  Luis Machado  <luis.machado@linaro.org>
17961         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17962         <prefetch_dynamic_strides>: New const bool field.
17963         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17964         prefetch_dynamic_strides.
17965         (exynosm1_prefetch_tune): Likewise.
17966         (thunderxt88_prefetch_tune): Likewise.
17967         (thunderx_prefetch_tune): Likewise.
17968         (thunderx2t99_prefetch_tune): Likewise.
17969         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17970         to false.
17971         (aarch64_override_options_internal): Update to set
17972         PARAM_PREFETCH_DYNAMIC_STRIDES.
17973         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17974         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17975         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17976         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17977         prefetch-dynamic-strides setting.
17979         2018-05-07  Luis Machado  <luis.machado@linaro.org>
17981         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17982         <minimum_stride>: New const int field.
17983         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17984         minimum_stride field.
17985         (exynosm1_prefetch_tune): Likewise.
17986         (thunderxt88_prefetch_tune): Likewise.
17987         (thunderx_prefetch_tune): Likewise.
17988         (thunderx2t99_prefetch_tune): Likewise.
17989         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17990         (aarch64_override_options_internal): Update to set
17991         PARAM_PREFETCH_MINIMUM_STRIDE.
17992         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17993         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17994         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17995         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17996         stride is constant and is below the minimum stride threshold.
17998 2018-05-07  Luis Machado  <luis.machado@linaro.org>
18000         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
18001         to 512.
18003 2018-05-07  Luis Machado  <luis.machado@linaro.org>
18005         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18006         <prefetch_dynamic_strides>: New const bool field.
18007         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18008         prefetch_dynamic_strides.
18009         (exynosm1_prefetch_tune): Likewise.
18010         (thunderxt88_prefetch_tune): Likewise.
18011         (thunderx_prefetch_tune): Likewise.
18012         (thunderx2t99_prefetch_tune): Likewise.
18013         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18014         to false.
18015         (aarch64_override_options_internal): Update to set
18016         PARAM_PREFETCH_DYNAMIC_STRIDES.
18017         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18018         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18019         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18020         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18021         prefetch-dynamic-strides setting.
18023 2018-05-07  Luis Machado  <luis.machado@linaro.org>
18025         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18026         <minimum_stride>: New const int field.
18027         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18028         minimum_stride field.
18029         (exynosm1_prefetch_tune): Likewise.
18030         (thunderxt88_prefetch_tune): Likewise.
18031         (thunderx_prefetch_tune): Likewise.
18032         (thunderx2t99_prefetch_tune): Likewise.
18033         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18034         (aarch64_override_options_internal): Update to set
18035         PARAM_PREFETCH_MINIMUM_STRIDE.
18036         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18037         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18038         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18039         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18040         stride is constant and is below the minimum stride threshold.
18042 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
18044         PR c++/85659
18045         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
18046         the type is addressable.  Don't force op into register if it has
18047         BLKmode.
18049 2018-05-05  Roland McGrath  <mcgrathr@google.com>
18051         PR other/77609
18052         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
18053         any section for which we don't know a specific type it should have,
18054         regardless of name.  Previously this was done only for the exact
18055         names ".init_array", ".fini_array", and ".preinit_array".
18056         (default_elf_asm_named_section): Add comment about
18057         relationship with default_section_type_flags and SECTION_NOTYPE.
18058         (get_section): Don't consider it a type conflict if one side has
18059         SECTION_NOTYPE and the other doesn't, as long as neither has the
18060         SECTION_BSS et al used in the default_section_type_flags logic.
18062 2018-05-05  Tom de Vries  <tom@codesourcery.com>
18064         PR target/85653
18065         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
18066         (workaround_barsyncs): New function.
18067         (nvptx_reorg): Use workaround_barsyncs.
18068         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18069         (define_expand "nvptx_membar_cta"): New define_expand.
18070         (define_insn "*nvptx_membar_cta"): New insn.
18072 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
18074         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
18075         To improve optimization opportunities.
18076         * builtin-types.def: The new needed builtin types for the above.
18078 2018-05-04  Richard Biener  <rguenther@suse.de>
18080         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
18081         * gimple-ssa-store-merging.c
18082         (imm_store_chain_info::output_merged_store): Remove redundant create,
18083         release split_store vector contents on failure.
18084         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
18085         scalar stmt vector on cache hit.
18087 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
18089         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
18090         Xilinx FP support.
18091         * config.gcc (powerpc-xilinx-eabi*): Remove.
18092         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
18093         support.
18094         (fusion_addis_mem_combo_load): Ditto.
18095         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
18096         FP support.
18097         (rs6000_cpu_cpp_builtins): Ditto.
18098         * config/rs6000/rs6000-linux.c
18099         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
18100         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
18101         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
18102         support.
18103         (rs6000_setup_reg_addr_masks): Ditto.
18104         (rs6000_init_hard_regno_mode_ok): Ditto.
18105         (rs6000_option_override_internal): Ditto.
18106         (legitimate_lo_sum_address_p): Ditto.
18107         (rs6000_legitimize_address): Ditto.
18108         (rs6000_legitimize_reload_address): Ditto.
18109         (rs6000_legitimate_address_p): Ditto.
18110         (abi_v4_pass_in_fpr): Ditto.
18111         (setup_incoming_varargs): Ditto.
18112         (rs6000_gimplify_va_arg): Ditto.
18113         (rs6000_split_multireg_move): Ditto.
18114         (rs6000_savres_strategy): Ditto.
18115         (rs6000_emit_prologue_components): Ditto.
18116         (rs6000_emit_epilogue_components): Ditto.
18117         (rs6000_emit_prologue): Ditto.
18118         (rs6000_emit_epilogue): Ditto.
18119         (rs6000_elf_file_end): Ditto.
18120         (rs6000_function_value): Ditto.
18121         (rs6000_libcall_value): Ditto.
18122         * config/rs6000/rs6000.h: Ditto.
18123         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
18124         (TARGET_MINMAX): ... this.  New.
18125         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
18126         * config/rs6000/rs6000.md: Remove Xilinx FP support.
18127         (*movsi_internal1_single): Delete.
18128         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
18129         mfpu=, mxilinx-fpu): Delete.
18130         * config/rs6000/singlefp.h: Delete.
18131         * config/rs6000/sysv4.h: Remove Xilinx FP support.
18132         * config/rs6000/t-rs6000: Ditto.
18133         * config/rs6000/t-xilinx: Delete.
18134         * config/rs6000/titan.md: Adjust for fp_type removal.
18135         * config/rs6000/vsx.md: Remove Xilinx FP support.
18136         (VStype_simple): Delete.
18137         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
18138         * config/rs6000/xfpu.h: Delete.
18139         * config/rs6000/xfpu.md: Delete.
18140         * config/rs6000/xilinx.h: Delete.
18141         * config/rs6000/xilinx.opt: Delete.
18142         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
18143         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
18145 2018-05-04  Tom de Vries  <tom@codesourcery.com>
18147         PR libgomp/85639
18148         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
18149         if ignore == 0.
18151 2018-05-04  Richard Biener  <rguenther@suse.de>
18153         PR middle-end/85627
18154         * tree-complex.c (update_complex_assignment): We are always in SSA form.
18155         (expand_complex_div_wide): Likewise.
18156         (expand_complex_operations_1): Likewise.
18157         (expand_complex_libcall): Preserve EH info of the original stmt.
18158         (tree_lower_complex): Handle removed blocks.
18159         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
18160         on complex multiplication and division libcall builtins.
18162 2018-05-04  Richard Biener  <rguenther@suse.de>
18164         PR middle-end/85574
18165         * fold-const.c (negate_expr_p): Restrict negation of operand
18166         zero of a division to when we know that can happen without
18167         overflow.
18168         (fold_negate_expr_1): Likewise.
18170 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
18172         PR libstdc++/85466
18173         * real.h (real_nextafter): Declare.
18174         * real.c (real_nextafter): New function.
18175         * fold-const-call.c (fold_const_nextafter): New function.
18176         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
18177         CASE_CFN_NEXTTOWARD.
18178         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
18179         even when arg1_mode is different from arg0_mode.
18181 2018-05-03  Nathan Sidwell  <nathan@acm.org>
18183         * doc/extend.texi (Deprecated Features): Remove
18184         -ffriend-injection.
18185         (Backwards Compatibility): Likewise.
18186         * doc/invoke.texi (C++ Language Options): Likewise.
18187         (C++ Dialect Options): Likewise.
18189 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
18191         PR target/85530
18192         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
18193         _mm512_mask_mullox_epi64): New intrinsics.
18195 2018-05-03  Tom de Vries  <tom@codesourcery.com>
18197         PR testsuite/85106
18198         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18199         dump files): Add offload-tree.
18201 2018-05-03  Richard Biener  <rguenther@suse.de>
18203         PR tree-optimization/85615
18204         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
18205         to loops not nested in BBs loop father to avoid creating multi-entry
18206         loops.
18208 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18210         PR tree-optimization/70291
18211         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
18212         arguments.  Change return type to tree.  Emit libcall as a new
18213         statement rather than replacing existing one when inplace_p is true.
18214         (expand_complex_multiplication_components): New function.
18215         (expand_complex_multiplication): Expand floating-point complex
18216         multiplication using the above.
18217         (expand_complex_division): Rename inner_type parameter to type.
18218         Update expand_complex_libcall call-site.
18219         (expand_complex_operations_1): Update expand_complex_multiplication
18220         and expand_complex_division call-sites.
18222 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
18224         PR target/85582
18225         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18226         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18227         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
18228         the highest significant bit of the shift count mask is clear.  In
18229         check whether and[sq]i3 is needed verify that all significant bits
18230         of the shift count other than the highest are set.
18232 2018-05-02  Tom de Vries  <tom@codesourcery.com>
18234         PR libgomp/82428
18235         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
18236         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
18237         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
18238         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
18239         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
18240         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
18241         __builtin_goacc_parlevel_size.
18243 2018-05-02  Richard Biener  <rguenther@suse.de>
18245         PR tree-optimization/85597
18246         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
18247         do not use split vect_get_vec_defs call but call vect_get_slp_defs
18248         directly.
18250 2018-05-02  Tom de Vries  <tom@codesourcery.com>
18252         PR testsuite/85106
18253         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18254         dump files): Add ltrans-tree.
18256 2018-05-02  Tom de Vries  <tom@codesourcery.com>
18258         PR testsuite/85106
18259         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18260         dump files): Add wpa-ipa.
18262 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
18264         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
18265         powerpc*-*-linux*paired* target.
18266         * config/rs6000/750cl.h: Delete.
18267         * config/rs6000/paired.h: Delete.
18268         * config/rs6000/paired.md: Delete.
18269         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
18270         float support.
18271         * config/rs6000/rs6000-builtin.def: Remove paired float support.
18272         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
18273         comment.  Remove paired float support.
18274         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
18275         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
18276         VECTOR_PAIRED.
18277         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
18278         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
18279         declarations.
18280         * config/rs6000/rs6000.c: Remove paired float support.
18281         (paired_expand_vector_init, paired_expand_vector_move,
18282         paired_emit_vector_compare, paired_emit_vector_cond_expr,
18283         (paired_expand_lv_builtin, paired_expand_stv_builtin,
18284         paired_expand_builtin, paired_expand_predicate_builtin,
18285         paired_init_builtins): Delete.
18286         * config/rs6000/rs6000.h: Remove paired float support.
18287         * config/rs6000/rs6000.md: Remove paired float support.
18288         (move_from_CR_ov_bit): Delete.
18289         * config/rs6000/rs6000.opt (mpaired): Delete.
18290         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18291         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18293 2018-05-02  Richard Biener  <rguenther@suse.de>
18295         PR middle-end/85567
18296         * gimplify.c (gimplify_save_expr): When in SSA form allow
18297         SAVE_EXPRs to compute to SSA vars.
18299 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
18301         PR target/85582
18302         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18303         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18304         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18305         clobber operands[2], instead use a new pseudo.  Formatting fixes.
18307 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
18309         PR tree-optimization/85586
18310         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18311         exit early for statements in the same group if the accesses are
18312         not strided.
18314 2018-05-02  Tom de Vries  <tom@codesourcery.com>
18316         PR lto/85451
18317         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18318         error message.
18320 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
18322         PR tree-optimization/85143
18323         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18325 2018-05-01  Tom de Vries  <tom@codesourcery.com>
18327         PR lto/85451
18328         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18329         not found" error message.
18331 2018-05-01  Tom de Vries  <tom@codesourcery.com>
18333         PR other/83786
18334         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18335         * vec.c (test_ordered_remove_if): New function.
18336         (vec_c_tests): Call test_ordered_remove_if.
18337         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18338         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18339         * tree-vect-patterns.c (vect_pattern_recog_1): Use
18340         VEC_ORDERED_REMOVE_IF.
18342 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18344         PR tree-optimization/82665
18345         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18346         pointer subtraction where arguments come from a memchr call.
18348 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
18350         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18351         --push-state --as-needed and --pop-state instead of --as-needed and
18352         --no-as-needed if ld supports it.
18353         * configure: Regenerated.
18355         PR web/85578
18356         * doc/install.texi2html: Replace _002d with - and _002a with * in
18357         generated html files using sed.
18359 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
18361         PR c++/85523
18362         * gcc-rich-location.c (blank_line_before_p): New function.
18363         (use_new_line): New function.
18364         (gcc_rich_location::add_fixit_insert_formatted): New function.
18365         * gcc-rich-location.h
18366         (gcc_rich_location::add_fixit_insert_formatted): New function.
18368 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
18370         * selftest.c (assert_streq): Rename "expected" and "actual" to
18371         "val1" and "val2".  Extend NULL-handling to cover both inputs
18372         symmetrically, while still requiring both to be non-NULL for a pass.
18373         * selftest.h (assert_streq): Rename "expected" and "actual" to
18374         "val1" and "val2".
18375         (ASSERT_EQ): Likewise.
18376         (ASSERT_EQ_AT): Likewise.
18377         (ASSERT_KNOWN_EQ): Likewise.
18378         (ASSERT_KNOWN_EQ_AT): Likewise.
18379         (ASSERT_NE): Likewise.
18380         (ASSERT_MAYBE_NE): Likewise.
18381         (ASSERT_MAYBE_NE_AT): Likewise.
18382         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
18383         the assertion to pass.
18384         (ASSERT_STREQ_AT): Likewise.
18386 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
18388         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18389         interaction with -pie.
18391 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
18393         * selftest.h: Fix alphabetization of per-source-file selftest
18394         declarations.
18396 2018-04-30  Jason Merrill  <jason@redhat.com>
18398         PR c++/61982 - dead stores to destroyed objects.
18399         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18400         of clobber.
18402 2018-04-30  Jason Merrill  <jason@redhat.com>
18404         * tree.c (build_clobber): New.
18405         * tree.h: Declare it.
18406         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18408 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
18410         * diagnostic-show-locus.c (layout::layout): Update for
18411         location_get_source_line returning a char_span.
18412         (struct char_span): Move to input.h.
18413         (struct correction): Update for fields in char_span becoming
18414         private.
18415         (struct source_line): Update for location_get_source_line
18416         returning a char_span.
18417         (layout::print_line): Likewise.
18418         * edit-context.c (edited_file::print_content): Likewise.
18419         (edited_file::print_diff_hunk): Likewise.
18420         (edited_file::print_run_of_changed_lines): Likewise.
18421         (edited_file::get_num_lines): Likewise.
18422         (edited_line::edited_line): Likewise.
18423         * final.c (asm_show_source): Likewise.
18424         * input.c (location_get_source_line): Convert return type
18425         from const char * to char_span, losing the final "line_len"
18426         param.
18427         (dump_location_info): Update for the above.
18428         (get_substring_ranges_for_loc): Likewise.  Use a char_span
18429         when handling the literal within the line.
18430         (test_reading_source_line): Update for location_get_source_line
18431         returning a char_span.
18432         * input.h (class char_span): Move here from
18433         diagnostic-show-locus.c, converting from a struct to a class.
18434         Make data members private.
18435         (char_span::operator bool): New.
18436         (char_span::length): New.
18437         (char_span::get_buffer): New.
18438         (char_span::operator[]): New.
18439         (char_span::subspan): Make const.
18440         (char_span::xstrdup): New.
18441         (location_get_source_line): Convert return type from const char *
18442         to char_span, losing the final "line_size" param.
18444 2018-04-30  Jan Hubicka  <jh@suse.cz>
18446         * lto-wrapper.c (ltrans_priorities): New static var.
18447         (cmp_priority): New.
18448         (run_gcc): Read priorities and if doing parallel build order
18449         the Makefile by them.
18451 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
18453         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18455 2018-04-30  Richard Biener  <rguenther@suse.de>
18457         * tree-cfg.c (verify_address): Remove base argument, add
18458         flag whether to check TREE_ADDRESSABLE and do that.
18459         (verify_expr): Remove.
18460         (verify_types_in_gimple_reference): Add pieces from verify_expr.
18461         (verify_gimple_assign_single): Likewise.
18462         (verify_gimple_switch): Likewise.
18463         (verify_expr_location_1): Dereference tp once.  Add (disabled)
18464         piece from verify_expr.
18465         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18467 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
18469         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18471 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
18473         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18474         (small_data_pattern): Likewise.
18475         (arc_rewrite_small_data): Likewise.
18476         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18477         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18478         (get_symbol_alignment): New function.
18479         (legitimate_small_data_address_p): Likewise.
18480         (legitimate_scaled_address): Update, call
18481         legitimate_small_data_address_p.
18482         (output_sdata): New static variable.
18483         (arc_print_operand): Update how we handle small data operands.
18484         (arc_print_operand_address): Likewise.
18485         (arc_legitimate_address_p): Update, use
18486         legitimate_small_data_address_p.
18487         (arc_rewrite_small_data_p): Remove.
18488         (arc_rewrite_small_data_1): Likewise.
18489         (arc_rewrite_small_data): Likewise.
18490         (small_data_pattern): Likewise.
18491         (compact_sda_memory_operand): Update to use
18492         legitimate_small_data_address_p and get_symbol_alignment.
18493         (prepare_move_operands): Don't rewite sdata pattern.
18494         (prepare_extend_operands): Remove.
18495         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18496         pattern.
18497         (zero_extendqisi2): Likewise.
18498         (zero_extendhisi2): Likewise.
18499         (extendqihi2): Likewise.
18500         (extendqisi2): Likewise.
18501         (extendhisi2): Likewise.
18502         (addsi3): Likewise.
18503         (subsi3): Likewise.
18504         (andsi3): Likewise.
18505         * config/arc/constraints.md (Usd): Change it to memory constraint.
18507 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
18509         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18510         as source of std instructions.
18511         * config/arc/arc.md (movsi_insn): Update pattern predicate to
18512         allow 6-bit constants as source for store instructions.
18513         (movdi_insn): Update instruction pattern to allow 6-bit constants
18514         as source for store instructions.
18516 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
18518         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18520 2018-04-30  Nathan Sidwell  <nathan@acm.org>
18521             Sandra Loosemore <sandra@codesourcery.com>
18523         * dumpfile.c (dump_open): Allow '-' for stdout.
18524         * doc/invoke.texi (Developer Options): Document dump filename
18525         determination early.  Document stdin/stdout selection.
18527 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
18529         Microblaze Target: PIC data text relative
18531         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18532         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18533         Add declaration.
18534         * config/microblaze/microblaze.h (microblaze_constant_address_p):
18535         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18536         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18537         New addressing mode for data-text relative position indepenedent code.
18538         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18539         'ADDRESS_SYMBOLIC_TXT_REL'.
18540         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18541         (microblaze_legitimate_pic_operand): Exclude function calls from
18542         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18543         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18544         addresses cases.
18545         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18546         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18547         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18548         for 'address + offset'.
18549         (microblaze_expand_prologue): Add new function prologue call for
18550         'r20' assignation.
18551         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18552         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18553         table in case of TARGET_PIC_DATA_TEXT_REL.
18554         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18555         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18556         Add new macros 'UNSPEC_TEXT',
18557         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18558         + exclude function calls from 'UNSPEC_PLT' in case of data text
18559         relative mode.
18560         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18561         new target hook for generating address diff vector tables in case of
18562         flag_pic.
18563         * doc/tm.texi : Regenerate.
18564         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18565         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18566         of addr diff vector generation.
18567         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18568         target hook definition.
18569         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18570         Add default function for generate_pic_addr_diff_vec -> flag_pic.
18571         * doc/invoke.texi (Add new pic option): Add new microblaze pic
18572         option for data text relative.
18574 2018-04-30  Richard Biener  <rguenther@suse.de>
18576         * tree-chrec.h (evolution_function_is_constant_p): Remove
18577         redundant check.
18578         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18580 2018-04-30  Richard Biener  <rguenther@suse.de>
18582         PR bootstrap/85571
18583         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18585 2018-04-30  Richard Biener  <rguenther@suse.de>
18587         PR tree-optimization/28364
18588         PR tree-optimization/85275
18589         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18590         copying first exit test.
18592 2018-04-28  Mark Wielaard  <mark@klomp.org>
18594         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18595         dwarf_version >= 5.
18596         (dwarf_AT): Handle DW_AT_addr_base.
18597         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18599 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
18601         PR target/84431
18602         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18603         (*ashl<dwi>3_doubleword_mask_1): Ditto.
18604         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18605         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18607 2018-04-28  Richard Biener  <rguenther@suse.de>
18609         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18610         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18611         to reflect use.  Only add interesting stmts.
18613 2018-04-27  Martin Jambor  <mjambor@suse.cz>
18615         PR ipa/85549
18616         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18617         the jump function allows for passing through aggregate values.
18619 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
18621         * input.h (in_system_header_at): Convert from macro to inline
18622         function.
18623         (from_macro_expansion_at): Likewise.
18624         (from_macro_definition_at): Likewise.
18626 2018-04-27  Jeff Law  <law@redhat.com>
18628         * config.gcc: Mark tile* targets as deprecated/obsolete.
18630 2018-04-27  Richard Biener  <rguenther@suse.de>
18632         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18633         fix for ILP32.
18635 2018-04-27  Richard Biener  <rguenther@suse.de>
18637         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18639 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
18641         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18642         with Yd constraint. Set "preferred_for_speed" attribute from
18643         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18644         with Yd constraint.
18645         (*movdi_internal): Ditto.
18646         (movti_interunit splitters): Remove
18647         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18648         (movdi_interunit splitters): Ditto.
18649         * config/i386/constraints.md (Ye): Remove.
18650         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18652 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18654         PR target/85512
18655         * config/aarch64/constraints.md (Usg): Limit to 31.
18656         (Usj): Limit to 63.
18658 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
18660         PR tree-optimization/85529
18661         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18662         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18663         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18664         zero extension or masking of the MSB bit.
18665         (optimize_range_tests): Add FIRST_BB argument, pass it through
18666         to optimize_range_tests_var_bound.
18667         (maybe_optimize_range_tests, reassociate_bb): Adjust
18668         optimize_range_tests callers.
18670 2018-04-26  Richard Biener  <rguenther@suse.de>
18671             Jakub Jelinek  <jakub@redhat.com>
18673         * cgraph.h (symbol_table): Just declare debug method here.
18674         * symtab.c (symbol_table::debug): Define.
18676 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
18678         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18680 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
18682         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18683         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18684         (*movdi_internal): Substitute Yi and Yj constraint with x
18685         and Ym and Yn constraint with y constraint.  Update "isa"
18686         attribute and set "preferred_for_speed" attribute from
18687         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18688         (*movsi_internal): Ditto.
18689         (*movdf_internal): Ditto.
18690         (*movsf_internal): Ditto.
18691         (*zero_extendsidi2): Ditto.
18692         * config/i386/sse.md (vec_set<mode>_0): Ditto.
18693         (sse2_loadld): Ditto.
18694         (*vec_extract<ssevecmodelower>_0): Ditto.
18695         (*vec_extractv4si_0_zext_sse4): Ditto.
18696         (vec_concatv2di): Ditto.
18697         (*vec_dup<mode>): Ditto.
18698         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18699         * config/i386/constraints.md (Yi): Remove.
18700         (Yj): Remove.
18701         (Ym): Remove.
18702         (Yn): Remove.
18704 2018-04-26  Nathan Sidwell  <nathan@acm.org>
18706         * dumpfile.c (dump_open): New.
18707         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18708         (dump_finish): Detect stdio/stderr by value not name.
18710 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
18712         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18714 2018-04-26  Tom de Vries  <tom@codesourcery.com>
18716         PR target/84952
18717         * config/nvptx/nvptx.c (verify_neutering_jumps)
18718         (verify_neutering_labels): New function
18719         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18721 2018-04-26  Tom de Vries  <tom@codesourcery.com>
18723         PR target/84025
18724         * config/nvptx/nvptx.c (needs_neutering_p): New function.
18725         (nvptx_single): Use needs_neutering_p to skip over insns that do not
18726         need neutering.
18728 2018-04-26  Richard Biener <rguenther@suse.de>
18729             Tom de Vries  <tom@codesourcery.com>
18731         PR lto/85422
18732         * lto-streamer-out.c (output_function): Fixup loops if required to match
18733         discovery done in the reader.
18735 2018-04-26  Richard Biener  <rguenther@suse.de>
18737         PR tree-optimization/85116
18738         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18739         have a loop exit from the single latch predecessor.  Remove
18740         case of header with just condition.
18741         (ch_base::copy_headers): Exclude infinite loops from any
18742         processing.
18743         (pass_ch::execute): Record exits.
18745 2018-04-26  Richard Biener  <rguenther@suse.de>
18747         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18748         prologue cost vector and pass it to vect_get_load_cost.
18749         (vect_get_peeling_costs_all_drs): Likewise.
18750         (vect_peeling_hash_get_lowest_cost): Likewise.
18751         (vect_enhance_data_refs_alignment): Likewise.
18753 2018-04-26  Richard Biener  <rguenther@suse.de>
18755         PR middle-end/85450
18756         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18757         checking of integer<->pointer conversions.
18758         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18759         sign-/zero-extending pointer types.
18760         (expand_omp_for_static_chunk): Likewise.
18762 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
18763             Jean Lee  <xiaoyur347@gmail.com>
18765         * config/mips/mips.c (mips_asan_shadow_offset): New function.
18766         (TARGET_ASAN_SHADOW_OFFSET): Define.
18767         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18768         true for -fsanitize=address.
18770 2018-04-25  Mark Wielaard  <mark@klomp.org>
18772         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18773         shorter ones.
18775 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
18777         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18778         than "alu", remove explicit "memory" and "imm_disp" attributes.
18779         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18781         PR middle-end/85414
18782         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18783         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18784         gen_lowpart_no_emit.
18786 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
18788         PR target/85473
18789         * config/i386/i386.c (ix86_expand_builtin): Change memory
18790         operand to XI, extend p0 to Pmode.
18791         * config/i386/i386.md: Change unspec volatile and operand
18792         1 mode to XI, change operand 0 mode to P.
18794 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18796         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18797         GET_MODE_MASK before any checking.
18798         (nds32_can_use_bset_p): Likewise.
18799         (nds32_can_use_btgl_p): Likewise.
18801 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18803         * config/nds32/nds32-doubleword.md: New define_split pattern for
18804         illegal register number.
18806 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18808         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18810 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18812         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18814 2018-04-25  Richard Biener  <rguenther@suse.de>
18816         * lto-streamer.h (LTO_major_version): Bump to 8.
18818 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
18820         * BASE-VER: Set to 9.0.0.
18822 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
18824         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18825         in __abskf2 and __powikf2.
18827 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18829         PR target/85512
18830         * config/aarch64/constraints.md (Usg, Usj): New constraints.
18831         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18832         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18833         Use the above on operand 2.  Reindent.
18834         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18836 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
18838         PR target/85485
18839         * common/config/i386/i386-common.c (ix86_handle_option): Don't
18840         handle OPT_mcet.
18841         * config/i386/i386.opt (mcet): Removed.
18842         * doc/install.texi: Remove -mcet documentation.
18843         * doc/invoke.texi: Likewise.
18845 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
18847         PR target/85485
18848         * doc/install.texi: Remove -mcet from bootstrap-cet.
18850 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18852         PR target/85511
18853         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18854         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18855         if TARGET_64BIT.
18857         PR target/85503
18858         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18859         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18860         containing a CONST_VECTOR.
18862 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
18864         * doc/install.texi: Update newlib dependency for nvptx.
18866 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18868         PR target/85508
18869         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18870         instead of INTVAL when shifting x left.
18872 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
18874         PR tree-optimization/85478
18875         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18876         vect_grouped_store_supported for single element vectors.
18878 2018-04-24  Richard Biener  <rguenther@suse.de>
18880         PR target/85491
18881         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18882         load cost increase to the case of non-constant step.
18884 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18886         PR target/84828
18887         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18888         destination if any_malformed_asm.
18890 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
18892         PR middle-end/85496
18893         * expr.c (store_field): In the bitfield case, if the value comes from
18894         a function call and is returned in registers by means of a PARALLEL,
18895         do not change the mode of the temporary unless BLKmode and VOIDmode.
18897 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
18899         PR rtl-optimization/85423
18900         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18901         dependencies to debug insns when the previous insn is non-debug.
18903 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
18905         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18906         enums into a single definition.
18907         (fls): Fix predicates and printing.
18908         (seti): Likewise.
18910 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
18912         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18913         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18914         and short u6 immediate.
18915         (check_if_valid_sleep_operand): Remove.
18916         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18918 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18920         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18921         flag_always_save_lp condition.
18922         * config/nds32/nds32.opt (malways-save-lp): New option.
18924 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18926         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18927         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18928         * config/nds32/nds32.h
18929         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18930         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18932 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18934         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18935         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18937 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18938             Chung-Ju Wu  <jasonwucj@gmail.com>
18940         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18941         Declare.
18942         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18943         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18945 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18947         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18949 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18951         * config/nds32/nds32-protos.h (nds32_data_alignment,
18952         nds32_local_alignment): Declare.
18953         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18954         nds32_local_alignment): New functions.
18955         (TARGET_CONSTANT_ALIGNMENT): Define.
18956         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18958 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18960         * config/nds32/nds32.c
18961         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18962         (TARGET_MODES_TIEABLE_P): Likewise.
18964 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18966         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18967         level Ofast and Og.
18969 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
18970             Chung-Ju Wu  <jasonwucj@gmail.com>
18972         * config/nds32/constants.md (unspec_volatile_element): Add enum values
18973         for unaligned access.
18974         * config/nds32/nds32-intrinsic.c: Implementation of expanding
18975         unaligned access.
18976         * config/nds32/nds32-intrinsic.md: Likewise.
18977         * config/nds32/nds32_intrinsic.h: Likewise.
18978         * config/nds32/nds32.h (nds32_builtins): Likewise.
18979         * config/nds32/nds32.opt (munaligned-access): New option.
18980         * config/nds32/nds32.c (nds32_asm_file_start): Display
18981         flag_unaligned_access status.
18983 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
18985         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18986         -mno-relax is present.
18987         * config/riscv/linux.h (LINK_SPEC): Ditto.
18989 2018-04-20  Martin Sebor  <msebor@redhat.com>
18991         PR c/85365
18992         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18993         for null pointers.
18994         (gimple_fold_builtin_stxcpy_chk): Same.
18995         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18997 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
18999         PR target/85456
19000         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
19001         __powikf2 when long double is IEEE 128-bit.
19003 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
19005         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
19006         step to make sure stack always aligned.
19008 2018-04-20  Carl Love  <cel@us.ibm.com>
19010         PR target/83402
19011         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
19012         size check for arg0.
19014 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
19015             Tom de Vries  <tom@codesourcery.com>
19017         PR target/85445
19018         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
19019         Emit insns for calls too.
19020         (nvptx_find_par): Always look for worker-level predecessor insn.
19021         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
19022         calls.
19023         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
19024         (nvptx_process_pars): Propagate frames for calls.
19026 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
19028         PR target/85469
19029         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
19030         Removed.
19031         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
19032         (ix86_handle_option): Don't handle OPT_mibt.
19033         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
19034         __SHSTK__.
19035         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
19036         has_ibt and ibt.
19037         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
19038         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
19039         (ix86_target_macros): Define __CET__ with flag_cf_protection
19040         for -fcf-protection.
19041         * config/i386/i386.c (isa2_opts): Remove -mibt.
19042         * config/i386/i386.h (TARGET_IBT): Removed.
19043         (TARGET_IBT_P): Likewise.
19044         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
19045         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
19046         * config/i386/i386.opt (mcet): Update help message.
19047         (mshstk): Likewise.
19048         (mibt): Removed.
19049         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
19050         -mcet as an alias for -mshstk.
19052 2018-04-20  Richard Biener <rguenther@suse.de>
19054         PR middle-end/85475
19055         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
19056         complexity by forcing a single use of the multiply operand.
19058 2018-04-20  Martin Jambor  <mjambor@suse.cz>
19060         ipa/85449
19061         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
19062         recursion dependency to only apply to non-clones.
19064 2018-04-20  Martin Jambor  <mjambor@suse.cz>
19066         ipa/85447
19067         * ipa-cp.c (create_specialized_node): Check that clones of
19068         self-recursive edges exist during IPA-CP.
19070 2018-04-19  Toon Moene  <toon@moene.org>
19072         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
19073         by -O3.
19075 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
19077         PR tree-optimization/85467
19078         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
19079         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
19080         VECTOR_CST element to type.
19082 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
19084         PR target/85397
19085         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
19086         * config/i386/i386.md (builtin_setjmp_setup): Removed.
19087         (builtin_longjmp): Likewise.
19088         (save_stack_nonlocal): New pattern.
19089         (restore_stack_nonlocal): Likewise.
19091 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
19093         PR target/85404
19094         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19095         Replace ASM_OUTPUT_LABEL with fprintf.
19097 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
19099         PR target/85417
19100         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19101         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
19102         * config/i386/i386-c.c (ix86_target_macros_internal): Also
19103         define __IBT__ and __SHSTK__ for -fcf-protection.
19104         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
19105         TARGET_IBT.
19106         (ix86_trampoline_init): Likewise.
19107         (x86_output_mi_thunk): Likewise.
19108         (ix86_notrack_prefixed_insn_p): Likewise.
19109         (ix86_option_override_internal): Don't disallow -fcf-protection.
19110         * config/i386/i386.md (rdssp<mode>): Also enable for
19111         -fcf-protection.
19112         (incssp<mode>): Likewise.
19113         (nop_endbr): Likewise.
19114         * config/i386/i386.opt (mcet): Change help message to built-in
19115         functions only.
19116         (mibt): Likewise.
19117         (mshstk): Likewise.
19118         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
19119         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
19120         enable CET built-in functions.
19122 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
19124         * common/config/i386/i386-common.c
19125         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
19126         OPTION_MASK_ISA_MOVDIRI_UNSET,
19127         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
19128         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
19129         * config.gcc (movdirintrin.h): New header.
19130         * config/i386/cpuid.h (bit_MOVDIRI,
19131         bit_MOVDIR64B): New bits.
19132         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
19133         and -mmvodir64b.
19134         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
19135         (VOID, PVOID, PCVOID)): New function types.
19136         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
19137         __builtin_ia32_directstoreu_u64,
19138         __builtin_ia32_movdir64b): New builtins.
19139         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
19140         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
19141         and -mmovdiri.
19142         (ix86_valid_target_attribute_inner_p): Ditto.
19143         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
19144         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
19145         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
19146         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
19147         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
19148         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
19149         (movdiri<mode>, movdir64b_<mode>): New.
19150         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
19151         * config/i386/immintrin.h: Include movdirintrin.h.
19152         * config/i386/movdirintrin.h: New file.
19153         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
19155 2018-04-19  Richard Biener  <rguenther@suse.de>
19157         PR middle-end/85455
19158         * cfg.c (clear_bb_flags): When loop state says we have
19159         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
19161 2018-04-19  Richard Biener  <rguenther@suse.de>
19163         PR tree-optimization/84737
19164         * tree-vect-data-refs.c (vect_copy_ref_info): New function
19165         copying restrict info.
19166         (vect_setup_realignment): Use it.
19167         * tree-vectorizer.h (vect_copy_ref_info): Declare.
19168         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
19169         the first DR to all generated stores.
19170         (vectorizable_load): Likewise for loads.
19172 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
19174         PR tree-optimization/85446
19175         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
19176         the integral and pointer types to have the same precision.
19178         * doc/install.texi: Document --disable-cet being the default and
19179         --enable-cet=auto.
19181 2018-04-18  Martin Liska  <mliska@suse.cz>
19183         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
19184         style.
19186 2018-04-18  Martin Liska  <mliska@suse.cz>
19188         Revert
19189         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
19191         PR ipa/83983
19192         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19193         arguments if they are comparable.
19195 2018-04-18  Martin Liska  <mliska@suse.cz>
19197         Revert
19198         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
19200         PR lto/84805
19201         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19202         incomplete types.
19204 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
19206         PR target/85388
19207         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
19208         ENDBR after calling __morestack.
19210 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
19212         PR jit/85384
19213         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
19214         by using gcc_base_ver to generate a gcc_driver_version, and use
19215         it when generating GCC_DRIVER_NAME.
19216         * configure: Regenerate.
19218 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
19220         PR target/81084
19221         * config.gcc: Obsolete powerpc*-*-*spe*.
19223 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
19225         PR debug/84637
19226         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
19227         (stabstr_D): Change type of unum from unsigned int to
19228         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
19229         type.
19231 2018-04-17  Jim Wilson  <jimw@sifive.com>
19233         PR 84856
19234         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
19235         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
19236         Set arg_pointer_offset after using pretend_args_size.
19238 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
19240         PR rtl-optimization/85431
19241         * dse.c (record_store): Ignore zero width stores.
19243         PR sanitizer/85230
19244         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
19245         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
19246         __builtin_stack_restore rather than after it.
19247         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
19248         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
19249         argument instead of virtual_dynamic_stack_rtx.
19251 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19253         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
19254         New prototype.
19255         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19256         Add note to error message to explain internal mapping of overloaded
19257         built-in function name to non-overloaded built-in function name.
19258         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
19259         function.
19261 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
19263         PR target/85424
19264         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
19265         where the inputs overlap with the output.
19267 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
19269         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
19270         (=v, v) alternative and explicit "memory" attribute.
19271         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
19272         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19273         attributes.
19274         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
19275         "sselog1" type instead of "sselog".
19276         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
19277         "sselog".  Remove explicit "memory" attribute.
19278         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
19279         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19280         attributes.
19281         (vec_extract_hi_v32hi): Merge all alternatives into one, use
19282         "sselog1" type instead of "sselog".  Remove explicit "memory"
19283         attribute.
19284         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19285         use "sselog1" type instead of "sselog".  Remove explicit "memory"
19286         attribute.
19287         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19288         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19289         attributes.
19290         (vec_extract_hi_v64qi): Merge all alternatives into one, use
19291         "sselog1" type instead of "sselog".  Remove explicit "memory"
19292         attribute.
19293         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19294         use "sselog1" type instead of "sselog".  Remove explicit "memory"
19295         attribute.
19297         PR target/85430
19298         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19300         PR middle-end/85414
19301         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19302         on a SUBREG.
19304 2018-04-17  Martin Jambor  <mjambor@suse.cz>
19306         PR ipa/85421
19307         * ipa-cp.c (create_specialized_node): Call
19308         expand_all_artificial_thunks if necessary.
19310 2018-04-17  Martin Liska  <mliska@suse.cz>
19312         PR lto/85405
19313         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19314         in message, remote space in between '_G' and '('.
19316 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
19318         PR target/85281
19319         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19320         avx512f_vmcmp<mode>3<round_saeonly_name>,
19321         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19322         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19323         avx512f_rndscale<mode><round_saeonly_name>,
19324         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19325         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19326         Use %<iptr>2 instead of %2 for -masm=intel.
19327         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19328         avx512f_vcvttss2usi<round_saeonly_name>,
19329         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19330         -masm=intel.
19331         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19332         avx512f_vcvttsd2usi<round_saeonly_name>,
19333         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19334         Use %q1 instead of %1 for -masm=intel.
19335         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19336         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19337         of %3 for -masm=intel.
19338         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19339         -masm=intel.
19340         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19341         -masm=intel.
19342         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19343         -masm=intel.
19344         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19345         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19346         %g1.
19347         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19348         -masm=intel.
19349         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19350         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19351         %g1 and one with %0 and %1.
19352         (avx512er_vmrcp28<mode><round_saeonly_name>,
19353         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19354         %1 for -masm=intel.
19355         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19356         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19357         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19358         of %0 and %{%4%} for -masm=intel.
19359         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19360         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19361         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19362         order of %0 and %{%5%}%{z%} for -masm=intel.
19364 2018-04-17  Jan Hubicka  <jh@suse.cz>
19366         PR lto/85405
19367         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19369 2018-04-17  Martin Liska  <mliska@suse.cz>
19371         PR ipa/85329
19372         * multiple_target.c (create_dispatcher_calls): Set apostrophes
19373         for target_clone error message.  Make default implementation
19374         clone to be a local declaration.
19375         (separate_attrs): Add new argument and check for an empty
19376         string.
19377         (expand_target_clones): Handle it.
19378         (ipa_target_clone): Make redirection just for target_clones
19379         functions.
19381 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
19382             Tom de Vries  <tom@codesourcery.com>
19384         PR middle-end/84955
19385         * omp-expand.c (expand_oacc_for): Add dummy false branch for
19386         tiled basic blocks without omp continue statements.
19388 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
19390         PR target/83660
19391         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19392         vec_extract expression as having side effects to make sure it gets
19393         a cleanup point.
19395 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
19397         PR target/85403
19398         * config/i386/i386.c (get_builtin_code_for_version): Check
19399         error_mark_node.
19401 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
19403         PR target/84331
19404         * config.gcc: Support "skylake".
19405         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19406         PROCESSOR_SKYLAKE.
19407         * config/i386/i386.c (m_SKYLAKE): Define.
19408         (processor_target_table): Add "skylake".
19409         (ix86_option_override_internal): Add "skylake".
19410         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19411         PROCESSOR_CANNONLAKE.
19412         (get_builtin_code_for_version): Fix priority for
19413         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19414         PROCESSOR_SKYLAKE-AVX512.
19415         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19416         (processor_type): Add PROCESSOR_SKYLAKE.
19418 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
19419             Jason Merrill  <jason@redhat.com>
19421         PR c++/85112
19422         * convert.c (convert_to_integer_1): Use direct recursion for
19423         enumeral types and types with a precision less than the number
19424         of bits in their mode.
19426 2018-04-16  Julia Koval  <julia.koval@intel.com>
19428         PR target/84413
19429         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19430         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19432 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
19434         PR target/85293
19435         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19436         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19437         and -mno-direct-move.
19439 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
19441         PR target/83402
19442         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19443         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19444         Ensure negative shifts result in {0}.
19446 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
19448         PR rtl-optimization/79916
19449         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19450         regs (if any) to define how to gnerate SD moves when LRA is in
19451         progress.
19453 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
19455         PR rtl-optimization/85393
19456         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19457         * except.c (expand_dw2_landing_pad_for_region): Make static.
19458         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19459         a label and unconditional jump to old_bb, rather than
19460         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19461         basic block.
19463         PR rtl-optimization/85376
19464         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19465         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19466         instead of a specific value.
19468 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
19469             Bin Cheng  <bin.cheng@arm.com>
19471         PR tree-optimization/82965
19472         PR tree-optimization/83991
19473         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19474         by_profile_only parameter.
19475         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19476         information if the loop was predicted to iterate too many times.
19477         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19479 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
19481         PR lto/71991
19482         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19483         always inline.
19485 2018-04-13  Martin Liska  <mliska@suse.cz>
19486             Jakub Jelinek  <jakub@redhat.com>
19488         PR middle-end/81657
19489         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19490         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19491         * builtins.c (expand_builtin_memory_copy_args): Use
19492         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19493         handle dest_addr == pc_rtx.
19495 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
19497         PR target/85291
19498         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19499         asked to not generate direct moves.
19500         (fix_trunc<mode>si2_stfiwx): Similar.
19501         (fix_trunc<mode>si2_internal): Similar.
19503 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
19505         PR debug/83157
19506         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19507         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19508         lookup if dest in some wider mode is known to be const0_rtx and
19509         if so, record permanent equivalence for it to be ZERO_EXTEND of
19510         the narrower mode destination.
19512 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
19514         * lto-streamer-out.c (output_function): Revert 259346.
19515         * omp-expand.c (expand_oacc_for): Likewise.
19517 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
19519         PR rtl-optimization/85354
19520         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19521         * sel-sched.c (sel_global_init): ... here.
19523 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
19525         PR target/85238
19526         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19527         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19528         mode for PE-COFF targets.
19529         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19530         (i386_pe_asm_lto_end): Likewise.
19531         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19532         (TARGET_ASM_LTO_END): Likewise.
19533         * config/i386/winnt.c (saved_debug_info_level): New static variable.
19534         (i386_pe_asm_lto_start): New function.
19535         (i386_pe_asm_lto_end): Likewise.
19537 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
19538             Richard Biener  <rguenther@suse.de>
19540         PR middle-end/84955
19541         * lto-streamer-out.c (output_function): Fix CFG loop state before
19542         streaming out.
19543         * omp-expand.c (expand_oacc_for): Handle calls to internal
19544         functions like regular functions.
19546 2018-04-12  Richard Biener  <rguenther@suse.de>
19548         PR lto/85371
19549         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19550         for the early LTO debug to properly generate references to it
19551         during DIE emission.  Do not re-use that for the skeleton for
19552         split-dwarf.
19553         (dwarf2out_early_finish): Likewise.
19555 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
19557         PR target/85328
19558         * config/i386/sse.md
19559         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19560         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19561         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19562         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19563         and output is a reg, avoid creating invalid lowpart subreg, but
19564         instead split into a 512-bit move.  Don't split if not AVX512VL,
19565         input is xmm16+ reg and output is a mem.
19566         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19567         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19568         xmm16+ reg and output is a mem.
19570 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19572         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19573         also for flag_dwarf2_cfi_asm.
19575 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
19577         PR rtl-optimization/85342
19578         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19579         a bool scalar var inside of the loop instead.  Don't try to update
19580         recog_data.operand after failed apply_change_group.
19582 2018-04-12  Tom de Vries  <tom@codesourcery.com>
19584         PR target/85296
19585         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19586         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
19587         array with flexible array member as array without given dimension.
19588         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19589         argument for undefined param to true.
19591 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
19593         PR target/85321
19594         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19595         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19596         from PowerPC section.
19597         * config/rs6000/sysv4.opt (mcall-): Improve help text.
19598         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19599         help text that is too long.
19600         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19601         help text that is too long.
19602         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19603         help text that is too long.
19605 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
19607         * config/alpha/alpha.md (stack_probe_internal): Rename
19608         from "probe_stack".  Update all callers.
19610 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
19612         PR rtl-optimization/84566
19613         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19614         sched_macro_fuse_insns.
19616 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
19618         PR target/84301
19619         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19620         (compute_block_dependences): ... from here.
19622 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
19624         PR tree-optimization/85331
19625         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19626         from int to HOST_WIDE_INT.
19628 2018-04-11  Martin Jambor  <mjambor@suse.cz>
19630         PR ipa/84149
19631         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19632         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19633         not the same as the source val.
19634         (cgraph_edge_brings_value_p): New parameter.
19635         (gather_edges_for_value): Pass destination value to
19636         cgraph_edge_brings_value_p.
19637         (perhaps_add_new_callers): Likewise.
19638         (get_info_about_necessary_edges): Likewise and exclude values brought
19639         only by self-recursive edges.
19640         (create_specialized_node): Redirect only clones of self-calling edges.
19641         (+self_recursive_pass_through_p): New function.
19642         (find_more_scalar_values_for_callers_subset): Use it.
19643         (find_aggregate_values_for_callers_subset): Likewise.
19644         (known_aggs_to_agg_replacement_list): Removed.
19645         (decide_whether_version_node): Re-calculate known constants for all
19646         remaining context clones.
19648 2018-04-11  Richard Biener  <rguenther@suse.de>
19650         PR lto/85339
19651         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19652         from early DWARF output.
19653         (dwarf2out_early_finish): Output line info unconditionally into
19654         early DWARF and add reference to it.
19656 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
19658         PR target/85281
19659         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19660         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19661         other than V2DFmode using iptr mode attribute.
19662         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19664 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
19666         PR rtl-optimization/84659
19667         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19669 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
19671         PR debug/85302
19672         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19673         SIZEP is NULL.
19674         (output_loc_list): Pass address of a dummy size variable even in the
19675         locview handling loop.
19676         (index_location_lists): Add comment on why skip_loc_list_entry can't
19677         call size_of_locs.
19679 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19681         PR target/85261
19682         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19683         into register.
19685 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
19687         PR target/85321
19688         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19689         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19690         and -mstring-compare-inline-limit.
19692 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19694         PR target/85287
19695         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19696         for stack clash protection in a register whenever we need it to be in
19697         a register.
19699 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19701         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19702         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19704 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19706         PR target/85321
19707         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19708         the help text.
19709         (mlong-double-): Ditto.
19710         * config/rs6000/sysv4.opt (msdata=): Ditto.
19711         (mtls-size=): Ditto.
19713 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19715         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19716         erroneous entries for
19717         "vector int vec_ldl (int, long int *)", and
19718         "vector unsigned int vec_ldl (int, unsigned long int *)".
19719         Add comments and entries for
19720         "vector bool char vec_ldl (int, bool char *)",
19721         "vector bool short vec_ldl (int, bool short *)",
19722         "vector bool int vec_ldl (int, bool int *)",
19723         "vector bool long long vec_ldl (int, bool long long *)",
19724         "vector pixel vec_ldl (int, pixel *)",
19725         "vector long long vec_ldl (int, long long *)",
19726         "vector unsigned long long vec_ldl (int, unsigned long long *)".
19727         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19728         type tree bool_long_long_type_node and correct definition of
19729         bool_V2DI_type_node to make reference to this new type tree.
19730         (rs6000_mangle_type): Replace erroneous reference to
19731         bool_long_type_node with bool_long_long_type_node.
19732         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19733         comments to emphasize sign distinctions for char and int types and
19734         replace RS6000_BTI_bool_long constant with
19735         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
19736         use of RS6000_BTI_pixel.
19737         (bool_long_type_node): Remove this macro definition.
19738         (bool_long_long_type_node): New macro definition
19740 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
19742         PR rtl-optimization/85300
19743         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19744         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19745         simplify_unary_operation fails.
19747 2018-04-10  Martin Liska  <mliska@suse.cz>
19749         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19750         cgraph_edge and ipa_ref.
19752 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
19754         PR target/85177
19755         PR target/85255
19756         * config/i386/sse.md
19757         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19758         computation of the VEC_MERGE selector from mask.
19759         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19760         Fix decoding of the VEC_MERGE selector into mask.
19762 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
19764         PR tree-optimization/85286
19765         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19767 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
19769         * final.c (final_1): Set insn_last_address as well as
19770         insn_current_address.
19772 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19774         PR target/85173
19775         * explow.c (emit_stack_probe): Call validize_mem on memory location
19776         before passing it to gen_probe_stack.  Create address operand and
19777         legitimize it for the probe_stack_address case.
19779 2018-04-09  Jan Hubicka  <jh@suse.cz>
19781         PR lto/85078
19782         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19783         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19784         * tree.c (free_lang_data_in_type): Fix handling of binfos;
19785         walk basetypes.
19786         (free_lang_data): Rebuild type inheritance graph.
19788 2018-04-09  Martin Sebor  <msebor@redhat.com>
19790         * invoke.texi (-finline-small-functions): Mention other optimization
19791         options.
19792         (-findirect-inlining, -fpartial-inlining): Same.
19793         (-finline-functions-called-once): Same.
19794         (-freorder-blocks-and-partition): Same.
19796 2018-04-09  Jan Hubicka  <jh@suse.cz>
19798         PR rtl/84058
19799         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19800         jumps; choose last target that matches the criteria (i.e.
19801         no partition changes for non-crossing jumps).
19802         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19803         support for redirecting crossing jumps to non-crossing.
19805 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
19807         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19808         also for naked functions.
19810 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
19812         * config/arc/arc.md (add_shift): New pattern.
19813         (add_shift2): Likewise.
19814         (sub_shift): Likewise.
19815         (sub_shift_cmp0_noout): Likewise.
19816         (compare_si_ashiftsi): Likewise.
19817         (xbfu_cmp0_noout): New combine pattern.
19818         (xbfu_cmp0"): Likewise.
19819         (movsi_set_cc_insn): Place the predicable variant first.
19820         (commutative_binary_cmp0_noout): Remove clobber.
19821         (commutative_binary_cmp0): New pattern.
19822         (noncommutative_binary_cmp0): Likewise.
19823         (noncommutative_binary_cmp0_noout): Likewise.
19824         (noncommutative_binary_comparison_result_used): Removed.
19825         (rsub_cmp0): New pattern.
19826         (rsub_cmp0_noout): Likewise.
19827         (extzvsi): Changed, keep only meaningful variants.
19828         (SQH, SEZ): New iterators.
19829         (SQH_postfix): New mode attribute.
19830         (SEZ_prefix): New code attribute.
19831         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19832         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19833         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19834         of numerical value.
19835         (noncommutative_operator): Check the availability of barrel
19836         shifter option.
19838 2018-04-09  Richard Biener  <rguenther@suse.de>
19840         PR tree-optimization/85284
19841         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19842         Only use the niter constraining form of simple_iv when the exit
19843         is always executed.
19845 2018-04-09  Tom de Vries  <tom@codesourcery.com>
19847         PR target/84041
19848         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19849         (define_expand "*memory_barrier"): New define_expand.
19850         (define_insn "memory_barrier"): New insn.
19852 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19854         PR rtl-optimization/80463
19855         PR rtl-optimization/83972
19856         PR rtl-optimization/83480
19858         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19859         correct producer for the insn.
19860         (tidy_control_flow): Fixup seqnos in case of debug insns.
19862 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19864         PR rtl-optimization/83913
19866         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19867         different sched-times when merging exprs.
19869 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19871         PR rtl-optimization/83962
19873         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19874         tidy_fallthru_edge and tidy_control_flow.
19876 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19878         PR rtl-optimization/83530
19880         * sel-sched.c (force_next_insn): New global variable.
19881         (remove_insn_for_debug): When force_next_insn is true, also leave only
19882         next insn in the ready list.
19883         (sel_sched_region): When the region wasn't scheduled, make another pass
19884         over it with force_next_insn set to 1.
19886 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
19888         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19889         into tm_file.
19890         * config/nds32/constants.md (unspec_volatile_element): Add enum values
19891         for interrupt control.
19892         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19893         functions for interrupt control.
19894         * config/nds32/nds32-intrinsic.md: Likewise.
19895         * config/nds32/nds32_intrinsic.h: Likewise.
19896         * config/nds32/nds32.h (nds32_builtins): Likewise.
19898 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
19900         * config/nds32/nds32.c (nds32_init_machine_status,
19901         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19902         strict_aligned_p field.
19903         (nds32_expand_to_rtl_hook): New function.
19904         (TARGET_EXPAND_TO_RTL_HOOK): Define.
19905         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19907 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19908             Chung-Ju Wu  <jasonwucj@gmail.com>
19910         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19911         * config/nds32/nds32-n7.md: New file.
19912         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19913         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19914         pipeline.
19915         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19916         * config/nds32/nds32.md (pipeline_model): Add n7.
19917         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19918         * config/nds32/pipelines.md: Include n7 settings.
19920 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19921             Chung-Ju Wu  <jasonwucj@gmail.com>
19923         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19924         * config/nds32/nds32-e8.md: New file.
19925         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19926         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19927         pipeline.
19928         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19929         * config/nds32/nds32.md (pipeline_model): Add e8.
19930         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19931         * config/nds32/pipelines.md: Include e8 settings.
19933 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19934             Chung-Ju Wu  <jasonwucj@gmail.com>
19936         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19937         * config/nds32/nds32-n8.md: New file.
19938         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19939         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19940         pipeline.
19941         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19942         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19943         * config/nds32/nds32.md (pipeline_model): Add n8.
19944         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19945         * config/nds32/pipelines.md: Include n8 settings.
19947 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19948             Chung-Ju Wu  <jasonwucj@gmail.com>
19950         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19951         * config/nds32/nds32-n9-2r1w.md: New file.
19952         * config/nds32/nds32-n9-3r2w.md: New file.
19953         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19954         nds32_register_ports): New or modify for cpu n9.
19955         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19956         pipeline.
19957         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19958         * config/nds32/nds32-utils.c: New file.
19959         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19960         TARGET_MUL_SLOW): Define.
19961         * config/nds32/nds32.md (pipeline_model): New attribute.
19962         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19963         New options that support cpu n9.
19964         * config/nds32/pipelines.md: Include n9 settings.
19965         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19967 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
19969         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19970         information if necessary.
19971         (output_cond_branch_compare_zero): Likewise.
19972         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19973         (nds32_target_alignment): Refine for alignment.
19974         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19975         (FUNCTION_BOUNDARY): Modify.
19976         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19977         align case.
19978         * config/nds32/nds32.opt (malways-align, malign-functions): New.
19980 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
19982         * config/nds32/constants.md (unspec_volatile_element): Add values for
19983         TLB operation and data prefetch.
19984         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19985         functions for TLB operation and data prefetch.
19986         * config/nds32/nds32-intrinsic.md: Likewise.
19987         * config/nds32/nds32_intrinsic.h: Likewise.
19988         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19989         (nds32_print_operand): Likewise.
19990         * config/nds32/nds32.h (nds32_builtins): Likewise.
19992 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
19993         Andrew Pinski <pinsika@gcc.gnu.org>
19995         PR middle-end/82976
19996         * match.pd: Use constant_boolean_node of correct type instead of
19997         boolean_true_node or boolean_false_node for simplifying
19998         pointer comparisons to zero.
20000 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
20002         PR tree-optimization/80021
20003         * tree.c (verify_type_variant): Make error call in verify_variant_match
20004         translatable and remove final full stop.
20006 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
20008         * config/nds32/constants.md (unspec_volatile_element): Add
20009         UNSPEC_VOLATILE_EH_RETURN.
20010         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
20011         nds32_output_stack_pop): Support dwarf exception handling process.
20012         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
20013         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
20014         exception handling process.
20015         (nds32_compute_stack_frame): Likewise.
20016         (nds32_return_addr_rtx): Likewise.
20017         (nds32_initial_elimination_offset): Likewise.
20018         (nds32_expand_prologue): Likewise.
20019         (nds32_expand_epilogue): Likewise.
20020         (nds32_dynamic_chain_address): New function.
20021         * config/nds32/nds32.h (machine_function): Add fields for dwarf
20022         exception handling.
20023         (DYNAMIC_CHAIN_ADDRESS): Define.
20024         (EH_RETURN_DATA_REGNO): Define.
20025         (EH_RETURN_STACKADJ_RTX): Define.
20026         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
20027         patterns for dwarf exception handling.
20029 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
20031         * config/nds32/nds32.h: Clean up obsolete macros.
20033 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
20035         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20036         Add enum values for particular instructions.
20037         * config/nds32/nds32-intrinsic.c: Implementation of expanding
20038         particular intrinsic functions.
20039         * config/nds32/nds32-intrinsic.md: Likewise.
20040         * config/nds32/nds32_intrinsic.h: Likewise.
20041         * config/nds32/nds32.h (nds32_builtins): Likewise.
20042         * config/nds32/nds32.md (type): Add pbsad and pbsada.
20043         (btst, ave): New patterns for particular instructions.
20045 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
20047         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20048         Add enum values for atomic load/store and memory sync.
20049         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
20050         and memory sync.
20051         * config/nds32/nds32-intrinsic.md: Likewise.
20052         * config/nds32/nds32_intrinsic.h: Likewise.
20053         * config/nds32/nds32.h (nds32_builtins): Likewise.
20055 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
20057         PR tree-optimization/85257
20058         * fold-const.c (native_encode_vector): If not all elts could fit
20059         and off is -1, return 0 rather than offset.
20060         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
20061         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
20062         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
20063         adjust buffer in native_interpret_expr call.
20065 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
20067         * config/nds32/constants.md (unspec_volatile_element): Add cache
20068         control enum values.
20069         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
20070         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
20071         * config/nds32/nds32.c (nds32_cctl_names): New.
20072         (nds32_print_operand): Handle cache control register names.
20073         * config/nds32/nds32.h (nds32_builtins): New enum values.
20074         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
20075         macros.
20076         * config/nds32/nds32.md (type): Add mmu.
20077         * config/nds32/pipelines.md (simple_insn): Add mmu.
20079 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
20081         * config/nds32/nds32.md (type): Remove call.
20082         * config/nds32/pipelines.md (simple_insn): Likewise.
20084 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
20086         * config/nds32/constants.md (unspec_volatile_element): Add
20087         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
20088         UNSPEC_VOLATILE_FMFCFG.
20089         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
20090         description for fmfcfg and fmfcsr.
20091         (bdesc_1arg): Add fmtcsr.
20092         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
20093         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
20094         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
20095         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
20096         unspec_fmfcfg): New patterns.
20097         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
20098         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
20099         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
20100         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
20101         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
20102         __nds32__fmfcfg): Define.
20104 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
20106         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
20107         intrinsic register names.
20108         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
20109         intrinsic register enum values and macros.
20111 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
20113         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
20114         for load/store addressing form.
20115         (nds32_print_operand_address): Likewise.
20117 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
20119         PR target/85196
20120         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
20121         based on LABEL_REF.  Remove useless assertion.
20122         (pic_address_needs_scratch): Fix formatting.
20123         (sparc_legitimize_pic_address): Minor tweaks.
20124         (sparc_delegitimize_address): Adjust assertion accordingly.
20125         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
20126         into symbolic_operand.
20127         (movsi_high_pic_label_ref): Likewise.
20128         (movsi_lo_sum_pic_label_ref): Likewise.
20129         (movdi_pic_label_ref): Likewise.
20130         (movdi_high_pic_label_ref): Likewise.
20131         (movdi_lo_sum_pic_label_ref): Likewise.
20133 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
20135         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
20136         custom LIB_SPEC setup.
20138 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
20139             Kito Cheng  <kito.cheng@gmail.com>
20141         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
20142         * config/riscv/freebsd.h: New.
20144 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
20146         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
20147         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
20148         file.
20150 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
20151             Kito Cheng  <kito.cheng@gmail.com>
20153         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
20154         nds32_output_call, nds32_symbol_binds_local_p): New functions.
20155         * config/nds32/nds32-protos.h (nds32_output_call,
20156         nds32_output_return): Declare.
20157         * config/nds32/nds32.md: Refine all the call and return patterns.
20159 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
20161         PR debug/85252
20162         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
20163         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
20165         PR rtl-optimization/84872
20166         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
20167         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
20168         EDGE_CROSSING edge.
20170 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
20172         * expr.c (copy_blkmode_to_reg): Revert 254862.
20173         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
20175 2018-04-06  Richard Biener  <rguenther@suse.de>
20177         PR middle-end/85244
20178         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
20179         after seeing a component reference with an adjacent field.  Treat
20180         refs to arrays at struct end of external decls similar to
20181         refs to unconstrained commons.
20183 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
20185         PR sanitizer/85213
20186         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
20187         look through SAVE_EXPRs with non-side-effects argument.  Adjust
20188         recursive calls.
20189         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
20190         save_p here.
20192 2018-04-06  Richard Biener  <rguenther@suse.de>
20194         PR middle-end/85180
20195         * alias.c (find_base_term): New wrapper around find_base_term
20196         unwinding CSELIB_VAL_PTR changes.
20197         (find_base_term): Do not restore CSELIB_VAL_PTR during the
20198         recursion.
20200 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20202         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
20203         instructions.
20204         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
20205         constant definitions.
20206         ("nop"): lr 0,0 -> nopr r0
20207         ("nop_lr0", "nop_lr1"): New insn definitions.
20209 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
20211         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
20212         NDS32_V3PUSH_AVAILABLE_P macro.
20214 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
20215             Chung-Ju Wu  <jasonwucj@gmail.com>
20217         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
20218         (nds32*-*-*): Add float and fpu_config into supported_defaults.
20219         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
20220         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
20221         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
20222         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
20223         * config/nds32/constraints.md: New constraints and checking for hard
20224         float configuration.
20225         * config/nds32/iterators.md: New mode iterator and attribute for hard
20226         float configuration.
20227         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
20228         patterns.
20229         * config/nds32/nds32-fpu.md: New file.
20230         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
20231         deal with hard float code generation.
20232         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
20233         ARCH_V3S.
20234         (abi_type, float_reg_number): New enum type.
20235         * config/nds32/nds32-predicates.c: New predicates for hard float.
20236         * config/nds32/nds32-protos.h: Declare functions for hard float.
20237         * config/nds32/nds32.c: Implementation for hard float configuration.
20238         * config/nds32/nds32.h: Definitions for hard float configuration.
20239         * config/nds32/nds32.md: Include hard float machine description and
20240         modify patterns for hard float configuration.
20241         * config/nds32/nds32.opt: New options for hard float configuration.
20242         * config/nds32/predicates.md: New predicates for hard float
20243         configuration.
20245 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
20247         * common/config/nds32/nds32-common.c
20248         (nds32_option_optimization_table): Enable -mreleax-hint by default.
20250 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
20252         PR middle-end/85195
20253         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
20254         CONSTRUCTOR_ELT (ctor, ...)->value.
20256 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
20258         PR target/85193
20259         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
20261 2018-04-05  Tom de Vries  <tom@codesourcery.com>
20263         PR target/85204
20264         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
20265         cond jump.
20267 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
20268             Kito Cheng  <kito.cheng@gmail.com>
20270         * config/nds32/constraints.md (U33): Fine-tune checking condition.
20271         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
20272         * config/nds32/nds32.h (nds32_16bit_address_type): Add
20273         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
20275 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
20276             Kito Cheng  <kito.cheng@gmail.com>
20278         * config/nds32/constraints.md (Ufe): New memory constraint.
20279         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
20280         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
20281         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
20282         operands.
20283         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20284         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20286 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20288         * config/nds32/nds32.md: Use optimize_size in the condition for
20289         alu-shift instructions.
20291 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20293         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20295 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20297         * config/nds32/nds32.md (negsi2): Refine pattern.
20299 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
20300             Chung-Ju Wu  <jasonwucj@gmail.com>
20302         * config/nds32/iterators.md (shift_rotate): New code iterator.
20303         (shift): New code attribute.
20304         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20305         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20306         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20307         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20308         bit-wise operations.
20309         (andsi3, *andsi3): Ditto.
20310         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20311         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20312         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20313         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20314         nds32_ior_operand, nds32_xor_operand): New predicates.
20316 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20318         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20319         (addsi3, subsi3): ... this.
20321 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20323         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20325 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20327         * config/nds32/nds32.md: Adjust indention.
20329 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
20331         * config/nds32/nds32.md (feature): New attribute.
20333 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20335         * config/nds32/nds32.md (subtype): New attribute.
20337 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20339         PR target/85203
20340         * config/arm/arm-builtins.c (arm_expand_builtin): Change
20341         expansion to perform a bitwise AND of the argument followed by a
20342         boolean negation of the result.
20344 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
20346         PR rtl-optimization/84878
20347         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20348         the basic block.  Assert the use reference is not artificial and that
20349         it has an associated insn.
20351 2018-04-04  Michael Matz  <matz@suse.de>
20353         * builtins.c (compute_objsize): Pass correct operand
20354         to array_at_struct_end_p.
20356 2018-04-04  Richard Biener  <rguenther@suse.de>
20358         PR lto/85176
20359         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20360         from contexts for DINFO_LEVEL_TERSE and below.
20362 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
20364         * config/nds32/nds32-doubleword.md (move_<mode>): Require
20365         resiter_operand condition.
20366         * config/nds32/nds32.md (*move<mode>): Ditto.
20368 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
20369             Monk Chiang  <sh.chiang04@gmail.com>
20371         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20373 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
20375         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20377 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
20378             Kito Cheng  <kito.cheng@gmail.com>
20380         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20381         nds32_cond_code_str, output_cond_branch,
20382         output_cond_branch_compare_zero, nds32_expand_cbranch,
20383         nds32_expand_cstore, nds32_expand_movcc,
20384         nds32_output_cbranchsi4_equality_zero,
20385         nds32_output_cbranchsi4_equality_reg,
20386         nds32_output_cbranchsi4_equality_reg_or_const_int,
20387         nds32_output_cbranchsi4_greater_less_zero: New functions.
20388         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20389         nds32_expand_cstore, nds32_expand_movcc,
20390         nds32_output_cbranchsi4_equality_zero,
20391         nds32_output_cbranchsi4_equality_reg,
20392         nds32_output_cbranchsi4_equality_reg_or_const_int,
20393         nds32_output_cbranchsi4_greater_less_zero): Declare.
20394         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20395         nds32_rimm11s_operand): New predicates.
20396         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20397         * config/nds32/nds32.md: Rewrite all the branch and conditional move
20398         patterns.
20400 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
20402         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20403         * config/nds32/nds32.md: Ditto.
20404         * config/nds32/pipelines.md: Ditto.
20406 2018-04-04  Richard Biener  <rguenther@suse.de>
20408         PR tree-optimization/85168
20409         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20410         propagating abnormals.
20412 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
20414         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20416 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
20417             Kito Cheng  <kito.cheng@gmail.com>
20419         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20420         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20421         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20422         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20423         * config/nds32/nds32.md (sibcall_internal): New.
20424         (sibcall_register): Remove.
20425         (sibcall_immediate): Remove.
20426         (sibcall_value_internal): New.
20427         (sibcall_value_register): Remove.
20428         (sibcall_value_immediate): Remove.
20429         * config/nds32/predicates.md (nds32_general_register_operand): New.
20430         (nds32_call_address_operand): New.
20432 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
20434         PR rtl-optimization/85167
20435         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20436         bb_defs if *split_p, instead preinitialize it to NULL.
20438         PR tree-optimization/85156
20439         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20440         evaluating the argument multiple times.
20442 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
20444         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20445         than vector.
20446         (_mm_cvtpd_ps): Likewise.
20447         (_mm_cvttpd_epi32): Likewise.
20448         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20449         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20450         vector, pixel, and bool following altivec.h include.
20452 2018-04-03  Martin Sebor  <msebor@redhat.com>
20454         * doc/extend.texi (Common Function Attributes): Clarify.
20455         (const attribute): Likewise.
20456         (pure attribute): Likewise.
20458 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
20460         PR target/85169
20461         * config/i386/i386.c (ix86_expand_vector_set): Use
20462         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
20464 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
20466         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20467         instructions when changing rounding bits to preserve precision bits
20468         in the x87 control word.
20470 2018-04-03  Martin Liska  <mliska@suse.cz>
20472         PR tree-optimization/82491
20473         * rtl.h (strip_offset_and_add): Replace += suboffset with
20474         poly_uint64 () + suboffset.
20476 2018-03-29  Martin Liska  <mliska@suse.cz>
20477             Martin Jambor  <mjambor@suse.cz>
20479         PR ipa/84947
20480         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20481         param_type is not an integral or pointer type.
20483 2018-04-03  Richard Biener  <rguenther@suse.de>
20485         * sese.h (recompute_all_dominators): Remove.
20487 2018-04-02  Martin Sebor  <msebor@redhat.com>
20489         * doc/invoke.texi (-Wrestrict): Fix typos.
20491 2018-04-02  Jim Wilson  <jimw@sifive.com>
20493         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20494         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20495         (<optab>di3, <optab>si3_extend): Likewise.
20496         (<optab>si3_mask, <optab>si3_mask_1): New.
20497         (<optab>di3_mask, <optab>di3_mask_1): New.
20498         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20499         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20500         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20502 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
20504         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20505         example.
20507 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
20509         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20510         (nds32_canonicalize_comparison): New function.
20512 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
20513             Kito Cheng  <kito.cheng@gmail.com>
20514             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
20516         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20517         * config/nds32/constants.md (unspec_volatile_element): Add
20518         UNSPEC_VOLATILE_RELAX_GROUP.
20519         * config/nds32/nds32-relax-opt.c: New file.
20520         * config/nds32/nds32-predicates.c
20521         (nds32_symbol_load_store_p): New function.
20522         * config/nds32/nds32-protos.h
20523         (nds32_symbol_load_store_p): Declare function.
20524         (make_pass_nds32_relax_opt): Declare new rtl pass function.
20525         * config/nds32/nds32.c
20526         (nds32_register_pass): New function to register pass.
20527         (nds32_register_passes): New function to register passes.
20528         * config/nds32/nds32.md (relax_group): New pattern.
20529         * config/nds32/nds32.opt (mrelax-hint): New option.
20530         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20532 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
20534         * config/nds32/t-nds32: Modify files dependency.
20536 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
20538         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20539         (PROFILE_HOOK): Define its implementation.
20541 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
20543         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20544         type and 32-bit size.
20546 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
20548         PR middle-end/85090
20549         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20550         (V_128_256): New mode iterator.
20551         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20552         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20553         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20554         of V.
20555         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20556         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20558 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
20560         PR target/83315
20561         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20562         NaN inputs correctly.
20564 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
20566         PR target/80546
20567         * config/rs6000/vsx.md (??r): New mode attribute.
20568         (*vsx_mov<mode>_64bit): Use it.
20569         (*vsx_mov<mode>_32bit): Likewise.
20571 2018-03-30  Martin Sebor  <msebor@redhat.com>
20573         PR tree-optimization/84818
20574         * builtins.c (check_access): Use warning_n.
20576 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20578         PR target/83822
20579         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20580         condition.
20581         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20582         condition.
20584 2018-03-30  Julia Koval  <julia.koval@intel.com>
20586         PR target/84413
20587         * x86-tune.def (movx, partial_reg_dependency): Enable for
20588         m_SKYLAKE_AVX512.
20590 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
20592         PR inline-asm/84985
20593         * lra-constraints.c (process_alt_operands): Move setting
20594         this_alternative_matches below.
20596 2018-03-29  Martin Liska  <mliska@suse.cz>
20598         PR lto/84995.
20599         * doc/invoke.texi: Document how LTO works with debug info.
20600         Describe auto-load support of binutils.  Mention 'x86-64'
20601         as valid option value of -march option.
20603 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
20605         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20607         PR c/85094
20608         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20609         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20610         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20611         checking.
20613 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
20615         PR target/84912
20616         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20617         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20618         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20619         for RS6000_BTM_POWERPC64.
20620         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20621         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20622         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20623         definition.
20624         (DIVDE): Use it.
20625         (DIVDEU): Likewise.
20627 2018-03-28  Carl Love  <cel@us.ibm.com>
20629         Revert
20630         2017-09-27  Carl Love  <cel@us.ibm.com>
20632         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20633         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20634         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20635         fctiw instruction.
20637 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20639         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20640         instead of __vector bool.
20641         (_mm_max_pu8): Likewise.
20642         (_mm_min_pi16): Likewise.
20644 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
20646         PR target/84912
20647         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20648         (DIVWEUO): Likewise.
20649         (DIVDEO): Likewise.
20650         (DIVDEUO): Likewise.
20651         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20652         DIVWEUO and DIVDEUO.
20653         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20654         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20655         (div_extend): Likewise.
20656         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20657         builtin function.
20658         (__builtin_divweuo): Likewise.
20659         (__builtin_divdeo): Likewise.
20660         (__builtin_divdeuo): Likewise.
20662 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
20664         PR target/85095
20665         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20666         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20668         PR tree-optimization/82004
20669         * gimple-match-head.c (optimize_pow_to_exp): New function.
20670         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20671         Don't fold to exp if optimize_pow_to_exp is false.
20673 2018-03-28  Martin Liska  <mliska@suse.cz>
20675         PR other/84819
20676         * calls.c (initialize_argument_information): Fix trailing space.
20677         * common.opt: Fix typo and provide better explanation for
20678         -fsanitize-coverage option.
20679         * config/i386/i386.opt: Fix typo.
20681 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
20682             Martin Liska  <mliska@suse.cz>
20684         PR sanitizer/85081
20685         * gimplify.c (asan_poison_variable): Don't do the check for
20686         gimplify_omp_ctxp here.
20687         (gimplify_decl_expr): Do it here.
20688         (gimplify_target_expr): Likewise.
20690 2018-03-28  Martin Liska  <mliska@suse.cz>
20692         PR target/84988
20693         * config/i386/i386.c (ix86_function_arg_advance): Do not call
20694         chkp_type_bounds_count if MPX is not enabled.
20696 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
20698         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20700 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
20702         PR target/84914
20703         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20704         function to create the function decl for complex long double
20705         multiply and divide for -mabi=ieeelongdouble.
20706         (init_float128_ieee): Call it.
20708 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
20710         PR target/85044
20711         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20712         -fcf-protection=branch -mibt.
20713         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20715 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20717         PR target/81863
20718         * config/arm/arm.c (arm_valid_symbolic_address): Handle
20719         arm_word_relocations.
20721 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
20723         PR target/85056
20724         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20725         extern array declarations.
20727 2018-03-27  Richard Biener  <rguenther@suse.de>
20729         PR middle-end/84067
20730         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20731         explicit single_use checks.
20733 2018-03-27  Richard Biener  <rguenther@suse.de>
20735         PR tree-optimization/85082
20736         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20737         Valueize the VUSE.
20739 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20741         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20742         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20743         Turn on fasynchronous-unwind-tables and funwind-tables.
20745 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
20747         PR target/85073
20748         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20749         (*bmi_blsr_<mode>_ccz): Ditto.
20751 2018-03-26  Tom de Vries  <tom@codesourcery.com>
20753         PR tree-optimization/85063
20754         * omp-general.c (offloading_function_p): New function.  Factor out
20755         of ...
20756         * omp-offload.c (pass_omp_target_link::gate): ... here.
20757         * omp-general.h (offloading_function_p): Declare.
20758         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20759         with attribute omp declare target for offloading functions.
20761 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
20763         PR tree-optimization/84005
20764         * tree-data-ref.h (get_base_for_alignment): Declare.
20765         * tree-data-ref.c (get_base_for_alignment_1): New function.
20766         (get_base_for_alignment): Likewise.
20767         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20768         get_base_for_alignment to find a suitable base object, instead
20769         of always using drb->base_address.
20771 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
20773         PR inline-asm/85022
20774         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20775         known size by default.
20777 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
20779         PR inline-asm/85030
20780         * lra-constraints.c (process_alt_operands): Don't match BLKmode
20781         and non BLKmode operands.
20783 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20785         PR target/85026
20786         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20787         Clean up attributes.
20789 2018-03-23  Richard Biener  <rguenther@suse.de>
20791         PR debug/85020
20792         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20793         we are going to emit early debug for LTO.
20795 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
20797         PR inline-asm/85034
20798         * function.c (match_asm_constraints_1): Don't optimize if input
20799         doesn't satisfy general_operand predicate for output's mode.
20801         PR inline-asm/85022
20802         * alias.c (write_dependence_p): Don't require for x_canonicalized
20803         non-VOIDmode if x has VOIDmode.
20805         PR sanitizer/85029
20806         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20807         just don't try to optimize it rather than assert it never happens.
20809 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20811         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20812         macro expansions for definition of ST_INTERNAL_<mode> and
20813         LD_INTERNAL_<mode> builtins.
20814         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20815         Remove prototype.
20816         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20817         function.
20818         (altivec_expand_st_builtin): Likewise.
20819         (altivec_expand_builtin): Remove calls to deleted functions.
20820         (rs6000_address_for_altivec): Delete this function.
20821         * config/rs6000/vector.md: Remove expands for
20822         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20824 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
20826         PR target/84826
20827         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20828         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20829         re-computing once computed.
20830         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20831         (arm_init_machine_status): Initialize
20832         machine->static_chain_stack_bytes.
20834 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20836         PR target/84760
20837         * doc/extend.texi: Add four new prototypes for vec_ld.
20838         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20839         definitions for more logical presentation.
20840         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20841         entries for V1TI variants of __builtin_altivec_ld builtin.
20842         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20843         handling of V1TI variant of LVX icode pattern.
20844         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20845         (rs6000_gimple_fold_builtin): Likewise.
20846         (altivec_init_builtins): Add code to define
20847         __builtin_altivec_lvx_v1ti function.
20849 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
20851         PR inline-asm/84941
20852         * function.c (match_asm_constraints_1): Don't do the optimization
20853         if input isn't a REG, SUBREG, MEM or constant.
20855 2018-03-22  Tom de Vries  <tom@codesourcery.com>
20857         PR tree-optimization/84956
20858         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20859         bb_has_abnormal_pred.
20861 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
20863         PR sanitizer/85018
20864         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20865         DECL_INITIAL (decl) to decl at the end.
20866         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20867         adjust the comment.
20869 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
20871         * doc/extend.texi (__builtin_tgmath): Document when complex
20872         integer types are treated as _Complex _Float64.
20874 2018-03-21  Tom de Vries  <tom@codesourcery.com>
20876         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20878 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20880         PR tree-optimization/84960
20881         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20882         if it is ENTRY block, move them into single succ of ENTRY in that case.
20884 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
20886         PR tree-optimization/84811
20887         * poly-int.h (poly_span_traits): Remove the T3 parameter and
20888         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20889         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20890         (known_subrange_p): Update accordingly.  Cast each value involved
20891         in the size comparison, rather than casting the result of the
20892         subtraction.
20894 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20896         PR tree-optimization/84982
20897         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20898         by flipping the least significant bit rather than all bits from
20899         bitpos to bitpos + bitsize - 1.
20901 2018-03-21  Nathan Sidwell  <nathan@acm.org>
20903         * doc/extend.texi (Deprecated Features): Remove mention of
20904         long-deleted deprecations.
20906 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20908         PR jit/84288
20909         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20910         * configure: Regenerate.
20912 2018-03-21  Tom de Vries  <tom@codesourcery.com>
20914         PR tree-optimization/83126
20915         * tree-parloops.c (num_phis): New function.
20916         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20918 2018-03-21  Nathan Sidwell  <nathan@acm.org>
20920         * doc/extend.texi (Deprecated Features): Update deprecated flags,
20921         mention anon-struct/union members and trailing attributes.
20923 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
20925         PR tree-optimization/84969
20926         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20927         builtin memset partitions if they set different rhs values.
20929 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20931         PR rtl-optimization/84989
20932         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20933         VEC_DUPLICATE with scalar result mode.
20935 2018-03-21  Martin Liska  <mliska@suse.cz>
20937         PR ipa/84963
20938         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20939         not intended return statement.
20941 2018-03-21  Martin Liska  <mliska@suse.cz>
20943         PR target/84988
20944         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20945         (chkp_find_bound_slots_1): Limit number of iterations.
20947 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
20949         PR target/84838
20950         * Minor grammar fixes for x86 options.
20952 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20954         PR debug/84875
20955         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20956         holding REG_CFA_RESTORE notes, instead turn them into a USE.
20958 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
20960         PR target/83789
20961         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20962         (altivec_lvx_<mode>_1op): Likewise.
20963         (altivec_stvx_<mode>_2op): Likewise.
20964         (altivec_stvx_<mode>_1op): Likewise.
20965         (altivec_lvx_<VM2:mode>): New define_expand.
20966         (altivec_stvx_<VM2:mode>): Likewise.
20967         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20968         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20969         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20970         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20971         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20972         (rs6000_gen_lvx): Likewise.
20973         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20974         (altivec_expand_stv_builtin): Likewise.
20975         (altivec_expand_builtin): Likewise.
20976         * config/rs6000/vector.md: Likewise.
20978 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20980         PR target/82518
20981         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20982         BYTES_BIG_ENDIAN.
20984 2018-03-20  Richard Biener  <rguenther@suse.de>
20986         PR target/84986
20987         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20988         sign-conversions as zero, fall back to standard scalar_stmt
20989         cost for the rest.
20991 2018-03-20  Martin Liska  <mliska@suse.cz>
20993         PR ipa/84825
20994         * predict.c (rebuild_frequencies): Handle case when we have
20995         PROFILE_ABSENT, but flag_guess_branch_prob is false.
20997 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20999         PR target/84990
21000         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
21001         flag_section_anchors.
21002         * varasm.c (use_blocks_for_decl_p): Remove hack for
21003         dw2_force_const_mem.
21005         PR target/84845
21006         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
21007         to ...
21008         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
21009         be created, use lowpart_subreg of operands[0] rather than operands[0]
21010         itself.
21011         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
21012         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
21013         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
21014         and n constraint instead of aarch64_shift_imm_di and Usd.
21015         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
21016         (*aarch64_<optab>_reg_minus<mode>3): ... this.
21018 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
21020         PR target/82989
21021         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
21022         to favor GPR over NEON registers.
21023         (<shift>di3_neon): Likewise.
21025 2018-03-20  Tom de Vries  <tom@codesourcery.com>
21027         PR target/84952
21028         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
21029         (nvptx_process_pars): Emit bar.sync asap and alap.
21031 2018-03-20  Tom de Vries  <tom@codesourcery.com>
21033         PR target/84954
21034         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
21035         seen_label if seen_label is already set.
21037 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
21039         PR target/84945
21040         * config/i386/i386.c (fold_builtin_cpu): For features above 31
21041         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
21042         Use 1U instead of 1.  Formatting fixes.
21044         PR c/84953
21045         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
21046         instead of TREE_TYPE (s1) for the return value.
21048 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
21050         PR tree-optimization/84946
21051         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
21052         bitsize + bitsize in poly_uint64 rather than poly_int64.
21054         PR sanitizer/78651
21055         * dwarf2asm.c: Include fold-const.c.
21056         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
21057         of decl rather than decl itself.
21059         PR rtl-optimization/84643
21060         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
21062 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
21064         PR sanitizer/78651
21065         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
21066         calling assemble_variable.
21068 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
21070         PR target/81647
21071         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
21072         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
21074 2018-03-19  Jim Wilson  <jimw@sifive.com>
21076         PR bootstrap/84856
21077         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
21078         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
21079         (riscv_first_stack_step): Likewise.
21080         (riscv_option_override): Use STACK_BOUNDARY instead of
21081         MIN_STACK_BOUNDARY.
21082         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
21083         MIN_STACK_BOUNDARY.
21084         (BIGGEST_ALIGNMENT): Set to 128.
21085         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
21086         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
21087         STACK_BOUNDARY.
21089 2018-03-19  Richard Biener  <rguenther@suse.de>
21091         PR tree-optimization/84933
21092         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
21093         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
21095 2018-03-19  Richard Biener  <rguenther@suse.de>
21097         PR tree-optimization/84859
21098         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
21099         (cond_if_else_store_replacement): Perform sinking operation on
21100         single-store BBs regardless of MAX_STORES_TO_SINK setting.
21101         Generalize what a BB with a single eligible store is.
21103 2018-03-19  Richard Biener  <rguenther@suse.de>
21105         PR tree-optimization/84929
21106         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
21107         chrec_is_positive against non-chrec arg.
21109 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
21111         PR target/84711
21112         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
21114 2018-03-18  Martin Liska  <mliska@suse.cz>
21116         PR rtl-optimization/84635
21117         * regrename.c (build_def_use): Use matches_mode only when
21118         matches >= 0.
21120 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
21122         PR tree-optimization/84913
21123         * tree-vect-loop.c (vectorizable_reduction): Don't try to
21124         vectorize chains of COND_EXPRs.
21126 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
21128         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
21130 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
21132         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
21134 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
21136         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
21138 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
21139             Kito Cheng  <kito.cheng@gmail.com>
21141         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
21142         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
21143         (nds32_adjust_reg_alloc_order): New function.
21144         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
21146 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
21148         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
21149         nds32_print_operand, nds32_print_operand_address): Use
21150         HOST_WIDE_INT_PRINT_DEC instead.
21152 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
21154         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
21156 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
21158         PR target/84902
21159         * config/i386/i386.c (initial_ix86_tune_features,
21160         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
21161         unsigned long long.
21162         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
21163         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
21164         rather than 1u << ix86_tune.  Formatting fix.
21165         (ix86_option_override_internal): Change ix86_arch_mask from
21166         unsigned int to unsigned HOST_WIDE_INT, initialize to
21167         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
21168         (ix86_function_specific_restore): Likewise.
21170 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
21172         PR target/84899
21173         * postreload.c (reload_combine_recognize_pattern): Perform
21174         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
21175         truncate_int_for_mode the result for the destination's mode.
21177         PR c/84909
21178         * hsa-gen.c (mem_type_for_type): Fix comment typo.
21179         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
21180         Likewise.
21181         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21182         Likewise.
21184 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
21186         PR target/84876
21187         * lra-assigns.c (lra_split_hard_reg_for): Don't use
21188         regno_allocno_class_array and sorted_pseudos.
21189         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
21190         insns where regno is used.
21192 2018-03-16  Martin Liska  <mliska@suse.cz>
21194         PR ipa/84833
21195         * multiple_target.c (create_dispatcher_calls): Redirect
21196         reference in the symbol table.
21198 2018-03-16  Martin Liska  <mliska@suse.cz>
21200         PR ipa/84722
21201         * multiple_target.c (create_dispatcher_calls): Redirect also
21202         an alias.
21204 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
21206         PR c++/79937
21207         PR c++/82410
21208         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
21209         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
21210         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
21212 2018-03-16  Julia Koval  <julia.koval@intel.com>
21214         * doc/invoke.texi (Skylake Server): Add CLWB.
21215         Cannonlake): Remove CLWB.
21217 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
21219         PR tree-optimization/84841
21220         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
21221         1 << 3.
21222         (FLOAT_ONE_CONST_TYPE): Define.
21223         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
21224         (sort_by_operand_rank): Put entries with higher constant_type last
21225         rather than first to match comments.
21227 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
21229         * config/nios2/nios2.md (movsi_internal): Fix thinko in
21230         split predicate.
21232 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
21234         PR c++/79085
21235         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
21236         check and use address of target always.
21238 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
21240         PR target/84574
21241         * config/i386/i386.c (indirect_thunk_needed): Update comments.
21242         (indirect_thunk_bnd_needed): Likewise.
21243         (indirect_thunks_used): Likewise.
21244         (indirect_thunks_bnd_used): Likewise.
21245         (indirect_return_needed): New.
21246         (indirect_return_bnd_needed): Likewise.
21247         (output_indirect_thunk_function): Add a bool argument for
21248         function return.
21249         (output_indirect_thunk_function): Don't generate alias for
21250         function return thunk.
21251         (ix86_code_end): Call output_indirect_thunk_function to generate
21252         function return thunks.
21253         (ix86_output_function_return): Set indirect_return_bnd_needed
21254         and indirect_return_needed instead of indirect_thunk_bnd_needed
21255         and indirect_thunk_needed.
21257 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
21259         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
21260         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
21261         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
21263 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
21264             Paul Hua <paul.hua.gm@gmail.com>
21266         PR c/84852
21267         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
21269 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
21271         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
21272         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
21273         resp. SFmode cases.
21275 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
21277         PR target/84711
21278         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
21279         instead of GET_MODE_SIZE when comparing Units.
21281 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
21283         PR target/68256
21284         * varasm.c (hash_section): Return an unchangeble hash value
21285         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21286         Return !aarch64_can_use_per_function_literal_pools_p ().
21288 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
21290         PR target/84860
21291         * optabs.c (emit_conditional_move): Pass address of cmode's copy
21292         rather than address of cmode as last argument to prepare_cmp_insn.
21294 2018-03-15  Julia Koval  <julia.koval@intel.com>
21296         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21297         F_AVX512VNNI, F_AVX512BITALG): New.
21299 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
21301         PR target/83451
21302         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
21303         insn for floating-point loads and stores.
21305 2018-03-14  Carl Love  <cel@us.ibm.com>
21307         * config/rs6000/rs6000-c.c: Add macro definitions for
21308         ALTIVEC_BUILTIN_VEC_PERMXOR.
21309         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21310         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21311         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21312         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21313         UNSPEC_VPERMXOR.
21314         * config/doc/extend.texi: Add prototypes for vec_permxor.
21316 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
21318         PR c/84852
21319         * diagnostic-show-locus.c (class layout_point): Convert m_line
21320         from int to linenum_type.
21321         (line_span::comparator): Use linenum "compare" function when
21322         comparing line numbers.
21323         (test_line_span): New function.
21324         (layout_range::contains_point): Convert param "row" from int to
21325         linenum_type.
21326         (layout_range::intersects_line_p): Likewise.
21327         (layout::will_show_line_p): Likewise.
21328         (layout::print_source_line): Likewise.
21329         (layout::should_print_annotation_line_p): Likewise.
21330         (layout::print_annotation_line): Likewise.
21331         (layout::print_leading_fixits): Likewise.
21332         (layout::annotation_line_showed_range_p): Likewise.
21333         (struct line_corrections): Likewise for field m_row.
21334         (line_corrections::line_corrections): Likewise for param "row".
21335         (layout::print_trailing_fixits): Likewise.
21336         (layout::get_state_at_point): Likewise.
21337         (layout::get_x_bound_for_row): Likewise.
21338         (layout::print_line): Likewise.
21339         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21340         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21341         * input.c (selftest::test_linenum_comparisons): New function.
21342         (selftest::input_c_tests): Call it.
21343         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21344         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21345         * selftest.h (ASSERT_GT): New macro.
21346         (ASSERT_GT_AT): New macro.
21347         (ASSERT_LT): New macro.
21348         (ASSERT_LT_AT): New macro.
21350 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
21352         PR rtl-optimization/84780
21353         * combine.c (distribute_links): Don't make a link based on pc_rtx.
21355 2018-03-14  Martin Liska  <mliska@suse.cz>
21357         * tree.c (record_node_allocation_statistics): Use
21358         get_stats_node_kind.
21359         (get_stats_node_kind): New function extracted from
21360         record_node_allocation_statistics.
21361         (free_node): Use get_stats_node_kind.
21363 2018-03-14  Richard Biener  <rguenther@suse.de>
21365         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21366         that the value-set of ANTIC_IN doesn't grow.
21368         Revert
21369         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21370         member.
21371         (BB_VISITED_WITH_VISITED_SUCCS): New define.
21372         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21374 2018-03-14  Julia Koval  <julia.koval@intel.com>
21376         * config.gcc (icelake-client, icelake-server): New.
21377         (icelake): Remove.
21378         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21379         (initial_ix86_arch_features): Ditto.
21380         (PTA_SKYLAKE): Add SGX.
21381         (PTA_ICELAKE): Remove.
21382         (PTA_ICELAKE_CLIENT): New.
21383         (PTA_ICELAKE_SERVER): New.
21384         (ix86_option_override_internal): Split up icelake on icelake client and
21385         icelake server.
21386         (get_builtin_code_for_version): Ditto.
21387         (fold_builtin_cpu): Ditto.
21388         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21389         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21390         * config/i386/i386.h (processor_type): Ditto.
21391         * doc/invoke.texi: Ditto.
21393 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
21395         PR sanitizer/83392
21396         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21397         INTEGER_CST offset, add it together with bitpos / 8 and
21398         sign extend based on POINTER_SIZE.
21400         PR target/84844
21401         Revert
21402         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
21404         PR target/78090
21405         * config/i386/constraints.md (Yc): New register constraint.
21406         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21407         Use Yc constraint for alternative 2 of operand 0.  Remove
21408         preferred_for_speed attribute.
21410 2018-03-14  Richard Biener  <rguenther@suse.de>
21412         PR tree-optimization/84830
21413         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21414         with the old one to avoid oscillations.
21416 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
21418         PR target/83712
21419         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21420         pseudos.
21421         (assign_by_spills): Return a flag of reload assignment failure.
21422         Do not process the reload assignment failures.  Do not spill other
21423         reload pseudos if they has the same reg class.  Update n if
21424         necessary.
21425         (lra_assign): Add a return arg.  Set up from the result of
21426         assign_by_spills call.
21427         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21428         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
21429         usage_insns if it is not NULL.
21430         (spill_hard_reg_in_range): New function.
21431         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21432         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21433         function prototypes.
21434         (lra_assign): Change prototype.
21435         * lra.c (lra): Add code to deal with fails by splitting hard reg
21436         live ranges.
21438 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
21440         * config/riscv/riscv.opt (mrelax): New option.
21441         * config/riscv/riscv.c (riscv_file_start): Emit ".option
21442         "norelax" when riscv_mrelax is disabled.
21443         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21445 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21447         PR target/84743
21448         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21449         reassociation for int modes.
21451 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
21453         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21454         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21455         for big-endian.
21456         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21457         * config/aarch64/aarch64-sve.md
21458         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21459         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21460         (*extend<mode><Vwide>2): Rename to...
21461         (aarch64_sve_extend<mode><Vwide>2): ...this.
21462         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21463         renaming the old pattern to...
21464         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
21465         unsigned packs.
21466         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21467         define_expand, renaming the old pattern to...
21468         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21469         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21470         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21471         account when deciding which SVE instruction the optab should use.
21472         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21474 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
21476         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21477         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21478         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21479         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21480         (tlsdesc_small_<mode>): Turn a define_expand and use
21481         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
21482         (tlsdesc_small_advsimd_<mode>): ...this.
21483         (tlsdesc_small_sve_<mode>): New pattern.
21485 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
21487         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21488         (UNSPEC_UMUL_HIGHPART): New constants.
21489         (MUL_HIGHPART): New int iteraor.
21490         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21491         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21492         define_expand.
21493         (*<su>mul<mode>3_highpart): New define_insn.
21495 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
21497         PR lto/84805
21498         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21499         incomplete types.
21501 2018-03-13  Martin Liska  <mliska@suse.cz>
21503         PR ipa/84658.
21504         * (sem_item_optimizer::sem_item_optimizer): Initialize new
21505         vector.
21506         (sem_item_optimizer::~sem_item_optimizer): Release it.
21507         (sem_item_optimizer::merge_classes): Register variable aliases.
21508         (sem_item_optimizer::fixup_pt_set): New function.
21509         (sem_item_optimizer::fixup_points_to_sets): Likewise.
21510         * ipa-icf.h: Declare new variables and functions.
21512 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
21514         PR middle-end/84834
21515         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21516         integer_pow2p@2 and test integer_pow2p in condition.
21517         (A < 0 ? C : 0): Similarly for @1.
21519         PR middle-end/84831
21520         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21521         characters starting at p contain '\0' character, don't look beyond
21522         that.
21524         PR target/84827
21525         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21526         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21528         PR target/84828
21529         * reg-stack.c (change_stack): Change update_end var from int to
21530         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21531         also call set_block_for_insn on the newly added insns and rescan.
21533         PR target/84786
21534         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21535         on the last operand.
21537         PR c++/84704
21538         * tree.c (stabilize_reference_1): Return save_expr (e) for
21539         STATEMENT_LIST even if it doesn't have side-effects.
21541 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
21543         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21545 2018-03-12  Renlin Li  <renlin.li@arm.com>
21547         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21548         aarch64_output_scalar_simd_mov_immediate.
21550 2018-03-12  Martin Sebor  <msebor@redhat.com>
21552         PR tree-optimization/83456
21553         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21554         for perfectly overlapping calls to memcpy.
21555         (gimple_fold_builtin_memory_chk): Same.
21556         (gimple_fold_builtin_strcpy): Handle no-warning.
21557         (gimple_fold_builtin_stxcpy_chk): Same.
21558         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21560 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
21562         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21563         parameter.  Use it for SFmode.
21564         (rs6000_function_arg_advance_1): Adjust.
21565         (rs6000_function_arg): Adjust.
21566         (rs6000_gimplify_va_arg): Pass false for that new parameter.
21568 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
21570         PR rtl-optimization/84169
21571         PR rtl-optimization/84780
21572         * combine.c (can_combine_p): Check for a 2-insn combination whether
21573         the destination register is used between the two insns, too.
21575 2018-03-12  Richard Biener  <rguenther@suse.de>
21577         PR tree-optimization/84803
21578         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21579         for refs DR analysis didn't process.
21581 2018-03-12  Richard Biener  <rguenther@suse.de>
21583         PR tree-optimization/84777
21584         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21585         force-vectorize loops ignore whether we are optimizing for size.
21587 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
21589         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21590         (TARGET_MD_ASM_ADJUST): Define.
21592 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
21593             Kito Cheng  <kito.cheng@gmail.com>
21594             Chung-Ju Wu  <jasonwucj@gmail.com>
21596         * config/nds32/nds32.c (nds32_compute_stack_frame,
21597         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21598         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21599         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21600         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21601         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21602         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21603         * config/nds32/nds32.md (prologue, epilogue): Use macro
21604         NDS32_V3PUSH_AVAILABLE_P to do checking.
21606 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
21608         PR debug/58150
21609         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21610         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21611         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
21612         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
21613         addition of most attributes on !orig_type_die or the attribute not
21614         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21616 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
21617             Chung-Ju Wu  <jasonwucj@gmail.com>
21619         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21620         __NDS32_VH__ macro.
21621         * config/nds32/nds32.opt (mvh): New option.
21623 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
21624             Chung-Ju Wu  <jasonwucj@gmail.com>
21626         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21627         function.
21628         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21629         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21630         definition.
21632 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
21633             Chung-Ju Wu  <jasonwucj@gmail.com>
21635         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21636         function.
21637         * config/nds32/nds32-multiple.md (strlensi): New pattern.
21638         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21640 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
21641             Kito Cheng  <kito.cheng@gmail.com>
21642             Chung-Ju Wu  <jasonwucj@gmail.com>
21644         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21645         UNSPEC_FFMISM and UNSPEC_FLMISM.
21646         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21647         for ffb, ffmism and flmism.
21648         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21649         (unspec_ffmism): Ditto.
21650         (unspec_flmism): Ditto.
21651         (nds32_expand_builtin_impl): Check if string extension is available.
21652         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21653         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21655 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
21657         Reverting patch:
21658         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
21660         PR target/83712
21661         * lra-assigns.c (assign_by_spills): Return a flag of reload
21662         assignment failure.  Do not process the reload assignment
21663         failures.  Do not spill other reload pseudos if they has the same
21664         reg class.
21665         (lra_assign): Add a return arg.  Set up from the result of
21666         assign_by_spills call.
21667         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21668         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
21669         usage_insns if it is not NULL.
21670         (spill_hard_reg_in_range): New function.
21671         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21672         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21673         function prototypes.
21674         (lra_assign): Change prototype.
21675         * lra.c (lra): Add code to deal with fails by splitting hard reg
21676         live ranges.
21678 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
21680         PR target/84807
21681         * config/i386/i386.opt: Replace Enforcment with Enforcement.
21683 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
21685         PR debug/84620
21686         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21687         (dw_val_node): Add val_symbolic_view.
21688         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21689         (symview_upper_bound): New.
21690         (new_line_info_table): Initialize symviews_since_reset.
21691         (dwarf2out_source_line): Count symviews_since_reset and set
21692         symview_upper_bound.
21693         (dw_val_equal_p): Handle symview.
21694         (add_AT_symview): New.
21695         (print_dw_val): Handle symview.
21696         (attr_checksum, attr_checksum_ordered): Likewise.
21697         (same_dw_val_p, size_of_die): Likewise.
21698         (value_format, output_die): Likewise.
21699         (add_high_low_attributes): Use add_AT_symview for entry_view.
21700         (dwarf2out_finish): Reset symview_upper_bound, clear
21701         zero_view_p.
21703 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
21705         PR target/83969
21706         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21707         Add strict argument and use it.
21708         (rs6000_split_multireg_move): Update for new strict argument.
21709         (mem_operand_gpr): Disallow all non-offsettable addresses.
21710         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21712 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
21714         PR target/84772
21715         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21716         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21717         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21719         PR c++/84767
21720         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21721         decl, use remap_type if we want to use the type.
21723 2018-03-09  Martin Sebor  <msebor@redhat.com>
21725         PR tree-optimization/84526
21726         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21727         Remove dead code.
21728         (builtin_access::generic_overlap): Be prepared to handle non-array
21729         base objects.
21731 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
21733         PR rtl-optimization/84682
21734         * lra-constraints.c (process_address_1): Check is_address flag
21735         for address constraints.
21736         (process_alt_operands): Likewise.
21737         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21738         preprocess_constraints.
21739         * recog.h (preprocess_constraints): Add oploc parameter.
21740         Adjust callers.
21741         * recog.c (preprocess_constraints): Test address_operand for
21742         CT_ADDRESS constraints.
21744 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
21746         PR target/83712
21747         * lra-assigns.c (assign_by_spills): Return a flag of reload
21748         assignment failure.  Do not process the reload assignment
21749         failures.  Do not spill other reload pseudos if they has the same
21750         reg class.
21751         (lra_assign): Add a return arg.  Set up from the result of
21752         assign_by_spills call.
21753         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21754         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
21755         usage_insns if it is not NULL.
21756         (spill_hard_reg_in_range): New function.
21757         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21758         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21759         function prototypes.
21760         (lra_assign): Change prototype.
21761         * lra.c (lra): Add code to deal with fails by splitting hard reg
21762         live ranges.
21764 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21766         PR target/83193
21767         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21768         Accept complain bool parameter.  Only emit errors if it is true.
21769         (arm_parse_cpu_option_name): Likewise.
21770         (arm_target_thumb_only): Adjust callers of the above.
21771         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21772         prototype to take a default true bool parameter.
21773         (arm_parse_arch_option_name): Likewise.
21775 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
21776             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
21778         PR jit/64089
21779         PR jit/84288
21780         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21781         * configure: Regenerate.
21782         * configure.ac ("linker --version-script option"): New.
21783         ("linker soname option"): New.
21785 2018-03-09  Richard Biener  <rguenther@suse.de>
21787         PR tree-optimization/84775
21788         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21789         immediate uses of predicate stmts and mark them modified.
21791         Revert
21792         PR tree-optimization/84178
21793         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21794         to caller.
21795         (version_loop_for_if_conversion): Delay update_ssa call.
21796         (tree_if_conversion): Delay update_ssa until after predicate
21797         insertion.
21799 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
21801         PR target/84763
21802         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21803         when the function accesses prior frames.
21805 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
21807         PR debug/84456
21808         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21809         gen_llsym, otherwise call maybe_gen_llsym.
21811         PR inline-asm/84742
21812         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21813         has ',' character inside of it.
21815 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21817         PR target/84748
21818         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21819         as clobbering CC_REGNUM.
21821 2018-03-08  Richard Biener  <rguenther@suse.de>
21823         PR middle-end/84552
21824         * tree-scalar-evolution.c: Include tree-into-ssa.h.
21825         (follow_copies_to_constant): Do not follow SSA names registered
21826         for update.
21828 2018-03-08  Richard Biener  <rguenther@suse.de>
21830         PR tree-optimization/84178
21831         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21832         to caller.
21833         (version_loop_for_if_conversion): Delay update_ssa call.
21834         (tree_if_conversion): Delay update_ssa until after predicate
21835         insertion.
21837 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
21839         PR tree-optimization/84178
21840         * tree-if-conv.c (release_bb_predicate): Remove the
21841         the assertion that the stmts have NULL use_ops.
21842         Discard the statements, asserting that they haven't
21843         yet been added to a BB.
21845 2018-03-08  Richard Biener  <rguenther@suse.de>
21847         PR tree-optimization/84746
21848         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21849         (phi_translate): Pass in destination ANTIC_OUT set.
21850         (phi_translate_1): Likewise.  For a simplified result lookup
21851         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21852         (phi_translate_set): Adjust.
21853         (do_pre_regular_insertion): Likewise.
21854         (do_pre_partial_partial_insertion): Likewise.
21856 2018-03-08  Martin Liska  <mliska@suse.cz>
21858         PR gcov-profile/84735
21859         * doc/gcov.texi: Document usage of profile files.
21860         * gcov-io.h: Document changes in the format.
21862 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
21864         PR debug/84404
21865         PR debug/84408
21866         * dwarf2out.c (struct dw_line_info_table): Update comments for
21867         view == -1.
21868         (FORCE_RESET_NEXT_VIEW): New.
21869         (FORCE_RESETTING_VIEW_P): New.
21870         (RESETTING_VIEW_P): Check for -1 too.
21871         (ZERO_VIEW_P): Likewise.
21872         (new_line_info_table): Force-reset next view.
21873         (dwarf2out_begin_function): Likewise.
21874         (dwarf2out_source_line): Simplify zero_view_p initialization.
21875         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21876         view directly.  Omit view when omitting .loc at line 0.
21878 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
21880         PR tree-optimization/84740
21881         * tree-switch-conversion.c (process_switch): Call build_constructors
21882         only if info.phi_count is non-zero.
21884         PR tree-optimization/84739
21885         * tree-tailcall.c (find_tail_calls): Check call arguments against
21886         DECL_ARGUMENTS (current_function_decl) rather than
21887         DECL_ARGUMENTS (func) when checking for tail recursion.
21889 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
21891         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21892         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21893         Volker Reichelt's entry and add entries for people that perform
21894         GCC fuzzy testing and report numerous bugs.
21896 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
21898         PR target/82411
21899         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21900         readonly data in sdata, if that is disabled.
21901         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21902         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21903         -mreadonly-in-sdata option.
21905 2018-03-07  Martin Sebor  <msebor@redhat.com>
21907         PR tree-optimization/84468
21908         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21909         basic block when looking for nul assignment.
21911 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
21913         PR target/84277
21914         * except.h (output_function_exception_table): Adjust prototype.
21915         * except.c (output_function_exception_table): Remove FNNAME parameter
21916         and add SECTION parameter.  Ouput one part of the table at a time.
21917         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21918         the first part of the exception table and emit unwind directives.
21919         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21920         (i386_pe_seh_cold_init): Likewise.
21921         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21922         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21923         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21924         (ix86_output_call_insn): Emit a nop in one more case for SEH.
21925         * config/i386/winnt.c: Include except.h.
21926         (struct seh_frame_state): Add reg_offset, after_prologue and
21927         in_cold_section fields.
21928         (i386_pe_seh_end_prologue): Set seh->after_prologue.
21929         (i386_pe_seh_cold_init): New function.
21930         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21931         to seh->in_cold_section.
21932         (seh_emit_push): Record the offset of the push.
21933         (seh_emit_save): Record the offet of the save.
21934         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21935         Test seh->after_prologue to disregard the epilogue.
21936         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21937         (i386_pe_end_cold_function): New function.
21939 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
21941         PR fortran/84565
21942         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21943         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21945         PR c++/84704
21946         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21947         on tmp_var.
21948         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21949         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21951         PR middle-end/84723
21952         * multiple_target.c: Include tree-inline.h and intl.h.
21953         (expand_target_clones): Diagnose and fail if node->definition and
21954         !tree_versionable_function_p (node->decl).
21956 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
21958         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21959         sprint_ul.
21960         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21961         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21962         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21964 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
21966         PR target/84710
21967         * combine.c (try_combine): Use reg_or_subregno instead of handling
21968         just paradoxical SUBREGs and REGs.
21970 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
21972         * config/arc/arc.c (arc_finalize_pic): Remove function.
21973         (arc_must_save_register): We use single base PIC register, remove
21974         checks to save/restore the PIC register.
21975         (arc_expand_prologue): Likewise.
21976         * config/arc/arc-protos.h (arc_set_default_type_attributes):
21977         Remove.
21978         (arc_verify_short): Likewise.
21979         (arc_attr_type): Likewise.
21980         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21981         (walk_stores): Likewise.
21982         (arc_address_cost): Make it static.
21983         (arc_verify_short): Likewise.
21984         (branch_dest): Likewise.
21985         (arc_attr_type): Likewise.
21986         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21987         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21988         (arc_final_prescan_insn): Remove inserting the nops due to
21989         hardware hazards.  It is done in reorg step.
21990         (insn_length_variant_t): Remove.
21991         (insn_length_parameters_t): Likewise.
21992         (arc_insn_length_parameters): Likewise.
21993         (arc_get_insn_variants): Likewise.
21994         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21996 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
21998         PR inline-asm/84683
21999         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
22000         assertion failure.
22002         PR tree-optimization/84687
22003         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
22004         on new_node->decl.
22005         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
22007 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22009         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
22010         Rename to ppc_speculation_barrier.
22011         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
22012         __builtin_ppc_speculation_barrier.
22014 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
22016         PR target/84700
22017         * combine.c (combine_simplify_rtx): Don't try to simplify if
22018         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
22019         are equal to x.
22021 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
22023         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
22024         to 32 bytes when compiling for POWER9.
22026 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
22028         PR target/84564
22029         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
22030         regparm >= 3 with no arg reg available also for calls with
22031         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
22033         PR target/84524
22034         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
22035         orig,vex.
22036         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
22038 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
22040         PR target/84264
22041         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
22043 2018-03-05  Richard Biener  <rguenther@suse.de>
22045         PR tree-optimization/84486
22046         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
22047         When inserting a __builtin_assume_aligned call set the LHS
22048         SSA name alignment info accordingly.
22050 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
22052         PR tree-optimization/84114
22053         * config/aarch64/aarch64.c (aarch64_reassociation_width)
22054         Avoid reassociation of FLOAT_MODE addition.
22056 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
22058         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
22059         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
22060         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
22061         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
22062         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
22063         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
22064         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
22065         and -mwbnoinvd.
22066         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
22067         __builtin_ia32_wbinvd): New builtins.
22068         (SPECIAL_ARGS2): New.
22069         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
22070         (SPECIAL_ARGS2): New.
22071         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
22072         (ix86_valid_target_attribute_inner_p): Ditto.
22073         (ix86_init_mmx_sse_builtins): Add special_args2.
22074         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
22075         TARGET_WBNOINVD_P): New.
22076         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
22077         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
22078         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
22079         * config/i386/immintrin.h (_wbinvd): New intrinsic.
22080         * config/i386/pconfigintrin.h: New file.
22081         * config/i386/wbnoinvdintrin.h: Ditto.
22082         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
22083         wbnoinvdintrin.h.
22084         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
22086 2018-03-05  Richard Biener  <rguenther@suse.de>
22088         PR tree-optimization/84670
22089         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22090         member.
22091         (BB_VISITED_WITH_VISITED_SUCCS): New define.
22092         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22093         (compute_antic_aux): Only assert the number of values in ANTIC_IN
22094         doesn't grow if all successors (recursively) were visited at least
22095         once.
22097 2018-03-05  Richard Biener  <rguenther@suse.de>
22099         PR tree-optimization/84650
22100         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
22101         if executed in the loop pipeline.
22103 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
22105         * doc/configfiles.texi (Configuration Files): Move info about
22106         conditionalizing $target-protos.h to...
22107         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
22108         differs from $target-protos.h.
22110 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
22111             Chung-Ju Wu  <jasonwucj@gmail.com>
22113         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
22114         * config/nds32/nds32-multiple.md (setmemsi): Define.
22115         * config/nds32/nds32-memory-manipulation.c
22116         (nds32_gen_dup_4_byte_to_word_value): New.
22117         (emit_setmem_word_loop): New.
22118         (emit_setmem_byte_loop): New.
22119         (nds32_expand_setmem_loop): New.
22120         (nds32_expand_setmem_loop_v3m): New.
22121         (nds32_expand_setmem_unroll): New.
22122         (nds32_expand_setmem): New.
22124 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
22125             Chung-Ju Wu  <jasonwucj@gmail.com>
22127         * config/nds32/nds32-memory-manipulation.c
22128         (nds32_emit_load_store): New.
22129         (nds32_emit_post_inc_load_store): New.
22130         (nds32_emit_mem_move): New.
22131         (nds32_emit_mem_move_block): New.
22132         (nds32_expand_movmemsi_loop_unknown_size): New.
22133         (nds32_expand_movmemsi_loop_known_size): New.
22134         (nds32_expand_movmemsi_loop): New.
22135         (nds32_expand_movmemsi_unroll): New.
22136         (nds32_expand_movmemqi): Rename ...
22137         (nds32_expand_movmemsi): ... to this.
22138         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
22139         (movmemsi): ... to this.
22140         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
22141         (nds32_expand_movmemsi): ... to this.
22143 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
22144             Monk Chiang  <sh.chiang04@gmail.com>
22145             Chung-Ju Wu  <jasonwucj@gmail.com>
22147         * config/nds32/nds32-protos.h
22148         (nds32_expand_load_multiple): New arguments.
22149         (nds32_expand_store_multiple): Ditto.
22150         (nds32_valid_multiple_load_store): Rename ...
22151         (nds32_valid_multiple_load_store_p): ... to this.
22152         * config/nds32/nds32-memory-manipulation.c
22153         (nds32_expand_load_multiple): Refine implementation.
22154         (nds32_expand_store_multiple): Ditto.
22155         * config/nds32/nds32-multiple.md
22156         (load_multiple): Update nds32_expand_load_multiple interface.
22157         (store_multiple): Update nds32_expand_store_multiple interface.
22158         * config/nds32/nds32-predicates.c
22159         (nds32_valid_multiple_load_store): Rename ...
22160         (nds32_valid_multiple_load_store_p): ... to this and refine
22161         implementation.
22162         * config/nds32/predicates.md
22163         (nds32_load_multiple_and_update_address_operation): New predicate.
22164         (nds32_store_multiple_and_update_address_operation): New predicate.
22166 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
22167             Chung-Ju Wu  <jasonwucj@gmail.com>
22169         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
22170         (combo): New attribute.
22171         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
22173 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
22175         * config/nds32/nds32.opt: Change -mcmodel= default value.
22177 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
22178             Monk Chiang  <sh.chiang04@gmail.com>
22179             Chung-Ju Wu  <jasonwucj@gmail.com>
22181         * config/nds32/constants.md (unspec_element): New enum.
22182         * config/nds32/constraints.md (Umw): New constraint.
22183         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
22184         * config/nds32/nds32-intrinsic.md: Likewise.
22185         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
22186         (nds32_valid_smw_lwm_base_p): New.
22187         (nds32_output_smw_single_word): New.
22188         (nds32_output_lmw_single_word): New.
22189         (nds32_expand_unaligned_load): New.
22190         (nds32_expand_unaligned_store): New.
22191         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
22192         (nds32_output_smw_single_word): Declare.
22193         (nds32_output_lmw_single_word): Declare.
22194         (nds32_expand_unaligned_load): Declare.
22195         (nds32_expand_unaligned_store): Declare.
22196         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
22197         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
22198         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
22199         NDS32_BUILTIN_UASTORE_DW.
22200         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
22201         predicate.
22203 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
22204             Kito Cheng  <kito.cheng@gmail.com>
22205             Chung-Ju Wu  <jasonwucj@gmail.com>
22207         * config/nds32/nds32-intrinsic.c
22208         (nds32_expand_builtin_null_ftype_reg): Delete.
22209         (nds32_expand_builtin_reg_ftype_imm): Ditto.
22210         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
22211         (nds32_read_argument): New.
22212         (nds32_legitimize_target): Ditto.
22213         (nds32_legitimize_argument): Ditto.
22214         (nds32_check_constant_argument): Ditto.
22215         (nds32_expand_unop_builtin): Ditto.
22216         (nds32_expand_unopimm_builtin): Ditto.
22217         (nds32_expand_binop_builtin): Ditto.
22218         (nds32_builtin_decl_impl): Ditto.
22219         (builtin_description): Ditto.
22220         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
22221         (nds32_init_builtins_impl): Ditto.
22222         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
22223         (nds32_builtin_decl): New.
22224         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
22225         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
22227 2018-03-02  Jeff Law  <law@redhat.com>
22229         * reorg.c (stop_search_p): Handle DEBUG_INSN.
22230         (redundant_insn, fill_simple_delay_slots): Likewise.
22231         (fill_slots_from_thread): Likewise.
22232         * resource.c (mark_referenced_resources): Likewise.
22233         (mark_set_resources, find_dead_or_set_registers): Likewise.
22235 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
22237         * substring-locations.h (format_warning_va): Formatting fix for
22238         ATTRIBUTE_GCC_DIAG.
22239         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
22240         argument.
22241         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
22242         * substring-locations.c: Include intl.h.
22243         (format_warning_va): Turned into small wrapper around
22244         format_warning_n_va, renamed to ...
22245         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
22246         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
22247         use ngettext.
22248         (format_warning_at_substring_n): New function.
22249         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
22250         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
22251         format_warning_at_substring with just a shorter name instead of
22252         const function pointer.
22253         (fmtwarn_n): New function.
22254         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
22255         appropriate, get rid of all the fmtstr temporaries, move conditionals
22256         with G_() wrapped string literals directly into fmtwarn arguments,
22257         cast dir.len to (int), formatting fixes.
22259 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
22261         * doc/invoke.texi: Remove "Cilk Plus" references.
22263 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
22264             Richard Biener  <rguenther@suse.de>
22266         PR ipa/84628
22267         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
22268         for error or warning attributes if CALL_FROM_THUNK_P is set.
22269         Formatting fixes.
22271 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
22273         PR target/56540
22274         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
22275         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
22277         PR target/56540
22278         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
22279         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
22281         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
22282         instead of -1U in last predictors element's probability member.
22284 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
22286         PR ipa/83983
22287         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22288         arguments if they are comparable.
22290 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
22292         PR tree-optimization/84634
22293         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22294         masks and masked_loop_p with a single loop_masks, making sure it's
22295         null for bb vectorization.
22297 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
22299         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22300         (vect_analyze_data_ref_access): Use loop->safe_len rather than
22301         loop->force_vectorize to check whether there is no alias.
22303 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
22305         PR target/84614
22306         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22307         prototypes.
22308         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22309         comments.
22310         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22311         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22312         instead of a loop around prev_real_insn.
22313         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22314         prev_real_insn.
22316         PR inline-asm/84625
22317         * config/i386/i386.c (ix86_print_operand): Use conditional
22318         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22319         zero vector.
22321 2018-03-02  Richard Biener  <rguenther@suse.de>
22323         PR tree-optimization/84427
22324         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22325         (bitmap_set_subtract_values): Rewrite to handle multiple
22326         exprs per value.
22327         (clean): Likewise.
22328         (prune_clobbered_mems): Likewise.
22329         (phi_translate): Take edge instead of pred/phiblock.
22330         (phi_translate_1): Likewise.
22331         (phi_translate_set): Likewise.  Insert all translated
22332         exprs for a value into the set, keeping possibly multiple
22333         expressions per value.
22334         (compute_antic_aux): Adjust for phi_translate changes.
22335         When intersecting union the expressions and prune those
22336         not in the final value set, keeping possibly multiple
22337         expressions per value.  Do not use value-insertion
22338         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22339         all expressions.  Add verification that the value-sets
22340         only shrink during iteration.
22341         (compute_partial_antic_aux): Adjust for the phi_translate changes.
22342         (do_pre_regular_insertion): Likewise.
22343         (do_pre_partial_partial_insertion): Likewise.
22345 2018-03-02  Richard Biener  <rguenther@suse.de>
22347         PR target/82005
22348         * config/darwin.c (saved_debug_info_level): New static global.
22349         (darwin_asm_lto_start): Disable debug info generation for LTO out.
22350         (darwin_asm_lto_end): Restore debug info generation settings.
22352 2018-03-01  Martin Liska  <mliska@suse.cz>
22354         PR sanitizer/82484
22355         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22356         volatile arguments.
22358 2018-03-01  Richard Biener  <rguenther@suse.de>
22360         PR debug/84645
22361         * dwarf2out.c (gen_variable_die): Properly handle late VLA
22362         type annotation with LTO when debug was disabled at compile-time.
22364 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
22366         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22367         XINT with INTVAL.
22368         (mips_final_postscan_insn): Likewise.
22370 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
22372         PR rtl-optimization/84528
22373         * alias.c (init_alias_target): Add commentary.
22374         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22375         a unique base value if the frame pointer is not eliminated
22376         to the stack pointer.
22378 2018-03-01  Tom de Vries  <tom@codesourcery.com>
22380         PR rtl-optimization/83327
22381         * lra-int.h (hard_regs_spilled_into): Declare.
22382         * lra.c (hard_regs_spilled_into): Define.
22383         (init_reg_info): Init hard_regs_spilled_into.
22384         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22385         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22386         (process_bb_lives): Handle hard_regs_spilled_into.
22387         (lra_create_live_ranges_1): Before doing liveness propagation, clear
22388         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22390 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
22392         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22393         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22394         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22395         * config/rs6000/aix72.h: New file.
22397 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
22399         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22400         instead of warning_at with conditional singular and plural messages
22401         where possible.
22403         PR target/52991
22404         * stor-layout.c (update_alignment_for_field): For
22405         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22406         && !DECL_PACKED (field), do the alignment update, just use
22407         only desired_align instead of MAX (type_align, desired_align)
22408         as the alignment.
22409         (place_field): Don't do known_align < desired_align handling
22410         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22411         is non-NULL, instead do it after rli->prev_field handling and
22412         only if not within a bitfield word.  For DECL_PACKED (field)
22413         use type_align of BITS_PER_UNIT.
22415 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
22417         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22418         superfluous parentheses and trailing spaces.
22420 2018-02-28  Richard Biener  <rguenther@suse.de>
22422         PR tree-optimization/84584
22423         * graphite-scop-detection.c (scop_detection::add_scop): Discard
22424         SCoPs with fake exit edge.
22426 2018-02-28  Martin Liska  <mliska@suse.cz>
22428         PR testsuite/84597
22429         * timevar.c (timer::print): Fix format to properly print 100%
22430         values.
22432 2018-02-28  Richard Biener  <rguenther@suse.de>
22434         PR middle-end/84607
22435         * genmatch.c (capture_info::walk_match): Do not mark
22436         captured expressions without operands as expr_p given
22437         they act more like predicates and should be subject to
22438         "lost tail" side-effect preserving.
22440 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
22442         PR rtl-optimization/81611
22443         * auto-inc-dec.c (attempt_change): Move dead note from
22444         mem_insn if it's the next use of regno
22445         (find_address): Take address use of reg holding
22446         non-incremented value.  Add parm to limit search to the named
22447         reg only.
22448         (merge_in_block): Attempt to use a mem insn that is the next
22449         use of the original regno.
22451 2018-02-27  Martin Sebor  <msebor@redhat.com>
22453         PR c++/83871
22454         * doc/invoke.texi (-Wmissing-attributes): New option.
22455         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22457 2018-02-27  Martin Sebor  <msebor@redhat.com>
22459         PR translation/84207
22460         * diagnostic-core.h (warning_n, error_n, inform_n): Change
22461         n argument to unsigned HOST_WIDE_INT.
22462         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22463         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
22464         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22465         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22467 2018-02-27  Richard Biener  <rguenther@suse.de>
22469         PR tree-optimization/84512
22470         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22471         Do not use the estimate returned from record_stmt_cost for
22472         the scalar iteration cost but sum properly using add_stmt_cost.
22474 2018-02-27  Richard Biener  <rguenther@suse.de>
22476         PR tree-optimization/84466
22477         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22478         Adjust last change to less strictly validate use operands.
22480 2018-02-27  Martin Liska  <mliska@suse.cz>
22482         PR gcov-profile/84548
22483         * gcov.c (process_file): Allow partial overlap and consider it
22484         also as group functions.
22485         (output_lines): Properly calculate range of lines for a group.
22487 2018-02-27  Martin Liska  <mliska@suse.cz>
22489         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22490         'ggc' suffixes.  Change first column width.
22491         (timer::print): Fix formatting of the column.
22493 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
22495         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22496         preserve inline entry blocks for the sake of debug inline
22497         entry point markers alone.
22498         (remove_unused_locals): Suggest in comments a better place to
22499         force the preservation of inline entry blocks that are
22500         otherwise unused, but do not preserve them.
22502 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
22504         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22506 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
22508         PR target/84039
22509         * config/i386/constraints.md (Bs): Replace
22510         ix86_indirect_branch_register with
22511         TARGET_INDIRECT_BRANCH_REGISTER.
22512         (Bw): Likewise.
22513         * config/i386/i386.md (indirect_jump): Likewise.
22514         (tablejump): Likewise.
22515         (*sibcall_memory): Likewise.
22516         (*sibcall_value_memory): Likewise.
22517         Peepholes of indirect call and jump via memory: Likewise.
22518         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22519         (*sibcall_value_GOT_32): Likewise.
22520         * config/i386/predicates.md (indirect_branch_operand): Likewise.
22521         (GOT_memory_operand): Likewise.
22522         (call_insn_operand): Likewise.
22523         (sibcall_insn_operand): Likewise.
22524         (GOT32_symbol_operand): Likewise.
22525         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22527 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
22529         PR rtl-optimization/83496
22530         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22531         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
22532         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22533         redundant insn, if any.
22534         (relax_delay_slots): Likewise.
22535         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22537 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
22539         PR tree-optimization/83965
22540         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22541         that grouped statements are part of a reduction chain.  Return
22542         true if the statement is not marked as a reduction itself but
22543         is part of a group.
22544         (vect_recog_dot_prod_pattern): Don't check whether the statement
22545         is part of a group here.
22546         (vect_recog_sad_pattern): Likewise.
22547         (vect_recog_widen_sum_pattern): Likewise.
22549 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
22551         PR debug/84545
22552         * final.c (rest_of_clean_state): Also look for calls inside sequences.
22554 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
22556         PR target/84530
22557         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22558         the bool argument.
22559         (ix86_output_indirect_function_return): New prototype.
22560         (ix86_split_simple_return_pop_internal): Likewise.
22561         * config/i386/i386.c (indirect_return_via_cx): New.
22562         (indirect_return_via_cx_bnd): Likewise.
22563         (indirect_thunk_name): Handle return va CX_REG.
22564         (output_indirect_thunk_function): Create alias for
22565         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22566         (ix86_output_indirect_jmp): Remove the bool argument.
22567         (ix86_output_indirect_function_return): New function.
22568         (ix86_split_simple_return_pop_internal): Likewise.
22569         * config/i386/i386.md (*indirect_jump): Don't pass false
22570         to ix86_output_indirect_jmp.
22571         (*tablejump_1): Likewise.
22572         (simple_return_pop_internal): Change it to define_insn_and_split.
22573         Call ix86_split_simple_return_pop_internal to split it for
22574         -mfunction-return=.
22575         (simple_return_indirect_internal): Call
22576         ix86_output_indirect_function_return instead of
22577         ix86_output_indirect_jmp.
22579 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
22581         PR bootstrap/84405
22582         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22583         memset and value initialization afterwards.
22585 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
22587         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22589 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22591         PR target/84521
22592         * common/config/aarch64/aarch64-common.c
22593         (aarch_option_optimization_table[]): Switch
22594         off fomit-frame-pointer
22596 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
22597             Chung-Ju Wu  <jasonwucj@gmail.com>
22599         * config/nds32/nds32-multiple.md (load_multiple): Disallow
22600         volatile memory.
22601         (store_multiple): Ditto.
22603 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
22605         * config.gcc: Add --with-cpu support for nds32 target.
22606         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22607         * config/nds32/nds32.opt: Add -mcpu= option.
22609 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
22611         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22612         isel=yes): Warn for these deprecated options.
22614 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
22616         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22617         ISA_2_5_MASKS_EMBEDDED.
22619 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
22621         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22622         p->max as pointers rather than using iterative_hash_expr.
22624 2018-02-23  Carl Love  <cel@us.ibm.com>
22626         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22627         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22628         BU_P8V_OVERLOAD_2.
22629         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22630         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22631         P8V_BUILTIN_VEC_VUNSIGNED2.
22633 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
22635         PR target/81572
22636         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22637         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22638         LRA_UNKNOWN_ALT.
22639         * lra-constraints.c (curr_insn_transform): Set up
22640         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
22641         LRA_UNKNOWN_ALT.
22642         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22643         * lra-eliminations.c (spill_pseudos): Ditto.
22644         (process_insn_for_elimination): Ditto.
22645         * lra-lives.c (reg_early_clobber_p): Use the new macros.
22646         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22647         LRA_NON_CLOBBERED_ALT.
22649 2018-02-22  Martin Sebor  <msebor@redhat.com>
22651         PR tree-optimization/84480
22652         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22653         to maybe_diag_stxncpy_trunc.  Call it.
22654         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22655         from gimple_fold_builtin_strcpy.  Print inlining stack.
22656         (handle_builtin_stxncpy): Print inlining stack.
22657         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22659 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
22661         PR target/84176
22662         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22663         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22664         and -fcheck-pointer-bounds are used together.
22665         (indirect_thunk_prefix): New enum.
22666         (indirect_thunk_need_prefix): New function.
22667         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
22668         "_nt" instead of "_bnd" for NOTRACK prefix.
22669         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22670         (output_indirect_thunk_function): Likewise.
22671         (): Likewise.
22672         (ix86_code_end): Update output_indirect_thunk_function calls.
22673         (ix86_output_indirect_branch_via_reg): Replace
22674         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22675         (ix86_output_indirect_branch_via_push): Likewise.
22676         (ix86_output_function_return): Likewise.
22677         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22678         incompatible with -fcf-protection=branch and
22679         -fcheck-pointer-bounds.
22681 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
22683         PR target/83335
22684         * config/aarch64/aarch64.c (aarch64_print_address_internal):
22685         Change gcc_assert call to output_operand_lossage.
22687 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
22689         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22691 2018-02-22  DJ Delorie  <dj@redhat.com>
22692             Sebastian Perta  <sebastian.perta@renesas.com>
22693             Oleg Endo  <olegendo@gcc.gnu.org>
22695         * config/rx/rx.c (rx_rtx_costs): New function.
22696         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22698 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22700         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22702 2018-02-22  Martin Liska  <mliska@suse.cz>
22704         PR driver/83193
22705         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22706         Add "native" as a possible value.
22708 2018-02-22  Martin Liska  <mliska@suse.cz>
22710         PR driver/83193
22711         * config/i386/i386.c (ix86_option_override_internal):
22712         Add "native" as a possible value for -march and -mtune.
22714 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
22716         PR target/84502
22717         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22718         to all type variants.
22720         PR tree-optimization/84503
22721         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22722         width as info->bitpos + info->bitsize - start.
22723         (merged_store_group::merge_overlapping): Simplify width computation.
22724         (check_no_overlap): New function.
22725         (imm_store_chain_info::try_coalesce_bswap): Compute expected
22726         start + width and last_order of the group, fail if check_no_overlap
22727         fails.
22728         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22729         to group if check_no_overlap fails.
22731 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
22733         * config/rs6000/altivec.md: Delete contraint arguments to
22734         define_expand, define_split, and define_peephole2, and in
22735         define_insn_and_split if always unused.
22736         * config/rs6000/darwin.md: Ditto.
22737         * config/rs6000/dfp.md: Ditto.
22738         * config/rs6000/rs6000.md: Ditto.
22739         * config/rs6000/sync.md: Ditto.
22740         * config/rs6000/vector.md: Ditto.
22741         * config/rs6000/vsx.md: Ditto.
22743 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
22745         * config/rs6000/altivec.md: Write output control strings as braced
22746         blocks instead of double-quoted strings.
22747         * config/rs6000/darwin.md: Ditto.
22748         * config/rs6000/rs6000.md: Ditto.
22749         * config/rs6000/vector.md: Ditto.
22750         * config/rs6000/vsx.md: Ditto.
22752 2018-02-21  Jason Merrill  <jason@redhat.com>
22754         PR c++/84314 - ICE with templates and fastcall attribute.
22755         * attribs.c (build_type_attribute_qual_variant): Remove assert.
22757 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
22759         * ipa-cp.c (determine_versionability): Fix comment typos.
22761 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
22763         PR c/84229
22764         * ipa-cp.c (determine_versionability): Do not version functions caling
22765         va_arg_pack.
22767 2018-02-21  Martin Liska  <mliska@suse.cz>
22769         PR driver/83193
22770         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22771         Add "native" as a possible value.
22772         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
22773         the macro when native cpu detection is available.
22775 2018-02-21  Martin Liska  <mliska@suse.cz>
22777         PR driver/83193
22778         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22779         Add "native" as a possible value.
22780         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22781         when native cpu detection is available.
22783 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
22784             Martin Sebor  <msebor@redhat.com>
22786         PR tree-optimization/84478
22787         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22788         false.
22789         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22790         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22791         support which is conservatively correct, for 2 only stay conservative
22792         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
22793         argument to the 2 argument get_range_strlen, adjust 6 arg
22794         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22795         false.
22796         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22797         (gimple_fold_builtin_strlen): Pass true as last argument to
22798         get_range_strlen.
22800 2018-02-20  Martin Sebor  <msebor@redhat.com>
22802         PR middle-end/84095
22803         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22804         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
22805         (builtin_memref::builtin_memref): Factor out parts into
22806         set_base_and_offset and call it.
22808 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
22810         PR middle-end/84406
22811         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22812         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22813         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
22814         search at the associated MODE_INT.
22816 2018-02-20  Jeff Law  <law@redhat.com>
22818         PR middle-end/82123
22819         PR tree-optimization/81592
22820         PR middle-end/79257
22821         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22822         for range data rather than using global data.
22823         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22824         range data rather than using global data.
22825         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22826         pass it to children as needed.
22827         (struct directive::fmtresult): Similarly.
22828         (struct directive::set_width): Similarly.
22829         (struct directive::set_precision): Similarly.
22830         (format_integer, format_directive, parse_directive): Similarly.
22831         (format_none): Accept unnamed vr_values parameter.
22832         (format_percent, format_floating, format_character): Similarly.
22833         (format_string, format_plain): Similarly.
22834         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22835         the EVRP range analyzer for range data rather than using global data.
22836         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22837         gimple-ssa-evrp-analyze.h
22838         (class sprintf_dom_walker): Add after_dom_children member function.
22839         Add evrp_range_analyzer member.
22840         (sprintf_dom_walker::before_dom_children): Call into the EVRP
22841         range analyzer as needed.
22842         (sprintf_dom_walker::after_dom_children): New member function.
22843         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22844         if not optimizing.
22845         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22846         (evrp_range_analyzer::pop_to_marker): Likewise.
22848 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
22850         PR tree-optimization/84419
22851         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22852         with the required type if its current type is compatible but
22853         different.
22855 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
22857         PR middle-end/82004
22858         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22859         after vectorization.
22861 2018-02-20  Martin Liska  <mliska@suse.cz>
22863         PR driver/83193
22864         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22865         possible values if we don't have a hint.
22867 2018-02-20  Martin Liska  <mliska@suse.cz>
22869         PR c/84310
22870         PR target/79747
22871         * final.c (shorten_branches): Build align_tab array with one
22872         more element.
22873         * opts.c (finish_options): Add alignment option limit check.
22874         (MAX_CODE_ALIGN): Likewise.
22875         (MAX_CODE_ALIGN_VALUE): Likewise.
22876         * doc/invoke.texi: Document maximum allowed option value for
22877         all -falign-* options.
22879 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
22881         PR target/84146
22882         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22883         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22884         * var-tracking.c (emit_note_insn_var_location): Remove all references
22885         to NOTE_INSN_CALL_ARG_LOCATION.
22886         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22887         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22888         Use copy_rtx_if_shared.
22889         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22890         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22891         (dwarf2out_var_location): Remove handling of
22892         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22893         on call_insn.
22894         * final.c (final_scan_insn): Remove all references to
22895         NOTE_INSN_CALL_ARG_LOCATION.
22896         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
22897         before dumping final insns.
22898         * except.c (emit_note_eh_region_end): Remove all references to
22899         NOTE_INSN_CALL_ARG_LOCATION.
22900         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22901         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22902         * config/arc/arc.c (hwloop_optimize): Likewise.
22903         * config/arm/arm.c (create_fix_barrier): Likewise.
22904         * config/s390/s390.c (s390_chunkify_start): Likewise.
22905         * config/sh/sh.c (find_barrier): Likewise.
22906         * config/i386/i386.c (rest_of_insert_endbranch,
22907         ix86_seh_fixup_eh_fallthru): Likewise.
22908         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22909         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22910         * config/frv/frv.c (frv_function_prologue): Likewise.
22911         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
22912         reg note.
22913         (note_outside_basic_block_p): Remove all references to
22914         NOTE_INSN_CALL_ARG_LOCATION.
22915         * gengtype.c (adjust_field_rtx_def): Likewise.
22916         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22917         Likewise.
22918         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22919         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22921         PR c++/84444
22922         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22923         is ADDR_EXPR.
22925         PR tree-optimization/84452
22926         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22927         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22928         is NULL.
22930 2018-02-19  Martin Liska  <mliska@suse.cz>
22932         PR sanitizer/82183
22933         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22935 2018-02-19  Martin Liska  <mliska@suse.cz>
22936             Richard Sandiford  <richard.sandiford@linaro.org>
22938         PR tree-optimization/82491
22939         * gimple-fold.c (get_base_constructor): Make earlier bail out
22940         to prevent ubsan.
22942 2018-02-19  Carl Love  <cel@us.ibm.com>
22944         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22945         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22946         BU_P8V_OVERLOAD_1.
22947         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22948         P8V_BUILTIN_VEC_NEG.
22950 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
22952         * config/rl78/rl78.md (movdf): New define expand.
22954 2018-02-19  Martin Liska  <mliska@suse.cz>
22956         PR other/80589
22957         * doc/invoke.texi: Fix typo.
22958         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22960 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
22962         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22963         handle rs6000_single_float and rs6000_double_float specially for
22964         e500 family CPUs.
22966 2018-02-16  Jeff Law  <law@redhat.com>
22968         * config/rx/rx.c (add_pop_cfi_notes): New function.;
22969         (pop_regs): Use it.
22971 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
22973         PR ipa/84425
22974         * ipa-inline.c (inline_small_functions): Fix a typo.
22976 2018-02-16  Nathan Sidwell  <nathan@acm.org>
22978         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22980 2018-02-16  Carl Love  <cel@us.ibm.com>
22982         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22983         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22984         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22985         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22986         expansion to P8V_BUILTIN_VEC_FLOAT2.
22988 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
22990         PR rtl-optimization/70023
22991         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22992         src_regno into account.
22994 2018-02-16  Carl Love  <cel@us.ibm.com>
22996         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22997         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22998         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22999         * config/rs6000/rs6000.c: Remove case statements for
23000         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
23001         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
23002         and P9V_BUILTIN_VEC_VINSERT4B.
23003         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
23004         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
23005         * config/rs6000/vsx.md:
23006         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
23007         vec_insert4b.
23009 2018-02-16  Carl Love  <cel@us.ibm.com>
23011         * config/rs6000/altivec.h: Add builtin names vec_extract4b
23012         vec_insert4b.
23013         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
23014         definitions.
23015         * config/rs6000/rs6000-c.c: Add the definitions for
23016         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
23017         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
23018         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
23019         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
23020         definition for insert4b and define insn *insert3b_internal.
23021         * doc/extend.texi: Add documentation for vec_extract4b.
23023 2018-02-16  Nathan Sidwell  <nathan@acm.org>
23025         * doc/extend.texi (Backwards Compatibility): Mention friend
23026         injection.  Note for-scope is deprecated.
23027         * doc/invoke.texi (-ffriend-injection): Deprecate.
23029 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
23031         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
23032         that moved to I2, also allow destinations that are a paradoxical
23033         subreg (instead of a normal reg).
23035 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
23037         PR target/83831
23038         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
23039         to QImode.
23041 2018-02-16  Richard Biener  <rguenther@suse.de>
23043         PR tree-optimization/84037
23044         PR tree-optimization/84016
23045         PR target/82862
23046         * config/i386/i386.c (ix86_builtin_vectorization_cost):
23047         Adjust vec_construct for the fact we need additional higher latency
23048         128bit inserts for AVX256 and AVX512 vector builds.
23049         (ix86_add_stmt_cost): Scale vector construction cost for
23050         elementwise loads.
23052 2018-02-16  Richard Biener  <rguenther@suse.de>
23054         PR tree-optimization/84417
23055         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
23056         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
23057         (non_rewritable_lvalue_p): Likewise, use poly-ints.
23059 2018-02-16  Martin Liska  <mliska@suse.cz>
23061         PR sanitizer/84307
23062         * internal-fn.def (ASAN_CHECK): Set proper flags.
23063         (ASAN_MARK): Likewise.
23065 2018-02-16  Julia Koval  <julia.koval@intel.com>
23067         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
23068         from PTA_CANNONLAKE.
23070 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
23072         PR target/84272
23073         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
23074         Use ++iter rather than iter++ for std::list iterators.
23075         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
23076         defer deleting them until all nodes in the forest are processed.  Do
23077         free even leaf nodes.  Change to_process into auto_vec.
23079         PR bootstrap/84405
23080         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
23081         * vec.h (vec_default_construct): Use memset instead of placement new
23082         if BROKEN_VALUE_INITIALIZATION is defined.
23083         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
23084         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
23085         is defined.
23087         PR rtl-optimization/83723
23088         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
23089         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
23090         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
23091         recursive calls.
23092         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
23093         callers.
23094         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
23096 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
23098         PR rtl-optimization/81443
23099         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
23100         from inner REGs to paradoxical SUBREGs.
23102 2018-02-16  Richard Biener  <rguenther@suse.de>
23104         PR tree-optimization/84399
23105         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23106         For operands we can analyze at their definition make sure we can
23107         analyze them at each use as well.
23109 2018-02-16  Richard Biener  <rguenther@suse.de>
23111         PR tree-optimization/84190
23112         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
23113         volatile accesses if the decl isn't volatile.
23115 2018-02-15  Jason Merrill  <jason@redhat.com>
23117         PR c++/84314 - ICE with templates and fastcall attribute.
23118         * attribs.c (build_type_attribute_qual_variant): Don't clobber
23119         TYPE_CANONICAL on an existing type.
23121 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
23123         PR tree-optimization/84383
23124         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
23125         dstoff nor call operand_equal_p if dstbase is NULL.
23127         PR tree-optimization/84334
23128         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
23129         also a CONSTANT_CLASS_P, punt.
23131 2018-02-14  Jim Wilson  <jimw@sifive.com>
23133         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
23134         first SMALL_OPERAND check.  New local min_second_step.  Move assert
23135         to where locals are set.  Add TARGET_RVC support.
23136         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
23138 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
23140         * doc/invoke.texi: Correct -Wformat-overflow code sample.
23142 2018-02-14  Martin Sebor  <msebor@redhat.com>
23144         PR tree-optimization/83698
23145         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
23146         arrays constrain the offset range to their bounds.
23147         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
23148         (builtin_access::overlap): Avoid setting the size of overlap if it's
23149         already been set.
23150         (maybe_diag_overlap): Also consider arrays when deciding what values
23151         of offsets to include in diagnostics.
23153 2018-02-14  Martin Sebor  <msebor@redhat.com>
23155         PR c/84108
23156         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
23157         that correspond to the kind of a declaration.
23159 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
23161         PR target/83984
23162         * config/pa/pa.md: Load address of PIC label using the linkage table
23163         if the label is nonlocal.
23165 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23167         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
23168         warning message if user requests -maltivec=be.
23169         * doc/invoke.texi: Document deprecation of -maltivec=be.
23171 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
23173         PR target/84220
23174         * config/rs6000/rs6000-c.c: Update definitions for
23175         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
23176         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
23178 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
23180         PR target/84239
23181         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
23182         add _get_ssp intrinsics. Remove argument from
23183         __builtin_ia32_rdssp[d|q].
23184         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
23185         * config/i386/i386-builtin.def: Remove argument from
23186         __builtin_ia32_rdssp[d|q].
23187         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
23188         ix86_expand_special_args_builtin for _rdssp[d|q].
23189         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
23190         Clear register before usage.
23191         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
23192         Add documentation for new _get_ssp and _inc_ssp intrinsics.
23194 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
23196         PR tree-optimization/84357
23197         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
23198         operand 1 of an ARRAY_REF too.
23200 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
23202         PR target/83831
23203         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
23204         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23205         declarations.
23206         (set_of_reg): New struct.
23207         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
23208         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
23209         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23210         functions.
23211         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
23212         Split into bitclr, bitset, bitinvert patterns if appropriate.
23213         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
23214         use rx_fuse_in_memory_bitop.
23215         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
23216         to named insn, correct maximum insn length.
23218 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
23220         PR target/79242
23221         * machmode.def: Define a complex mode for PARTIAL_INT.
23222         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
23223         MODE_PARTIAL_INT.
23224         * doc/rtl.texi: Document CSPImode.
23225         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
23226         handling.
23227         (msp430_hard_regno_nregs_with_padding): Likewise.
23229 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
23231         PR target/84279
23232         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
23234 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
23236         PR rtl-optimization/84169
23237         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
23238         we generated a parallel as new i3 and we split that to new i2 and i3
23239         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
23240         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
23241         those to i2, not i1.  Partially rewrite this scan code.
23243 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
23245         PR c/82210
23246         * stor-layout.c (place_field): For variable length fields, adjust
23247         offset_align afterwards not just based on the field's alignment,
23248         but also on the size.
23250         PR middle-end/84309
23251         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
23252         of exps and logs in the use_exp2 case.
23254 2018-02-13  Jeff Law  <law@redhat.com>
23256         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
23257         entry for "vector".
23259         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
23260         ARGS as unused.
23262 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
23264         PR debug/84342
23265         PR debug/84319
23266         * common.opt (gas-loc-support, gas-locview-support): New.
23267         (ginline-points, ginternal-reset-location-views): New.
23268         * doc/invoke.texi: Document them.  Use @itemx where intended.
23269         (gvariable-location-views): Adjust.
23270         * target.def (reset_location_view): New.
23271         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
23272         (TARGET_RESET_LOCATION_VIEW): New.
23273         * doc/tm.texi: Rebuilt.
23274         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
23275         (dwarf2out_default_as_locview_support): New.
23276         (output_asm_line_debug_info): Use option variables.
23277         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
23278         (output_loc_list): Likewise.
23279         (add_high_low_attributes): Check option variables.
23280         Don't output entry view attribute in strict mode.
23281         (gen_inlined_subroutine_die): Check option variables.
23282         (dwarf2out_inline_entry): Likewise.
23283         (init_sections_and_labels): Likewise.
23284         (dwarf2out_early_finish): Likewise.
23285         (maybe_reset_location_view): New, from...
23286         (dwarf2out_var_location): ... here.  Call it.
23287         * debug.h (dwarf2out_default_as_loc_support): Declare.
23288         (dwarf2out_default_as_locview_support): Declare.
23289         * hooks.c (hook_int_rtx_insn_0): New.
23290         * hooks.h (hook_int_rtx_insn_0): Declare.
23291         * toplev.c (process_options): Take -gas-loc-support and
23292         -gas-locview-support from dwarf2out.  Enable
23293         -gvariable-location-views by default only with locview
23294         assembler support.  Enable -ginternal-reset-location-views by
23295         default only if the target defines the corresponding hook.
23296         Enable -ginline-points by default if location views are
23297         enabled; force it disabled if statement frontiers are
23298         disabled.
23299         * tree-inline.c (expand_call_inline): Check option variables.
23300         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23302 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
23304         PR tree-optimization/84321
23305         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23306         handling.  Also check whether the anti-range contains any values
23307         that satisfy the mask; switch to a VR_RANGE if not.
23309 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
23311         PR sanitizer/84340
23312         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23314 2018-02-13  Martin Jambor  <mjambor@suse.cz>
23316         PR c++/83990
23317         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23318         of call statements, also set location of a load to a temporary.
23320 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
23322         * config/rl78/rl78.c (add_vector_labels): New function.
23323         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23324         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23325         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23326         which checks that no arguments are passed.
23327         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23328         * doc/extend.texi: Documentation for the new attribute.
23330 2018-02-13  Andreas Schwab  <schwab@suse.de>
23332         * config/riscv/linux.h (CPP_SPEC): Define.
23334 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
23336         PR target/84335
23337         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23338         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23339         OPTION_MASK_ISA_AES as first argument to def_builtin_const
23340         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23341         instead of OPTION_MASK_ISA_PCLMUL as first argument to
23342         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23343         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23344         temporarily for AES and PCLMUL builtins.
23346         PR tree-optimization/84339
23347         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23348         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23349         Formatting fixes.
23351         PR middle-end/84309
23352         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23353         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23354         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23355         inline function.
23356         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23357         inline function.
23358         * omp-simd-clone.h: New file.
23359         * omp-simd-clone.c: Include omp-simd-clone.h.
23360         (expand_simd_clones): No longer static.
23361         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23362         cgraph.h and omp-simd-clone.h.
23363         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23364         (vect_recog_widen_shift_pattern): Formatting fix.
23365         (vect_pattern_recog_1): Don't check optab for calls.
23367         PR target/84336
23368         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23369         operands[2] into a REG before using gen_lowpart on it.
23371 2018-02-12  Jeff Law  <law@redhat.com>
23373         PR target/83760
23374         * config/sh/sh.c (find_barrier): Consider a sibling call
23375         a barrier as well.
23377         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23378         successfully back substituting a reg.
23380 2018-02-12  Richard Biener  <rguenther@suse.de>
23382         PR tree-optimization/84037
23383         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23384         parameter, move visited init to caller.
23385         (vect_slp_analyze_operations): Separate cost from validity
23386         check, initialize visited once for all instances.
23387         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23388         for all instances.
23389         * tree-vect-stmts.c (vect_model_simple_cost): Make early
23390         out an assert.
23391         (vect_model_promotion_demotion_cost): Likewise.
23392         (vectorizable_bswap): Guard cost modeling with !slp_node
23393         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23394         SLP stmts.
23395         (vectorizable_call): Likewise.
23396         (vectorizable_conversion): Likewise.
23397         (vectorizable_assignment): Likewise.
23398         (vectorizable_shift): Likewise.
23399         (vectorizable_operation): Likewise.
23400         (vectorizable_store): Likewise.
23401         (vectorizable_load): Likewise.
23402         (vectorizable_condition): Likewise.
23403         (vectorizable_comparison): Likewise.
23405 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
23407         PR sanitizer/84307
23408         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23409         (ASAN_MARK): Fix fnspec to account for return value, change pointer
23410         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23412 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
23414         PR middle-end/83665
23415         * params.def (inline-min-speedup): Increase from 8 to 15.
23416         (max-inline-insns-auto): Decrease from 40 to 30.
23417         * ipa-split.c (consider_split): Add some buffer for function to
23418         be considered inlining candidate.
23419         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23420         default values.
23422 2018-02-12  Richard Biener  <rguenther@suse.de>
23424         PR tree-optimization/84037
23425         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23426         matched stmts if we cannot swap the non-matched ones.
23428 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
23430         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23431         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23432         _mm_maskz_scalef_round_ss): New intrinsics.
23433         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23434         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23435         __builtin_ia32_scalefss_round): Remove.
23436         (__builtin_ia32_scalefsd_mask_round,
23437         __builtin_ia32_scalefss_mask_round): New intrinsics.
23438         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23439         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23440         ((match_operand:VF_128 2 "<round_nimm_predicate>"
23441         "<round_constraint>")): Changed to ...
23442         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23443         "<round_scalar_constraint>")): ... this.
23444         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23445         %0, %1, %2<round_op3>}"): Changed to ...
23446         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23447         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23448         %2<round_scalar_mask_op3>}"): ... this.
23449         * config/i386/subst.md (round_scalar_nimm_predicate): New.
23451 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
23453         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23454         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23455         (_mm_maskz_sqrt_round_ss): New intrinsics.
23456         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23457         (__builtin_ia32_sqrtsd_mask_round)
23458         (__builtin_ia32_sqrtss_mask_round): New builtins.
23459         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23460         (__builtin_ia32_sqrtss_round): Remove.
23461         (__builtin_ia32_sqrtsd_mask_round)
23462         (__builtin_ia32_sqrtss_mask_round): New builtins.
23463         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23464         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23465         ((match_operand:VF_128 1 "vector_operand"
23466         "xBm,<round_constraint>")): Changed to ...
23467         ((match_operand:VF_128 1 "vector_operand"
23468         "xBm,<round_scalar_constraint>")): ... this.
23469         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23470         %0, %2, %<iptr>1<round_op3>}): Changed to ...
23471         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23472         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23473         %<iptr>1<round_scalar_mask_op3>}): ... this.
23474         ((set_attr "prefix" "<round_prefix>")): Changed to ...
23475         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23477 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
23479         PR target/84266
23480         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23481         Cast vec_cmpeq result to correct type.
23482         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23483         Cast vec_cmpgt result to correct type.
23485 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
23487         * final.c (final_scan_insn_1): Renamed from...
23488         (final_scan_insn): ... this.  New wrapper, to recover
23489         seen from the outermost call in recursive ones.
23490         * config/sparc/sparc.c (output_return): Drop seen from call.
23491         (output_sibcall): Likewise.
23492         * config/visium/visium.c (output_branch): Likewise.
23494 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
23496         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23497         function label.
23499 2018-02-10  Alan Modra  <amodra@gmail.com>
23501         PR target/84300
23502         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23503         Specify LR as an input.
23505 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
23507         PR sanitizer/83987
23508         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23509         remove_member_access_dummy_vars): New functions.
23510         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23511         lower_omp_1, execute_lower_omp): Use them.
23513         PR rtl-optimization/84308
23514         * shrink-wrap.c (spread_components): Release todo vector.
23516 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
23518         PR rtl-optimization/57193
23519         * ira-color.c (struct allocno_color_data): Add member
23520         conflict_allocno_hard_prefs.
23521         (update_conflict_allocno_hard_prefs): New.
23522         (bucket_allocno_compare_func): Add a preference based on
23523         conflict_allocno_hard_prefs.
23524         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23525         (color_allocnos): Remove a dead code.  Initiate
23526         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
23528 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
23530         PR target/84226
23531         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23532         constraint from =wa to wa.  Avoid a subreg on the output operand,
23533         instead use a pseudo and subreg it in a move.
23534         (p9_xxbrd_<mode>): Changed to ...
23535         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23536         (p9_xxbrd_v2df): New expander.
23537         (p9_xxbrw_<mode>): Changed to ...
23538         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23539         (p9_xxbrw_v4sf): New expander.
23541 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
23543         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23545 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
23547         PR target/83926
23548         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23549         multiply in 32-bit mode.
23550         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23551         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23552         mode.
23554 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
23556         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23557         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23558         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23559         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23561 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
23563         PR lto/84213
23564         * dwarf2out.c (is_trivial_indirect_ref): New function.
23565         (dwarf2out_late_global_decl): Do not generate a location
23566         attribute for variables that have a non-trivial DECL_VALUE_EXPR
23567         and that are not defined in the current unit.
23569 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
23571         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23572         instead of a libcall for UNORDERED.
23574 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
23576         PR target/82641
23577         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23578         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23580 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23582         PR target/PR84295
23583         * config/s390/s390.c (s390_set_current_function): Invoke
23584         s390_indirect_branch_settings also if fndecl didn't change.
23586 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
23588         * config/rs6000/rs6000.md (blockage): Set length to zero.
23590 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
23592         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23594 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
23596         PR sanitizer/84285
23597         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23598         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23599         -static-lib*san.
23601         PR debug/84252
23602         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23603         PARALLEL incoming that failed vt_get_decl_and_offset check.
23605         PR middle-end/84237
23606         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23607         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23608         TREE_READONLY bit.
23609         (get_variable_section): For decls in named .bss* sections pass true as
23610         second argument to bss_initializer_p.
23612 2018-02-09  Marek Polacek  <polacek@redhat.com>
23613             Jakub Jelinek  <jakub@redhat.com>
23615         PR c++/83659
23616         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23617         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
23618         Sync some changes from cxx_fold_indirect_ref.
23620 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
23622         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23623         markers.
23624         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23625         (BLOCK_INLINE_ENTRY_LABEL): New.
23626         (dwarf2out_var_location): Disregard inline entry markers.
23627         (inline_entry_data): New struct.
23628         (inline_entry_data_hasher): New hashtable type.
23629         (inline_entry_data_hasher::hash): New.
23630         (inline_entry_data_hasher::equal): New.
23631         (inline_entry_data_table): New variable.
23632         (add_high_low_attributes): Add DW_AT_entry_pc and
23633         DW_AT_GNU_entry_view attributes if a pending entry is found
23634         in inline_entry_data_table.  Add old entry_pc attribute only
23635         if debug nonbinding markers are disabled.
23636         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23637         markers are enabled.
23638         (block_within_block_p, dwarf2out_inline_entry): New.
23639         (dwarf2out_finish): Check that no entries remained in
23640         inline_entry_data_table.
23641         * final.c (reemit_insn_block_notes): Handle inline entry notes.
23642         (final_scan_insn, notice_source_line): Likewise.
23643         (rest_of_clean_state): Skip inline entry markers.
23644         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23645         markers.
23646         * gimple.c (gimple_build_debug_inline_entry): New.
23647         * gimple.h (enum gimple_debug_subcode): Add
23648         GIMPLE_DEBUG_INLINE_ENTRY.
23649         (gimple_build_debug_inline_entry): Declare.
23650         (gimple_debug_inline_entry_p): New.
23651         (gimple_debug_nonbind_marker_p): Adjust.
23652         * insn-notes.def (INLINE_ENTRY): New.
23653         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23654         inline entry marker notes.
23655         (print_insn): Likewise.
23656         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23657         (INSN_DEBUG_MARKER_KIND): Likewise.
23658         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23659         * tree-inline.c (expand_call_inline): Build and insert
23660         debug_inline_entry stmt.
23661         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23662         inline entry blocks early, if nonbind markers are enabled.
23663         (dump_scope_block): Dump fragment info.
23664         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23665         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23666         (gimple_build_debug_inline_entry): New.
23667         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23668         Enable/disable inline entry points too.
23669         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23670         (DEBUG_INSN): Describe inline entry markers.
23672         * common.opt (gvariable-location-views): New.
23673         (gvariable-location-views=incompat5): New.
23674         * config.in: Rebuilt.
23675         * configure: Rebuilt.
23676         * configure.ac: Test assembler for view support.
23677         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23678         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23679         * dwarf2out.c (var_loc_view): New typedef.
23680         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23681         (dwarf2out_locviews_in_attribute): New.
23682         (dwarf2out_locviews_in_loclist): New.
23683         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23684         (enum dw_line_info_opcode): Add LI_adv_address.
23685         (struct dw_line_info_table): Add view.
23686         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23687         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23688         (zero_view_p): New variable.
23689         (ZERO_VIEW_P): New macro.
23690         (output_asm_line_debug_info): New.
23691         (struct var_loc_node): Add view.
23692         (add_AT_view_list, AT_loc_list): New.
23693         (add_var_loc_to_decl): Add view param.  Test it against last.
23694         (new_loc_list): Add view params.  Record them.
23695         (AT_loc_list_ptr): Handle loc and view lists.
23696         (view_list_to_loc_list_val_node): New.
23697         (print_dw_val): Handle dw_val_class_view_list.
23698         (size_of_die): Likewise.
23699         (value_format): Likewise.
23700         (loc_list_has_views): New.
23701         (gen_llsym): Set vl_symbol too.
23702         (maybe_gen_llsym, skip_loc_list_entry): New.
23703         (dwarf2out_maybe_output_loclist_view_pair): New.
23704         (output_loc_list): Output view list or entries too.
23705         (output_view_list_offset): New.
23706         (output_die): Handle dw_val_class_view_list.
23707         (output_dwarf_version): New.
23708         (output_compilation_unit_header): Use it.
23709         (output_skeleton_debug_sections): Likewise.
23710         (output_rnglists, output_line_info): Likewise.
23711         (output_pubnames, output_aranges): Update version comments.
23712         (output_one_line_info_table): Output view numbers in asm comments.
23713         (dw_loc_list): Determine current endview, pass it to new_loc_list.
23714         Call maybe_gen_llsym.
23715         (loc_list_from_tree_1): Adjust.
23716         (add_AT_location_description): Create view list attribute if
23717         needed, check it's absent otherwise.
23718         (convert_cfa_to_fb_loc_list): Adjust.
23719         (maybe_emit_file): Call output_asm_line_debug_info for test.
23720         (dwarf2out_var_location): Reset views as needed.  Precompute
23721         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
23722         attribute.  Set view.
23723         (new_line_info_table): Reset next view.
23724         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23725         (dwarf2out_source_line): Likewise.  Output view resets and labels to
23726         the assembler, or select appropriate line info opcodes.
23727         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23728         (optimize_string_length): Catch it.  Adjust.
23729         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
23730         dw_val_class_view_list, and remove it if no longer needed.
23731         (hash_loc_list): Hash view numbers.
23732         (loc_list_hasher::equal): Compare them.
23733         (optimize_location_lists): Check whether a view list symbol is
23734         needed, and whether the locview attribute is present, and
23735         whether they match.  Remove the locview attribute if no longer
23736         needed.
23737         (index_location_lists): Call skip_loc_list_entry for test.
23738         (dwarf2out_finish): Call output_asm_line_debug_info for test.
23739         Use output_dwarf_version.
23740         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23741         (struct dw_val_node): Add val_view_list.
23742         * final.c (SEEN_NEXT_VIEW): New.
23743         (set_next_view_needed): New.
23744         (clear_next_view_needed): New.
23745         (maybe_output_next_view): New.
23746         (final_start_function): Rename to...
23747         (final_start_function_1): ... this.  Take pointer to FIRST,
23748         add SEEN parameter.  Emit param bindings in the initial view.
23749         (final_start_function): Reintroduce SEEN-less interface.
23750         (final): Rename to...
23751         (final_1): ... this.  Take SEEN parameter.  Output final pending
23752         next view at the end.
23753         (final): Reintroduce seen-less interface.
23754         (final_scan_insn): Output pending next view before switching
23755         sections or ending a block.  Mark the next view as needed when
23756         outputting variable locations.  Notify debug backend of section
23757         changes, and of location view changes.
23758         (rest_of_handle_final): Adjust.
23759         * toplev.c (process_options): Autodetect value for debug variable
23760         location views option.  Warn on incompat5 without -gdwarf-5.
23761         * doc/invoke.texi (gvariable-location-views): New.
23762         (gvariable-location-views=incompat5): New.
23763         (gno-variable-location-views): New.
23765 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
23767         PR tree-optimization/84136
23768         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23769         that the result of find_edge is non-NULL.
23771 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
23773         PR target/83008
23774         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23775         storing integer register in SImode.  Fix cost of 256 and 512
23776         byte aligned SSE register store.
23778 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
23780         * config/i386/i386.c (ix86_multiplication_cost): Fix
23781         multiplication cost for TARGET_AVX512DQ.
23783 2018-02-08  Marek Polacek  <polacek@redhat.com>
23785         PR tree-optimization/84238
23786         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23787         get_range_strlen.
23789 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23791         PR tree-optimization/84265
23792         * tree-vect-stmts.c (vectorizable_store): Don't treat
23793         VMAT_CONTIGUOUS accesses as grouped.
23794         (vectorizable_load): Likewise.
23796 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23798         PR tree-optimization/81635
23799         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23800         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23801         (test_round_for_mask): New functions.
23802         (wide_int_cc_tests): Call test_round_for_mask.
23803         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23804         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23805         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23806         range returned by get_range_info.
23808 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
23810         PR ipa/81360
23811         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23812         * symtab.c: Include builtins.h
23813         (symtab_node::output_to_lto_symbol_table_p): Move here
23814         from lto-streamer-out.c:output_symbol_p.
23815         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23816         (output_symbol_p): Move all logic to symtab.c
23817         (produce_symtab): Update.
23819 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23821         * config/s390/s390-opts.h (enum indirect_branch): Define.
23822         * config/s390/s390-protos.h (s390_return_addr_from_memory)
23823         (s390_indirect_branch_via_thunk)
23824         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23825         (enum s390_indirect_branch_type): Define.
23826         * config/s390/s390.c (struct s390_frame_layout, struct
23827         machine_function): Remove.
23828         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23829         (indirect_branch_table_label_no, indirect_branch_table_name):
23830         Define variables.
23831         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23832         (enum s390_indirect_branch_option): Define.
23833         (s390_return_addr_from_memory): New function.
23834         (s390_handle_string_attribute): New function.
23835         (s390_attribute_table): Add new attribute handler.
23836         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23837         (s390_indirect_branch_via_thunk): New function.
23838         (s390_indirect_branch_via_inline_thunk): New function.
23839         (s390_function_ok_for_sibcall): When jumping via thunk disallow
23840         sibling call optimization for non z10 compiles.
23841         (s390_emit_call): Force indirect branch target to be a single
23842         register.  Add r1 clobber for non-z10 compiles.
23843         (s390_emit_epilogue): Emit return jump via return_use expander.
23844         (s390_reorg): Handle JUMP_INSNs as execute targets.
23845         (s390_option_override_internal): Perform validity checks for the
23846         new command line options.
23847         (s390_indirect_branch_attrvalue): New function.
23848         (s390_indirect_branch_settings): New function.
23849         (s390_set_current_function): Invoke s390_indirect_branch_settings.
23850         (s390_output_indirect_thunk_function):  New function.
23851         (s390_code_end): Implement target hook.
23852         (s390_case_values_threshold): Implement target hook.
23853         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23854         macros.
23855         * config/s390/s390.h (struct s390_frame_layout)
23856         (struct machine_function): Move here from s390.c.
23857         (TARGET_INDIRECT_BRANCH_NOBP_RET)
23858         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23859         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23860         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23861         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23862         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23863         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23864         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23865         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23866         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23867         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23868         (mnemonic attribute): Add values which aren't recognized
23869         automatically.
23870         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23871         pattern for branch conversion.  Fix mnemonic attribute.
23872         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23873         indirect branch via thunk if requested.
23874         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23875         ("*indirect_jump"): Disable for branch conversion using out of
23876         line thunks.
23877         ("indirect_jump_via_thunk<mode>_z10")
23878         ("indirect_jump_via_thunk<mode>")
23879         ("indirect_jump_via_inlinethunk<mode>_z10")
23880         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23881         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23882         ("casesi_jump_via_inlinethunk<mode>_z10")
23883         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23884         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23885         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23886         ("*indirect2_jump"): Disable for branch conversion.
23887         ("casesi_jump"): Turn into expander and expand patterns for branch
23888         conversion.
23889         ("return_use"): New expander.
23890         ("*return"): Emit return via thunk and rename it to ...
23891         ("*return<mode>"): ... this one.
23892         * config/s390/s390.opt: Add new options and and enum for the
23893         option values.
23895 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23897         * lra-constraints.c (match_reload): Unconditionally use
23898         gen_lowpart_SUBREG, rather than selecting between that
23899         and equivalent gen_rtx_SUBREG code.
23901 2018-02-08  Richard Biener  <rguenther@suse.de>
23903         PR tree-optimization/84233
23904         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23905         changed flag instead of boguously re-using phi_inserted.
23907 2018-02-08  Martin Jambor  <mjambor@suse.cz>
23909         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23910         static local variables.
23912 2018-02-08  Richard Biener  <rguenther@suse.de>
23914         PR tree-optimization/84278
23915         * tree-vect-stmts.c (vectorizable_store): When looking for
23916         smaller vector types to perform grouped strided loads/stores
23917         make sure the mode is supported by the target.
23918         (vectorizable_load): Likewise.
23920 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
23922         * config/aarch64/aarch64.c (aarch64_components_for_bb):
23923         Increase LDP/STP opportunities by adding adjacent callee-saves.
23925 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
23927         PR rtl-optimization/84068
23928         PR rtl-optimization/83459
23929         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23931 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
23933         PR tree-optimization/84224
23934         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23935         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23936         non-zero arguments.
23938 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
23940         PR target/84113
23941         * config/rs6000/altivec.md (*restore_world): Remove LR use.
23942         * config/rs6000/predicates.md (restore_world_operation): Adjust op
23943         count, remove one USE.
23945 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
23947         * doc/install.texi (Configuration): Document the
23948         --with-long-double-format={ibm,ieee} PowerPC configuration
23949         options.
23951         PR target/84154
23952         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23953         Convert from define_expand to be define_insn_and_split.  Rework
23954         float/double/_Float128 conversions to QI/HI/SImode to work with
23955         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
23956         conversions to QI/HImode types did a store and then a load to
23957         truncate the value.  For conversions to VSX registers, don't split
23958         the insn, instead emit the code directly.  Use the code iterator
23959         any_fix to combine signed and unsigned conversions.
23960         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23961         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23962         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23963         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23964         (fix_<mode>di2_hw): Likewise.
23965         (fixuns_<mode>di2_hw): Likewise.
23966         (fix_<mode>si2_hw): Likewise.
23967         (fixuns_<mode>si2_hw): Likewise.
23968         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23969         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23970         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23971         fix<uns>_trunc<SFDF:mode>si2_p8.
23972         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23973         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23974         (fix<uns>_<mode>_mem): Likewise.
23975         (fctiw<u>z_<mode>_mem): Likewise.
23976         (fix<uns>_<mode>_mem): Likewise.
23977         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23978         the register allocator from doing a direct move to the GPRs to do
23979         a store, and instead use the ISA 3.0 store byte/half-word from
23980         vector register instruction.  For IEEE 128-bit floating point,
23981         also optimize stores of 32-bit ints.
23982         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23984 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
23986         * genextract.c (push_pathstr_operand): New function to support
23987         [a-zA-Z].
23988         (walk_rtx): Call push_pathstr_operand.
23989         (print_path): Support [a-zA-Z].
23991 2018-02-07  Richard Biener  <rguenther@suse.de>
23993         PR tree-optimization/84037
23994         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23995         (cse_and_gimplify_to_preheader): Declare.
23996         (vect_get_place_in_interleaving_chain): Likewise.
23997         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23998         ivexpr_map.
23999         (_loop_vec_info::~_loop_vec_info): Delete it.
24000         (cse_and_gimplify_to_preheader): New function.
24001         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
24002         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
24003         (vectorizable_load): Likewise.  For grouped stores always base
24004         the IV on the first element.
24005         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
24006         condition before gimplifying.
24008 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
24010         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
24011         *DIV_EXPR and *MOD_EXPR.
24013 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
24015         PR target/84248
24016         * config/i386/i386.c (ix86_option_override_internal): Mask out
24017         the CF_SET bit when checking -fcf-protection.
24019 2018-02-07  Tom de Vries  <tom@codesourcery.com>
24021         PR libgomp/84217
24022         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
24023         enough.
24025 2018-02-07  Richard Biener  <rguenther@suse.de>
24027         PR tree-optimization/84204
24028         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
24029         this place.
24031         PR tree-optimization/84205
24032         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
24033         special-case isl_ast_op_zdiv_r.
24035         PR tree-optimization/84223
24036         * graphite-scop-detection.c (gather_bbs::before_dom_children):
24037         Only add conditions from within the region.
24038         (gather_bbs::after_dom_children): Adjust.
24040 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
24042         PR target/84209
24043         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
24044         * config/avr/avr.md: Only post-reload split REG-REG moves if
24045         either register is GENERAL_REG_P.
24047 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
24049         PR tree-optimization/84235
24050         * tree-ssa-scopedtables.c
24051         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
24052         if the subtraction is performed in floating point type where NaNs are
24053         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
24054         build 1.  Formatting fix.
24056 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
24058         PR target/84146
24059         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
24060         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
24061         and skip it regardless of bb boundaries.  Use CALL_P macro,
24062         don't test INSN_P (insn) together with CALL_P or JUMP_P check
24063         unnecessarily, formatting fix.
24065 2018-02-06  Michael Collison  <michael.collison@arm.com>
24067         * config/arm/thumb2.md:
24068         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
24069         (*thumb_mov_notscc): Ditto.
24071 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
24073         PR target/84154
24074         * config/rs6000/rs6000.md (su code attribute): Use "u" for
24075         unsigned_fix, not "s".
24077 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24079         * configure.ac (gcc_fn_eh_frame_ro): New function.
24080         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
24081         correct .eh_frame permissions.
24082         * configure: Regenerate.
24084 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
24086         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
24087         irrelevant options.
24089 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24091         * config/rs6000/rs6000.c (rs6000_option_override_internal):
24092         Display warning message for -mno-speculate-indirect-jumps.
24094 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
24096         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
24097         Undocumented.
24098         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
24100 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
24102         PR tree-optimization/84225
24103         * tree-eh.c (find_trapping_overflow): Only call
24104         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
24106 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
24108         PR target/84145
24109         * config/i386/i386.c: Reimplement the check of possible options
24110         -mibt/-mshstk conbination. Change error messages.
24111         * doc/invoke.texi: Fix a typo: remove extra '='.
24113 2018-02-06  Marek Polacek  <polacek@redhat.com>
24115         PR tree-optimization/84228
24116         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
24118 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
24120         PR target/82641
24121         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
24122         emitted arch directives.
24123         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
24124         __ARM_FEATURE_COPROC before changing architectures.
24126 2018-02-06  Richard Biener  <rguenther@suse.de>
24128         * config/i386/i386.c (print_reg): Fix typo.
24129         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
24131 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
24133         * configure: Regenerate.
24135 2018-02-05  Martin Sebor  <msebor@redhat.com>
24137         PR tree-optimization/83369
24138         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
24139         inlining context.
24141 2018-02-05  Martin Liska  <mliska@suse.cz>
24143         * doc/invoke.texi: Cherry-pick upstream r323995.
24145 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
24147         * ira.c (ira_init_register_move_cost): Adjust comment.
24149 2018-02-05  Martin Liska  <mliska@suse.cz>
24151         PR gcov-profile/84137
24152         * doc/gcov.texi: Fix typo in documentation.
24154 2018-02-05  Martin Liska  <mliska@suse.cz>
24156         PR gcov-profile/83879
24157         * doc/gcov.texi: Document necessity of --dynamic-list-data when
24158         using dlopen functionality.
24160 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
24162         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
24163         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
24164         _mm_maskz_range_ss, _mm_mask_range_round_ss,
24165         _mm_maskz_range_round_ss): New intrinsics.
24166         (__builtin_ia32_rangesd128_round)
24167         (__builtin_ia32_rangess128_round): Remove.
24168         (__builtin_ia32_rangesd128_mask_round,
24169         __builtin_ia32_rangess128_mask_round): New builtins.
24170         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
24171         __builtin_ia32_rangess128_round): Remove.
24172         (__builtin_ia32_rangesd128_mask_round,
24173         __builtin_ia32_rangess128_mask_round): New builtins.
24174         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
24175         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
24176         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
24177         "<round_saeonly_constraint>")): Changed to ...
24178         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
24179         "<round_saeonly_scalar_constraint>")): ... this.
24180         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
24181         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
24182         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
24183         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
24184         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
24186 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
24188         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
24189         options.
24190         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
24191         Remove all values except native, 8540 and 8548.
24193 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
24195         * config/i386/i386.c (ix86_output_function_return): Pass
24196         INVALID_REGNUM, instead of -1, as invalid register number to
24197         indirect_thunk_name and output_indirect_thunk.
24199 2018-02-02  Julia Koval  <julia.koval@intel.com>
24201         * config.gcc: Add -march=icelake.
24202         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
24203         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
24204         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
24205         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
24206         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
24207         (processor_target_table): Add icelake.
24208         (ix86_option_override_internal): Handle new PTAs.
24209         (get_builtin_code_for_version): Handle icelake.
24210         (M_INTEL_COREI7_ICELAKE): New.
24211         (fold_builtin_cpu): Handle icelake.
24212         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
24213         * doc/invoke.texi: Add -march=icelake.
24215 2018-02-02  Julia Koval  <julia.koval@intel.com>
24217         * config/i386/i386.c (ix86_option_override_internal): Change flags type
24218         to wide_int_bitmask.
24219         * wide-int-bitmask.h: New.
24221 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
24223         PR target/84066
24224         * config/i386/i386.md: Replace Pmode with word_mode in
24225         builtin_setjmp_setup and builtin_longjmp to support x32.
24227 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
24229         PR target/56010
24230         PR target/83743
24231         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
24232         #include "opts.h".
24233         (rs6000_supported_cpu_names): New static variable.
24234         (linux_cpu_translation_table): Likewise.
24235         (elf_platform) <cpu>: Define new static variable and use it.
24236         Translate kernel AT_PLATFORM name to canonical name if needed.
24237         Error if platform name is unknown.
24239 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
24241         PR target/84089
24242         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
24244 2018-02-01  Jeff Law  <law@redhat.com>
24246         PR target/84128
24247         * config/i386/i386.c (release_scratch_register_on_entry): Add new
24248         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
24249         the scratch if RELEASE_VIA_POP is false.
24250         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
24251         If we have to save a temporary register, decrement SIZE appropriately.
24252         Pass new arguments to release_scratch_register_on_entry.
24253         (ix86_adjust_stack_and_probe): Likewise.
24254         (ix86_emit_probe_stack_range): Pass new arguments to
24255         release_scratch_register_on_entry.
24257 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
24259         PR rtl-optimization/84157
24260         * combine.c (change_zero_ext): Use REG_P predicate in
24261         front of HARD_REGISTER_P predicate.
24263 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
24265         * config/avr/avr.c (avr_option_override): Move disabling of
24266         -fdelete-null-pointer-checks to...
24267         * common/config/avr/avr-common.c (avr_option_optimization_table):
24268         ...here.
24270 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24272         PR tree-optimization/81635
24273         * tree-data-ref.c (split_constant_offset_1): For types that
24274         wrap on overflow, try to use range info to prove that wrapping
24275         cannot occur.
24277 2018-02-01  Renlin Li  <renlin.li@arm.com>
24279         PR target/83370
24280         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
24281         TAILCALL_ADDR_REGS.
24282         (aarch64_register_move_cost): Likewise.
24283         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24284         TAILCALL_ADDR_REGS.
24285         (REG_CLASS_NAMES): Likewise.
24286         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24287         TAILCALL_ADDR_REGS. Remove IP registers.
24288         * config/aarch64/aarch64.md (Ucs): Update register constraint.
24290 2018-02-01  Richard Biener  <rguenther@suse.de>
24292         * domwalk.h (dom_walker::dom_walker): Add additional constructor
24293         for specifying RPO order and allow NULL for that.
24294         * domwalk.c (dom_walker::dom_walker): Likewise.
24295         (dom_walker::walk): Handle NULL RPO order.
24296         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24297         in RPO order.
24298         (rewrite_update_dom_walker): Likewise.
24299         (mark_def_dom_walker): Likewise.
24301 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24303         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24304         (aarch64_maybe_expand_sve_subreg_move): Declare.
24305         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24306         * config/aarch64/predicates.md (aarch64_any_register_operand): New
24307         predicate.
24308         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24309         that are semantically a reverse operation.
24310         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24311         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24312         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24313         functions.
24314         (aarch64_can_change_mode_class): For big-endian, forbid changes
24315         between two SVE modes if they have different element sizes.
24317 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24319         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24320         the TImode handling for big-endian targets.
24322 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24324         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24325         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
24326         not just bytes.
24327         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24328         Remove BSWAP handing for big-endian targets and use the form of
24329         LD1RQ appropariate for the mode.
24331 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24333         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24334         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24335         duplicated element.
24337 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24339         PR tearget/83845
24340         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24341         check for operands that need to go through aarch64_sve_reload_be.
24343 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
24345         PR tree-optimization/81661
24346         PR tree-optimization/84117
24347         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24348         * tree-eh.c: Include gimplify.h.
24349         (find_trapping_overflow, replace_trapping_overflow,
24350         rewrite_to_non_trapping_overflow): New functions.
24351         * tree-vect-loop.c: Include tree-eh.h.
24352         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24353         * tree-data-ref.c: Include tree-eh.h.
24354         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24356 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
24358         PR rtl-optimization/84123
24359         * combine.c (change_zero_ext): Check if hard register satisfies
24360         can_change_dest_mode before calling gen_lowpart_SUBREG.
24362 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
24364         PR target/82444
24365         * ira.c (ira_init_register_move_cost): Remove assert.
24367 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
24369         PR rtl-optimization/84071
24370         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24371         * doc/tm.texi: Regenerate.
24373 2018-01-31  Richard Biener  <rguenther@suse.de>
24375         PR tree-optimization/84132
24376         * tree-data-ref.c (analyze_miv_subscript): Properly
24377         check whether evolution_function_is_affine_multivariate_p
24378         before calling gcd_of_steps_may_divide_p.
24380 2018-01-31  Julia Koval  <julia.koval@intel.com>
24382         PR target/83618
24383         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24384         * config/i386/i386.md (rdpid_rex64) New.
24385         (rdpid): Make 32bit only.
24387 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
24389         PR lto/84105
24390         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24391         an IDENTIFIER_NODE for FUNCTION_TYPE's.
24393 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
24395         Revert
24396         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
24398         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24400 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
24402         PR rtl-optimization/84071
24403         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24404         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24406 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
24408         * config/arc/arc.c (arc_handle_aux_attribute): New function.
24409         (arc_attribute_table): Add 'aux' attribute.
24410         (arc_in_small_data_p): Consider aux like variables.
24411         (arc_is_aux_reg_p): New function.
24412         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24413         (arc_get_aux_arg): New function.
24414         (prepare_move_operands): Handle aux-register access.
24415         (arc_handle_aux_attribute): New function.
24416         * doc/extend.texi (ARC Variable attributes): Add subsection.
24418 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
24420         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24421         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24422         (arc_attribute_table): Add 'uncached' attribute.
24423         (arc_print_operand): Print '.di' flag for uncached memory
24424         accesses.
24425         (arc_in_small_data_p): Do not consider for small data the uncached
24426         types.
24427         (arc_is_uncached_mem_p): New function.
24428         * config/arc/predicates.md (compact_store_memory_operand): Check
24429         for uncached memory accesses.
24430         (nonvol_nonimm_operand): Likewise.
24431         * doc/extend.texi (ARC Type Attribute): New subsection.
24433 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
24435         PR c/84100
24436         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24437         falign-loops=): Add Optimization flag.
24439 2018-01-30  Jeff Law  <law@redhat.com>
24441         PR target/84064
24442         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24443         INT_REGISTERS_SAVED.  Check it prior to calling
24444         get_scratch_register_on_entry.
24445         (ix86_adjust_stack_and_probe): Similarly.
24446         (ix86_emit_probe_stack_range): Similarly.
24447         (ix86_expand_prologue): Corresponding changes.
24449 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24451         PR target/40411
24452         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24453         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24455 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
24457         PR target/84112
24458         * lra-constraints.c (curr_insn_transform): Process AND in the
24459         address.
24461 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
24463         PR rtl-optimization/83986
24464         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24465         dependence against last_pending_memory_flush in addition to
24466         pending_jump_insns.
24468 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
24470         PR tree-optimization/81611
24471         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24472         copies.
24474 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24476         PR target/83758
24477         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24478         a reg rtx.
24480 2018-01-30  Richard Biener  <rguenther@suse.de>
24481             Jakub Jelinek  <jakub@redhat.com>
24483         PR tree-optimization/84111
24484         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24485         inner loops added during recursion, as they don't have up-to-date
24486         SSA form.
24488 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
24490         PR ipa/81360
24491         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24492         (can_inline_edge_by_limits_p): ... here.
24493         (can_early_inline_edge_p, check_callers,
24494         update_caller_keys, update_callee_keys, recursive_inlining,
24495         add_new_edges_to_heap, speculation_useful_p,
24496         inline_small_functions,
24497         inline_small_functions, flatten_function,
24498         inline_to_all_callers_1): Update.
24500 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
24502         * profile-count.c (profile_count::combine_with_ipa_count): Handle
24503         zeros correctly.
24505 2018-01-30  Richard Biener  <rguenther@suse.de>
24507         PR tree-optimization/83008
24508         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24509         invariant and constant vector uses in stmts when they need
24510         more than one stmt.
24512 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24514         PR bootstrap/84017
24515         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24516         * configure: Regenerate.
24518 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
24520         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24521         pattern.
24522         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24523         Use gen_rtx_REG rather than gen_lowpart.
24525 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
24527         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24528         rather than 0 when creating partial subregs.
24530 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
24532         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24533         of usage.
24535 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
24537         PR target/81550
24538         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24539         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24540         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24541         flags.  This restores the settings used before the 2017-07-24.
24542         Turning off pre increment/decrement/modify allows IVOPTS to
24543         optimize DF/SF loops where the index is an int.
24545 2018-01-29  Richard Biener  <rguenther@suse.de>
24546             Kelvin Nilsen  <kelvin@gcc.gnu.org>
24548         PR bootstrap/80867
24549         * tree-vect-stmts.c (vectorizable_call): Don't call
24550         targetm.vectorize_builtin_md_vectorized_function if callee is
24551         NULL.
24553 2018-01-22  Carl Love  <cel@us.ibm.com>
24555         * doc/extend.tex: Fix typo in second arg in
24556         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24558 2018-01-29  Richard Biener  <rguenther@suse.de>
24560         PR tree-optimization/84086
24561         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24562         (flush_ssaname_freelist): When SSA names were released reset
24563         the SCEV hash table.
24565 2018-01-29  Richard Biener  <rguenther@suse.de>
24567         PR tree-optimization/84057
24568         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24569         removed paths when removing edges.
24571 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
24573         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24574         -mfunction-return=@var{choice}.
24576 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
24578         PR diagnostic/84034
24579         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24580         Handle CR like TAB.
24581         (layout::print_source_line): Likewise.
24582         (test_get_line_width_without_trailing_whitespace): Add test cases.
24584 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
24586         PR middle-end/84040
24587         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24588         debug insns.
24590 2018-01-26  Jim Wilson  <jimw@sifive.com>
24592         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24594         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24595         specified.
24597 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24599         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24600         and CMP + SUB-immediate -> SUBS.
24602 2018-01-26  Martin Sebor  <msebor@redhat.com>
24604         PR tree-optimization/83896
24605         * tree-ssa-strlen.c (get_string_len): Rename...
24606         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
24607         Avoid assuming length is constant.
24608         (handle_char_store): Use HOST_WIDE_INT for string length.
24610 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
24612         PR target/81763
24613         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24614         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24616 2018-01-26  Richard Biener  <rguenther@suse.de>
24618         PR rtl-optimization/84003
24619         * dse.c (record_store): Only record redundant stores when
24620         the earlier store aliases at least all accesses the later one does.
24622 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
24624         PR rtl-optimization/83985
24625         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24626         REG_CFA_RESTORE insns.
24627         (delete_unmarked_insns): Don't ignore separate shrink wrapping
24628         REG_CFA_RESTORE insns here.
24630         PR c/83989
24631         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24632         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24634 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24636         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24637         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24638         (arc_init): Likewise.
24639         (arc_override_options): Likewise.
24640         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24641         value.
24642         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24643         support.
24644         * config/arc/arc.h (TARGET_DBNZ): Define.
24645         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24646         properly set the tune attribute.
24647         (dbnz): Use TARGET_DBNZ guard.
24648         * config/arc/arc.opt (mtune): Add core3 option.
24650 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24652         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24653         recognize new pic like addresses.
24654         (arc_delegitimize_address): Clean up.
24656 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24658         * config/arc/arc-arches.def: Option mrf16 valid for all
24659         architectures.
24660         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24661         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24662         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24663         * config/arc/arc-tables.opt: Regenerate.
24664         * config/arc/arc.c (arc_conditional_register_usage): Handle
24665         reduced register file case.
24666         (arc_file_start): Set must have build attributes.
24667         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24668         mrf16 option value.
24669         * config/arc/arc.opt (mrf16): Add new option.
24670         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24671         * config/arc/genmultilib.awk: Handle new mrf16 option.
24672         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24673         * config/arc/t-multilib: Regenerate.
24674         * doc/invoke.texi (ARC Options): Document mrf16 option.
24676 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24678         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24679         * config/arc/arc.c (arc_handle_secure_attribute): New function.
24680         (arc_attribute_table): Add 'secure_call' attribute.
24681         (arc_print_operand): Print secure call operand.
24682         (arc_function_ok_for_sibcall): Don't optimize tail calls when
24683         secure.
24684         (arc_is_secure_call_p): New function.  * config/arc/arc.md
24685         (call_i): Add support for sjli instruction.
24686         (call_value_i): Likewise.
24687         * config/arc/constraints.md (Csc): New constraint.
24689 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24690             John Eric Martin  <John.Martin@emmicro-us.com>
24692         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24693         * config/arc/arc.c (_arc_jli_section): New struct.
24694         (arc_jli_section): New type.
24695         (rc_jli_sections): New static variable.
24696         (arc_handle_jli_attribute): New function.
24697         (arc_attribute_table): Add jli_always and jli_fixed attribute.
24698         (arc_file_end): New function.
24699         (TARGET_ASM_FILE_END): Define.
24700         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24701         (arc_add_jli_section): New function.
24702         (jli_call_scan): Likewise.
24703         (arc_reorg): Call jli_call_scan.
24704         (arc_output_addsi): Remove 'S' from printing asm operand.
24705         (arc_is_jli_call_p): New function.
24706         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24707         operand.
24708         (movhi_insn): Likewise.
24709         (movsi_insn): Likewise.
24710         (movsi_set_cc_insn): Likewise.
24711         (loadqi_update): Likewise.
24712         (load_zeroextendqisi_update): Likewise.
24713         (load_signextendqisi_update): Likewise.
24714         (loadhi_update): Likewise.
24715         (load_zeroextendhisi_update): Likewise.
24716         (load_signextendhisi_update): Likewise.
24717         (loadsi_update): Likewise.
24718         (loadsf_update): Likewise.
24719         (movsicc_insn): Likewise.
24720         (bset_insn): Likewise.
24721         (bxor_insn): Likewise.
24722         (bclr_insn): Likewise.
24723         (bmsk_insn): Likewise.
24724         (bicsi3_insn): Likewise.
24725         (cmpsi_cc_c_insn): Likewise.
24726         (movsi_ne): Likewise.
24727         (movsi_cond_exec): Likewise.
24728         (clrsbsi2): Likewise.
24729         (norm_f): Likewise.
24730         (normw): Likewise.
24731         (swap): Likewise.
24732         (divaw): Likewise.
24733         (flag): Likewise.
24734         (sr): Likewise.
24735         (kflag): Likewise.
24736         (ffs): Likewise.
24737         (ffs_f): Likewise.
24738         (fls): Likewise.
24739         (call_i): Remove 'S' asm letter, add jli instruction.
24740         (call_value_i): Likewise.
24741         * config/arc/arc.op (mjli-always): New option.
24742         * config/arc/constraints.md (Cji): New constraint.
24743         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24744         operand.
24745         (subsf3_fpx): Likewise.
24746         (mulsf3_fpx): Likewise.
24747         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24748         asm operand.
24749         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24750         function attrbutes.
24751         * doc/invoke.texi (ARC): Document mjli-always option.
24753 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
24755         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24756         avoid addition with 0 and use incw and decw where possible.
24758 2018-01-26  Richard Biener  <rguenther@suse.de>
24760         PR tree-optimization/81082
24761         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24762         association if it requires casting to unsigned.
24763         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24764         from fold_plusminus_mult_expr to catch important cases late when
24765         range info is available.
24767 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24769         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24770         * configure.ac (hidden_linkonce): New test.
24771         * configure: Regenerate.
24772         * config.in: Regenerate.
24774 2018-01-26  Julia Koval  <julia.koval@intel.com>
24776         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24777         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24778         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24779         _mm_mask_bitshuffle_epi64_mask): Fix type.
24780         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24781         USI_FTYPE_V4DI_V4DI_USI): Remove.
24782         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24783         __builtin_ia32_vpshufbitqmb256_mask,
24784         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24785         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24786         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24788 2018-01-26  Alan Modra  <amodra@gmail.com>
24790         PR target/84033
24791         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24792         UNSPEC_VBPERMQ.  Sort other unspecs.
24794 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
24796         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24798 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
24800         PR middle-end/83055
24801         * predict.c (drop_profile): Do not push/pop cfun; update also
24802         node->count.
24803         (handle_missing_profiles): Fix logic looking for zero profiles.
24805 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
24807         PR middle-end/83977
24808         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24809         on functions with #pragma omp declare simd or functions with simd
24810         attribute.
24811         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24812         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24813         Remove trailing \n from warning_at calls.
24815 2018-01-25  Tom de Vries  <tom@codesourcery.com>
24817         PR target/84028
24818         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24819         for neutered workers.
24821 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
24823         PR target/68467
24824         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24825         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24827 2018-01-24  Jeff Law  <law@redhat.com>
24829         PR target/83994
24830         * i386.c (get_probe_interval): Move to earlier point.
24831         (ix86_compute_frame_layout): If -fstack-clash-protection and
24832         the frame is larger than the probe interval, then use pushes
24833         to save registers rather than reg->mem moves.
24834         (ix86_expand_prologue): Remove conditional for int_registers_saved
24835         assertion.
24837 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
24839         PR target/84014
24840         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24841         min/max for never referenced object.
24843 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
24845         PR middle-end/83977
24846         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24847         here.
24848         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24849         attributes from DECL_ATTRIBUTES (decl) without affecting
24850         DECL_ATTRIBUTES (current_function_decl).
24851         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24852         functions with non-NULL DECL_ABSTRACT_ORIGIN.
24854 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
24856         PR tree-optimization/83979
24857         * fold-const.c (fold_comparison): Use constant_boolean_node
24858         instead of boolean_{true,false}_node.
24860 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
24862         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24863         with zero counts.
24865 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24867         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24868         Simplify the clause that sets the length attribute.
24869         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24870         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24871         clause that sets the length attribute.
24872         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24874 2018-01-24  Tom de Vries  <tom@codesourcery.com>
24876         PR target/83589
24877         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24878         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24879         Add strict parameter.
24880         (prevent_branch_around_nothing): Insert dummy insn between branch to
24881         label and label with no ptx insn inbetween.
24882         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24884 2018-01-24  Tom de Vries  <tom@codesourcery.com>
24886         PR target/81352
24887         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24888         for neutered threads in warp.
24889         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24891 2018-01-24  Richard Biener  <rguenther@suse.de>
24893         PR tree-optimization/83176
24894         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24895         operands.
24897 2018-01-24  Richard Biener  <rguenther@suse.de>
24899         PR tree-optimization/82819
24900         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24901         code generating pluses that are no-ops in the target precision.
24903 2018-01-24  Richard Biener  <rguenther@suse.de>
24905         PR middle-end/84000
24906         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24908 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
24910         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24911         to merge probabilities.
24912         * predict.c (probably_never_executed): Also mark as cold functions
24913         with global 0 profile and guessed local profile.
24914         * profile-count.c (profile_probability::combine_with_count): New
24915         member function.
24916         * profile-count.h (profile_probability::operator*,
24917         profile_probability::operator*=, profile_probability::operator/,
24918         profile_probability::operator/=): Reduce precision to adjusted
24919         and set value to guessed on contradictory divisions.
24920         (profile_probability::combine_with_freq): Remove.
24921         (profile_probability::combine_wiht_count): Declare.
24922         (profile_count::force_nonzero):: Set to adjusted.
24923         (profile_count::probability_in):: Set quality to adjusted.
24924         * tree-ssa-tail-merge.c (replace_block_by): Use
24925         combine_with_count.
24927 2018-01-23  Andrew Waterman  <andrew@sifive.com>
24928             Jim Wilson  <jimw@sifive.com>
24930         * config/riscv/riscv.c (riscv_stack_boundary): New.
24931         (riscv_option_override): Set riscv_stack_boundary.  Handle
24932         riscv_preferred_stack_boundary_arg.
24933         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24934         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24935         (STACK_BOUNDARY): Set to riscv_stack_boundary.
24936         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24937         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24938         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24940 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
24942         PR target/83905
24943         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24944         of struct ix86_frame.
24945         (ix86_expand_epilogue): Likewise.  Add a local variable for
24946         the reg_save_offset field in struct ix86_frame.
24948 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
24950         PR tree-optimization/82604
24951         * tree-loop-distribution.c (enum partition_kind): New enum item
24952         PKIND_PARTIAL_MEMSET.
24953         (partition_builtin_p): Support above new enum item.
24954         (generate_code_for_partition): Ditto.
24955         (compute_access_range): Differentiate cases that equality can be
24956         proven at all loops, the innermost loops or no loops.
24957         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24958         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
24959         (finalize_partitions, distribute_loop): Don't fuse partition of
24960         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24961         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24962         parloop is enabled.
24964 2018-01-23  Martin Liska  <mliska@suse.cz>
24966         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24967         order to ignore the predictor.
24968         (PRED_POLYMORPHIC_CALL): Likewise.
24969         (PRED_RECURSIVE_CALL): Likewise.
24971 2018-01-23  Martin Liska  <mliska@suse.cz>
24973         * tree-profile.c (tree_profiling): Print function header to
24974         aware reader which function we are working on.
24975         * value-prof.c (gimple_find_values_to_profile): Do not print
24976         not interesting value histograms.
24978 2018-01-23  Martin Liska  <mliska@suse.cz>
24980         * profile-count.h (enum profile_quality): Add
24981         profile_uninitialized as the first value. Do not number values
24982         as they are zero based.
24983         (profile_count::verify): Update sanity check.
24984         (profile_probability::verify): Likewise.
24986 2018-01-23  Nathan Sidwell  <nathan@acm.org>
24988         * doc/invoke.texi (ffor-scope): Deprecate.
24990 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
24992         PR tree-optimization/83510
24993         * domwalk.c (set_all_edges_as_executable): New function.
24994         (dom_walker::dom_walker): Convert bool param
24995         "skip_unreachable_blocks" to enum reachability.  Move setup of
24996         edge flags to set_all_edges_as_executable and only do it when
24997         reachability is REACHABLE_BLOCKS.
24998         * domwalk.h (enum dom_walker::reachability): New enum.
24999         (dom_walker::dom_walker): Convert bool param
25000         "skip_unreachable_blocks" to enum reachability.
25001         (set_all_edges_as_executable): New decl.
25002         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
25003         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
25004         "reachability".
25005         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
25006         but converting true to REACHABLE_BLOCKS.
25007         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
25008         * tree-vrp.c
25009         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
25010         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
25011         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
25012         REACHABLE_BLOCKS.
25013         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
25014         if check_all_array_refs will be called.
25016 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
25018         * tree.c (selftest::test_location_wrappers): Add more test
25019         coverage.
25021 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
25023         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
25024         (selftest::test_bit_in_range): Likewise.
25026 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
25028         PR testsuite/83888
25029         * doc/sourcebuild.texi (vect_float): Say that the selector
25030         only describes the situation when -funsafe-math-optimizations is on.
25031         (vect_float_strict): Document.
25033 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
25035         PR tree-optimization/83965
25036         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
25037         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
25038         instead of checking only for a reduction.
25039         (vect_recog_widen_sum_pattern): Likewise.
25041 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
25043         * predict.c (probably_never_executed): Only use precise profile info.
25044         (compute_function_frequency): Skip after inlining hack since we now
25045         have quality checking.
25047 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
25049         * profile-count.h (profile_probability::very_unlikely,
25050         profile_probability::unlikely, profile_probability::even): Set
25051         precision to guessed.
25053 2018-01-23  Richard Biener  <rguenther@suse.de>
25055         PR tree-optimization/83963
25056         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
25057         Properly terminate dominator walk when crossing the exit edge not
25058         when visiting its source block.
25060 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
25062         PR c++/83918
25063         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
25064         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
25066 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
25068         PR tree-optimization/83957
25069         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
25070         semicolon after for body surrounded by braces.
25072         PR tree-optimization/83081
25073         * profile-count.h (profile_probability::split): New method.
25074         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
25075         Use profile_probability::split.
25076         (do_compare_rtx_and_jump): Fix adjustment of probabilities
25077         when splitting a single conditional jump into 2.
25079 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
25081         PR tree-optimization/69452
25082         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
25083         decl.
25085 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25087         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
25088         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
25089         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
25091 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25093         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
25094         declaration.
25095         * config/rl78/rl78.md (movdi): New define_expand.
25096         * config/rl78/rl78.c (rl78_split_movdi): New function.
25098 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
25100         PR target/83862
25101         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
25102         no longer used.
25103         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
25104         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
25105         128-bit to produce an UNSPEC move to get the double word with the
25106         signbit and then a shift directly to do signbit.
25107         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
25108         implementation with a new version that just does either a direct
25109         move or a regular move.  Move memory interface to separate insns.
25110         Move insns so they are next to the expander.
25111         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
25112         with signbit move.  Split big and little endian case.
25113         (signbit<mode>2_dm_mem_le): Likewise.
25114         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
25115         (signbit<mode>2_dm2): Likewise.
25117 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25119         * config/rl78/rl78.md (anddi3): New define_expand.
25121 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25123         * config/rl78/rl78.md (umindi3): New define_expand.
25125 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25127         * config/rl78/rl78.md (smindi3): New define_expand.
25129 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25131         * config/rl78/rl78.md (smaxdi3): New define_expand.
25133 2018-01-22  Carl Love  <cel@us.ibm.com>
25135         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
25136         LVX_V1TI): Add macro expansion.
25137         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
25138         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
25139         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
25140         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
25141         Change check to determine if the instruction is a byte reversing
25142         entry.  Fix typo in comment.
25143         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
25144         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
25145         Add def_builtin calls for new builtins.
25146         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
25147         Add define_insn expansion.
25149 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25151         * config/rl78/rl78.md (umaxdi3): New define_expand.
25153 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25155         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
25156         for non-QImode registers.
25158 2018-01-22  Richard Biener  <rguenther@suse.de>
25160         PR tree-optimization/83963
25161         * graphite-scop-detection.c (scop_detection::get_sese): Delay
25162         including the loop exit block.
25163         (scop_detection::merge_sese): Likewise.
25164         (scop_detection::add_scop): Do it here instead.
25166 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25168         * doc/sourcebuild.texi (arm_softfloat): Document.
25170 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
25172         PR gcc/77734
25173         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
25174         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
25175         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
25177 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25178             David Edelsohn  <dje.gcc@gmail.com>
25180         PR target/83946
25181         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25182         Change "crset eq" to "crset 2".
25183         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25184         (*call_indirect_aix<mode>_nospec): Likewise.
25185         (*call_value_indirect_aix<mode>_nospec): Likewise.
25186         (*call_indirect_elfv2<mode>_nospec): Likewise.
25187         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
25188         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
25189         change assembly output from . to $.
25190         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25191         (indirect_jump<mode>_nospec): Change assembly output from . to $.
25192         (*tablejump<mode>_internal1_nospec): Likewise.
25194 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
25196         PR target/80870
25197         * config/sh/sh_optimize_sett_clrt.cc:
25198         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
25200 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
25202         PR tree-optimization/83940
25203         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
25204         offset_dt to vect_constant_def rather than vect_unknown_def_type.
25205         (vect_check_load_store_mask): Add a mask_dt_out parameter and
25206         use it to pass back the definition type.
25207         (vect_check_store_rhs): Likewise rhs_dt_out.
25208         (vect_build_gather_load_calls): Add a mask_dt argument and use
25209         it instead of a call to vect_is_simple_use.
25210         (vectorizable_store): Update calls to vect_check_load_store_mask
25211         and vect_check_store_rhs.  Use the dt returned by the latter instead
25212         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
25213         instead of calls to vect_is_simple_use.  Pass the scalar rather
25214         than the vector operand to vect_is_simple_use when handling
25215         second and subsequent copies of an rhs value.
25216         (vectorizable_load): Update calls to vect_check_load_store_mask
25217         and vect_build_gather_load_calls.  Use the cached mask_dt and
25218         gs_info.offset_dt instead of calls to vect_is_simple_use.
25220 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
25222         PR middle-end/83945
25223         * tree-emutls.c: Include gimplify.h.
25224         (lower_emutls_2): New function.
25225         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
25226         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
25227         it before further processing.
25229         PR target/83930
25230         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
25231         UINTVAL (trueop1) instead of INTVAL (op1).
25233 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
25235         PR debug/81570
25236         PR debug/83728
25237         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
25238         INCOMING_FRAME_SP_OFFSET if not defined.
25239         (scan_trace): Add ENTRY argument.  If true and
25240         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
25241         emit a note to adjust the CFA offset.
25242         (create_cfi_notes): Adjust scan_trace callers.
25243         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
25244         INCOMING_FRAME_SP_OFFSET in the CIE.
25245         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
25246         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
25247         Likewise.
25248         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
25249         * doc/tm.texi: Regenerated.
25251 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25253         PR rtl-optimization/83147
25254         * lra-constraints.c (remove_inheritance_pseudos): Use
25255         lra_substitute_pseudo_within_insn.
25257 2018-01-19  Tom de Vries  <tom@codesourcery.com>
25258             Cesar Philippidis  <cesar@codesourcery.com>
25260         PR target/83920
25261         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
25263 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
25265         PR target/83790
25266         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
25267         spaces for function labels.
25269 2018-01-19  Martin Liska  <mliska@suse.cz>
25271         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
25272         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
25273         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
25274         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
25275         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
25276         (PRED_CONST_RETURN): Change from 69 to 65.
25277         (PRED_NULL_RETURN): Change from 91 to 71.
25278         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
25279         (PRED_LOOP_GUARD): Change from 66 to 73.
25281 2018-01-19  Martin Liska  <mliska@suse.cz>
25283         * predict.c (predict_insn_def): Add new assert.
25284         (struct branch_predictor): Change type to signed integer.
25285         (test_prediction_value_range): Amend test to cover
25286         PROB_UNINITIALIZED.
25287         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25288         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25289         (PRED_LOOP_ITERATIONS_MAX): Likewise.
25290         (PRED_LOOP_IV_COMPARE): Likewise.
25291         * predict.h (PROB_UNINITIALIZED): Define new constant.
25293 2018-01-19  Martin Liska  <mliska@suse.cz>
25295         * predict.c (dump_prediction): Add new format for
25296         analyze_brprob.py script which is enabled with -details
25297         suboption.
25298         * profile-count.h (precise_p): New function.
25300 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
25302         PR tree-optimization/83922
25303         * tree-vect-loop.c (vect_verify_full_masking): Return false if
25304         there are no statements that need masking.
25305         (vect_active_double_reduction_p): New function.
25306         (vect_analyze_loop_operations): Use it when handling phis that
25307         are not in the loop header.
25309 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
25311         PR tree-optimization/83914
25312         * tree-vect-loop.c (vectorizable_induction): Don't convert
25313         init_expr or apply the peeling adjustment for inductions
25314         that are nested within the vectorized loop.
25316 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25318         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25319         instead of NEG.
25321 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
25323         PR sanitizer/81715
25324         PR testsuite/83882
25325         * function.h (gimplify_parameters): Add gimple_seq * argument.
25326         * function.c: Include gimple.h and options.h.
25327         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25328         for the added local temporaries if needed.
25329         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25330         if there are any parameter cleanups, wrap whole body into a
25331         try/finally with the cleanups.
25333 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
25335         PR target/82964
25336         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25337         Use GET_MODE_CLASS for scalar floating point.
25339 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
25341         PR ipa/82256
25342         patch by PaX Team
25343         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25344         Fix call of call_cgraph_insertion_hooks.
25346 2018-01-18  Martin Sebor  <msebor@redhat.com>
25348         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25350 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
25352         PR ipa/83619
25353         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25354         frequencies.
25356 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
25358         PR other/70268
25359         * common.opt: (-ffile-prefix-map): New option.
25360         * opts.c (common_handle_option): Defer it.
25361         * opts-global.c (handle_common_deferred_options): Handle it.
25362         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25363         * file-prefix-map.h: New file.
25364         (remap_debug_filename, add_debug_prefix_map): ...here.
25365         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25366         * final.c (debug_prefix_map, add_debug_prefix_map
25367         remap_debug_filename): Move to...
25368         * file-prefix-map.c: New file.
25369         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25370         generalize, get rid of alloca(), use strrchr() instead of strchr().
25371         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25372         Implement in terms of add_prefix_map().
25373         (remap_macro_filename, remap_debug_filename): Implement in term of
25374         remap_filename().
25375         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25376         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25377         * dbxout.c: Include file-prefix-map.h.
25378         * varasm.c: Likewise.
25379         * vmsdbgout.c: Likewise.
25380         * xcoffout.c: Likewise.
25381         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25382         * doc/cppopts.texi (-fmacro-prefix-map): Document.
25383         * doc/invoke.texi (-ffile-prefix-map): Document.
25384         (-fdebug-prefix-map): Update description.
25386 2018-01-18  Martin Liska  <mliska@suse.cz>
25388         * config/i386/i386.c (indirect_thunk_name): Document that also
25389         lfence is emitted.
25390         (output_indirect_thunk): Document why both instructions
25391         (pause and lfence) are generated.
25393 2018-01-18  Richard Biener  <rguenther@suse.de>
25395         PR tree-optimization/83887
25396         * graphite-scop-detection.c
25397         (scop_detection::get_nearest_dom_with_single_entry): Remove.
25398         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25399         (scop_detection::merge_sese): Re-implement with a flood-fill
25400         algorithm that properly finds a SESE region if it exists.
25402 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
25404         PR c/61240
25405         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25406         pointer_diff optimizations use view_convert instead of convert.
25408 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25410         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25411         Generate different code for -mno-speculate-indirect-jumps.
25412         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25413         (*call_indirect_aix<mode>): Disable for
25414         -mno-speculate-indirect-jumps.
25415         (*call_indirect_aix<mode>_nospec): New define_insn.
25416         (*call_value_indirect_aix<mode>): Disable for
25417         -mno-speculate-indirect-jumps.
25418         (*call_value_indirect_aix<mode>_nospec): New define_insn.
25419         (*sibcall_nonlocal_sysv<mode>): Generate different code for
25420         -mno-speculate-indirect-jumps.
25421         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25423 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
25425         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25426         long double type, set the flags for noting the default long double
25427         type, even if we don't pass or return a long double type.
25429 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
25431         PR ipa/83051
25432         * ipa-inline.c (flatten_function): Do not overwrite final inlining
25433         failure.
25435 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
25437         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25438         support for merge[hl].
25439         (fold_mergehl_helper): New helper function.
25440         (tree-vector-builder.h): New #include for tree_vector_builder usage.
25441         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25442         (altivec_vmrglw_direct): Add xxmrglw insn.
25444 2018-01-17  Andrew Waterman  <andrew@sifive.com>
25446         * config/riscv/riscv.c (riscv_conditional_register_usage): If
25447         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25449 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
25451         PR lto/83121
25452         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25453         call the lto_location_cache before reading the
25454         DECL_SOURCE_LOCATION of the types.
25456 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
25457             Richard Sandiford  <richard.sandiford@linaro.org>
25459         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25460         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25461         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25462         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25463         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25464         Add declaration.
25465         * config/aarch64/constraints.md (aarch64_movti_operand):
25466         Limit immediates.
25467         * config/aarch64/predicates.md (Uti): Add new constraint.
25469 2018-01-17  Carl Love  <cel@us.ibm.com>
25471         * config/rs6000/vsx.md (define_expand xl_len_r,
25472         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25473         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25474         lxvll.
25475         (define_expand, define_insn): Move the shift left from  the
25476         define_insn to the define_expand for lxvl and stxvl instructions.
25477         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25478         and XL_LEN_R definitions to PURE.
25480 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
25482         * config/i386/i386.c (indirect_thunk_name): Declare regno
25483         as unsigned int.  Compare regno with INVALID_REGNUM.
25484         (output_indirect_thunk): Ditto.
25485         (output_indirect_thunk_function): Ditto.
25486         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
25487         in the call to output_indirect_thunk_function.
25489 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
25491         PR middle-end/83884
25492         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25493         rather than the size of inner_type to determine the stack slot size
25494         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25496 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
25498         PR target/83546
25499         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25500         to PTA_SILVERMONT.
25502 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
25504         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25505         endian Linux systems to optionally enable multilibs for selecting
25506         the long double type if the user configured an explicit type.
25507         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25508         have no long double multilibs if not defined.
25509         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25510         warn if the user used -mabi={ieee,ibm}longdouble and we built
25511         multilibs for long double.
25512         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25513         appropriate multilib option.
25514         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25515         multilib options.
25516         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25517         for building long double multilibs.
25518         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25520 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
25522         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25523         copies.
25525         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25526         64 bits.
25527         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25528         128 bits.
25530         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25531         variables.
25533         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25534         return value.
25536 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
25538         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25539         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25541 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25543         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25544         different rtl trees depending on TARGET_64BIT.
25545         (rs6000_gen_lvx): Likewise.
25547 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
25549         * config/visium/visium.md (nop): Tweak comment.
25550         (hazard_nop): Likewise.
25552 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25554         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25555         -mspeculate-indirect-jumps.
25556         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25557         for -mno-speculate-indirect-jumps.
25558         (*call_indirect_elfv2<mode>_nospec): New define_insn.
25559         (*call_value_indirect_elfv2<mode>): Disable for
25560         -mno-speculate-indirect-jumps.
25561         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25562         (indirect_jump): Emit different RTL for
25563         -mno-speculate-indirect-jumps.
25564         (*indirect_jump<mode>): Disable for
25565         -mno-speculate-indirect-jumps.
25566         (*indirect_jump<mode>_nospec): New define_insn.
25567         (tablejump): Emit different RTL for
25568         -mno-speculate-indirect-jumps.
25569         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25570         (tablejumpsi_nospec): New define_expand.
25571         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25572         (tablejumpdi_nospec): New define_expand.
25573         (*tablejump<mode>_internal1): Disable for
25574         -mno-speculate-indirect-jumps.
25575         (*tablejump<mode>_internal1_nospec): New define_insn.
25576         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25577         option.
25579 2018-01-16  Artyom Skrobov tyomitch@gmail.com
25581         * caller-save.c (insert_save): Drop unnecessary parameter.  All
25582         callers updated.
25584 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
25585             Richard Biener  <rguenth@suse.de>
25587         PR libgomp/83590
25588         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25589         return early, inline manually is_gimple_sizepos.  Make sure if we
25590         call gimplify_expr we don't end up with a gimple constant.
25591         * tree.c (variably_modified_type_p): Don't return true for
25592         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
25593         * gimplify.h (is_gimple_sizepos): Remove.
25595 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25597         PR tree-optimization/83857
25598         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25599         vectorizable_live_operation for pure SLP statements.
25600         (vectorizable_live_operation): Handle PHIs.
25602 2018-01-16  Richard Biener  <rguenther@suse.de>
25604         PR tree-optimization/83867
25605         * tree-vect-stmts.c (vect_transform_stmt): Precompute
25606         nested_in_vect_loop_p since the scalar stmt may get invalidated.
25608 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
25610         PR c/83844
25611         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25612         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25613         If off is not INTEGER_CST, issue a may not be aligned warning
25614         rather than isn't aligned.  Use isn%'t rather than isn't.
25615         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25616         into MULT_EXPR.
25617         <case MULT_EXPR>: Improve the case when bottom and one of the
25618         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25619         operand, in that case check if the other operand is multiple of
25620         bottom divided by the INTEGER_CST operand.
25622 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25624         PR target/83858
25625         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25626         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25627         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25628         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25629         * config/pa/pa.c (pa_function_arg_advance): Likewise.
25630         (pa_function_arg, pa_arg_partial_bytes): Likewise.
25631         (pa_function_arg_size): New function.
25633 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25635         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25636         in a separate statement.
25638 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25640         PR tree-optimization/83847
25641         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25642         group gathers and scatters.
25644 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
25646         PR rtl-optimization/86620
25647         * params.def (max-sched-ready-insns): Bump minimum value to 1.
25649         PR rtl-optimization/83213
25650         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25651         to last if both are JUMP_INSNs.
25653         PR tree-optimization/83843
25654         * gimple-ssa-store-merging.c
25655         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25656         store_immediate_info for bswap/nop orig_stores.
25658 2018-01-15  Andrew Waterman  <andrew@sifive.com>
25660         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25661         !TARGET_MUL.
25662         <UDIV>: Increase cost if !TARGET_DIV.
25664 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
25666         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25667         (define_attr "cr_logical_3op"): New.
25668         (cceq_ior_compare): Adjust.
25669         (cceq_ior_compare_complement): Adjust.
25670         (*cceq_rev_compare): Adjust.
25671         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25672         (is_cracked_insn): Adjust.
25673         (insn_must_be_first_in_group): Adjust.
25674         * config/rs6000/40x.md: Adjust.
25675         * config/rs6000/440.md: Adjust.
25676         * config/rs6000/476.md: Adjust.
25677         * config/rs6000/601.md: Adjust.
25678         * config/rs6000/603.md: Adjust.
25679         * config/rs6000/6xx.md: Adjust.
25680         * config/rs6000/7450.md: Adjust.
25681         * config/rs6000/7xx.md: Adjust.
25682         * config/rs6000/8540.md: Adjust.
25683         * config/rs6000/cell.md: Adjust.
25684         * config/rs6000/e300c2c3.md: Adjust.
25685         * config/rs6000/e500mc.md: Adjust.
25686         * config/rs6000/e500mc64.md: Adjust.
25687         * config/rs6000/e5500.md: Adjust.
25688         * config/rs6000/e6500.md: Adjust.
25689         * config/rs6000/mpc.md: Adjust.
25690         * config/rs6000/power4.md: Adjust.
25691         * config/rs6000/power5.md: Adjust.
25692         * config/rs6000/power6.md: Adjust.
25693         * config/rs6000/power7.md: Adjust.
25694         * config/rs6000/power8.md: Adjust.
25695         * config/rs6000/power9.md: Adjust.
25696         * config/rs6000/rs64.md: Adjust.
25697         * config/rs6000/titan.md: Adjust.
25699 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25701         * config/i386/predicates.md (indirect_branch_operand): Rewrite
25702         ix86_indirect_branch_register logic.
25704 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25706         * config/i386/constraints.md (Bs): Update
25707         ix86_indirect_branch_register check.  Don't check
25708         ix86_indirect_branch_register with GOT_memory_operand.
25709         (Bw): Likewise.
25710         * config/i386/predicates.md (GOT_memory_operand): Don't check
25711         ix86_indirect_branch_register here.
25712         (GOT32_symbol_operand): Likewise.
25714 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25716         * config/i386/predicates.md (constant_call_address_operand):
25717         Rewrite ix86_indirect_branch_register logic.
25718         (sibcall_insn_operand): Likewise.
25720 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25722         * config/i386/constraints.md (Bs): Replace
25723         ix86_indirect_branch_thunk_register with
25724         ix86_indirect_branch_register.
25725         (Bw): Likewise.
25726         * config/i386/i386.md (indirect_jump): Likewise.
25727         (tablejump): Likewise.
25728         (*sibcall_memory): Likewise.
25729         (*sibcall_value_memory): Likewise.
25730         Peepholes of indirect call and jump via memory: Likewise.
25731         * config/i386/i386.opt: Likewise.
25732         * config/i386/predicates.md (indirect_branch_operand): Likewise.
25733         (GOT_memory_operand): Likewise.
25734         (call_insn_operand): Likewise.
25735         (sibcall_insn_operand): Likewise.
25736         (GOT32_symbol_operand): Likewise.
25738 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
25740         PR middle-end/83837
25741         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25742         type rather than type addr's type points to.
25743         (expand_omp_atomic_mutex): Likewise.
25744         (expand_omp_atomic): Likewise.
25746 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25748         PR target/83839
25749         * config/i386/i386.c (output_indirect_thunk_function): Use
25750         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25751         for  __x86_return_thunk.
25753 2018-01-15  Richard Biener  <rguenther@suse.de>
25755         PR middle-end/83850
25756         * expmed.c (extract_bit_field_1): Fix typo.
25758 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25760         PR target/83687
25761         * config/arm/iterators.md (VF): New mode iterator.
25762         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25763         Remove integer-related logic from pattern.
25764         (neon_vabd<mode>_3): Likewise.
25766 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
25768         PR middle-end/82694
25769         * common.opt (fstrict-overflow): No longer an alias.
25770         (fwrapv-pointer): New option.
25771         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25772         also for pointer types based on flag_wrapv_pointer.
25773         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25774         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25775         opts->x_flag_wrapv got set.
25776         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25777         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25778         POINTER_TYPE_OVERFLOW_UNDEFINED.
25779         * match.pd: Likewise in address comparison pattern.
25780         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25782 2018-01-15  Richard Biener  <rguenther@suse.de>
25784         PR lto/83804
25785         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25786         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
25787         Reset type names to their identifier if their TYPE_DECL doesn't
25788         have linkage (and thus is used for ODR and devirt).
25789         (save_debug_info_for_decl): Remove.
25790         (save_debug_info_for_type): Likewise.
25791         (add_tree_to_fld_list): Adjust.
25792         * tree-pretty-print.c (dump_generic_node): Make dumping of
25793         type names more robust.
25795 2018-01-15  Richard Biener  <rguenther@suse.de>
25797         * BASE-VER: Bump to 8.0.1.
25799 2018-01-14  Martin Sebor  <msebor@redhat.com>
25801         PR other/83508
25802         * builtins.c (check_access): Avoid warning when the no-warning bit
25803         is set.
25805 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
25807         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25808         * ira-color (allocno_hard_regs_compare): Likewise.
25810 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
25812         PR target/83013
25813         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25814         Use .pushsection/.popsection.
25816 2018-01-14  Martin Sebor  <msebor@redhat.com>
25818         PR c++/81327
25819         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25821 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
25823         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25824         entry from extra_headers.
25825         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25826         extra_headers, make the list bitwise identical to the i?86-*-* one.
25828 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25830         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25831         -mcmodel=large with -mindirect-branch=thunk,
25832         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25833         -mfunction-return=thunk-extern.
25834         * doc/invoke.texi: Document -mcmodel=large is incompatible with
25835         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25836         -mfunction-return=thunk and -mfunction-return=thunk-extern.
25838 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25840         * config/i386/i386.c (print_reg): Print the name of the full
25841         integer register without '%'.
25842         (ix86_print_operand): Handle 'V'.
25843         * doc/extend.texi: Document 'V' modifier.
25845 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25847         * config/i386/constraints.md (Bs): Disallow memory operand for
25848         -mindirect-branch-register.
25849         (Bw): Likewise.
25850         * config/i386/predicates.md (indirect_branch_operand): Likewise.
25851         (GOT_memory_operand): Likewise.
25852         (call_insn_operand): Likewise.
25853         (sibcall_insn_operand): Likewise.
25854         (GOT32_symbol_operand): Likewise.
25855         * config/i386/i386.md (indirect_jump): Call convert_memory_address
25856         for -mindirect-branch-register.
25857         (tablejump): Likewise.
25858         (*sibcall_memory): Likewise.
25859         (*sibcall_value_memory): Likewise.
25860         Disallow peepholes of indirect call and jump via memory for
25861         -mindirect-branch-register.
25862         (*call_pop): Replace m with Bw.
25863         (*call_value_pop): Likewise.
25864         (*sibcall_pop_memory): Replace m with Bs.
25865         * config/i386/i386.opt (mindirect-branch-register): New option.
25866         * doc/invoke.texi: Document -mindirect-branch-register option.
25868 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25870         * config/i386/i386-protos.h (ix86_output_function_return): New.
25871         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25872         set function_return_type.
25873         (indirect_thunk_name): Add ret_p to indicate thunk for function
25874         return.
25875         (output_indirect_thunk_function): Pass false to
25876         indirect_thunk_name.
25877         (ix86_output_indirect_branch_via_reg): Likewise.
25878         (ix86_output_indirect_branch_via_push): Likewise.
25879         (output_indirect_thunk_function): Create alias for function
25880         return thunk if regno < 0.
25881         (ix86_output_function_return): New function.
25882         (ix86_handle_fndecl_attribute): Handle function_return.
25883         (ix86_attribute_table): Add function_return.
25884         * config/i386/i386.h (machine_function): Add
25885         function_return_type.
25886         * config/i386/i386.md (simple_return_internal): Use
25887         ix86_output_function_return.
25888         (simple_return_internal_long): Likewise.
25889         * config/i386/i386.opt (mfunction-return=): New option.
25890         (indirect_branch): Mention -mfunction-return=.
25891         * doc/extend.texi: Document function_return function attribute.
25892         * doc/invoke.texi: Document -mfunction-return= option.
25894 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25896         * config/i386/i386-opts.h (indirect_branch): New.
25897         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25898         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25899         with local indirect jump when converting indirect call and jump.
25900         (ix86_set_indirect_branch_type): New.
25901         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25902         (indirectlabelno): New.
25903         (indirect_thunk_needed): Likewise.
25904         (indirect_thunk_bnd_needed): Likewise.
25905         (indirect_thunks_used): Likewise.
25906         (indirect_thunks_bnd_used): Likewise.
25907         (INDIRECT_LABEL): Likewise.
25908         (indirect_thunk_name): Likewise.
25909         (output_indirect_thunk): Likewise.
25910         (output_indirect_thunk_function): Likewise.
25911         (ix86_output_indirect_branch_via_reg): Likewise.
25912         (ix86_output_indirect_branch_via_push): Likewise.
25913         (ix86_output_indirect_branch): Likewise.
25914         (ix86_output_indirect_jmp): Likewise.
25915         (ix86_code_end): Call output_indirect_thunk_function if needed.
25916         (ix86_output_call_insn): Call ix86_output_indirect_branch if
25917         needed.
25918         (ix86_handle_fndecl_attribute): Handle indirect_branch.
25919         (ix86_attribute_table): Add indirect_branch.
25920         * config/i386/i386.h (machine_function): Add indirect_branch_type
25921         and has_local_indirect_jump.
25922         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25923         to true.
25924         (tablejump): Likewise.
25925         (*indirect_jump): Use ix86_output_indirect_jmp.
25926         (*tablejump_1): Likewise.
25927         (simple_return_indirect_internal): Likewise.
25928         * config/i386/i386.opt (mindirect-branch=): New option.
25929         (indirect_branch): New.
25930         (keep): Likewise.
25931         (thunk): Likewise.
25932         (thunk-inline): Likewise.
25933         (thunk-extern): Likewise.
25934         * doc/extend.texi: Document indirect_branch function attribute.
25935         * doc/invoke.texi: Document -mindirect-branch= option.
25937 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
25939         PR ipa/83051
25940         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25942 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
25944         * ipa-inline.c (want_inline_small_function_p): Return false if
25945         inlining has already failed with CIF_FINAL_ERROR.
25946         (update_caller_keys): Call want_inline_small_function_p before
25947         can_inline_edge_p.
25948         (update_callee_keys): Likewise.
25950 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25952         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25953         New function.
25954         (rs6000_quadword_masked_address_p): Likewise.
25955         (quad_aligned_load_p): Likewise.
25956         (quad_aligned_store_p): Likewise.
25957         (const_load_sequence_p): Add comment to describe the outer-most loop.
25958         (mimic_memory_attributes_and_flags): New function.
25959         (rs6000_gen_stvx): Likewise.
25960         (replace_swapped_aligned_store): Likewise.
25961         (rs6000_gen_lvx): Likewise.
25962         (replace_swapped_aligned_load): Likewise.
25963         (replace_swapped_load_constant): Capitalize argument name in
25964         comment describing this function.
25965         (rs6000_analyze_swaps): Add a third pass to search for vector loads
25966         and stores that access quad-word aligned addresses and replace
25967         with stvx or lvx instructions when appropriate.
25968         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25969         New function prototype.
25970         (rs6000_quadword_masked_address_p): Likewise.
25971         (rs6000_gen_lvx): Likewise.
25972         (rs6000_gen_stvx): Likewise.
25973         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25974         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25975         when memory address is aligned.
25976         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25977         this split to select lvx instruction when memory address is aligned.
25978         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25979         instruction when memory address is aligned.
25980         (*vsx_le_perm_load_v16qi): Likewise.
25981         (four unnamed splitters): Modify to select the stvx instruction
25982         when memory is aligned.
25984 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
25986         * predict.c (determine_unlikely_bbs): Handle correctly BBs
25987         which appears in the queue multiple times.
25989 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25990             Alan Hayward  <alan.hayward@arm.com>
25991             David Sherwood  <david.sherwood@arm.com>
25993         * tree-vectorizer.h (vec_lower_bound): New structure.
25994         (_loop_vec_info): Add check_nonzero and lower_bounds.
25995         (LOOP_VINFO_CHECK_NONZERO): New macro.
25996         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25997         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25998         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25999         fields.  Make seg_len the distance travelled, not including the
26000         access size.
26001         (dr_direction_indicator): Declare.
26002         (dr_zero_step_indicator): Likewise.
26003         (dr_known_forward_stride_p): Likewise.
26004         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
26005         tree-ssanames.h.
26006         (runtime_alias_check_p): Allow runtime alias checks with
26007         variable strides.
26008         (operator ==): Compare access_size and align.
26009         (prune_runtime_alias_test_list): Rework for new distinction between
26010         the access_size and seg_len.
26011         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
26012         segment lengths.
26013         (get_segment_min_max): New function.
26014         (create_intersect_range_checks): Use it.
26015         (dr_step_indicator): New function.
26016         (dr_direction_indicator): Likewise.
26017         (dr_zero_step_indicator): Likewise.
26018         (dr_known_forward_stride_p): Likewise.
26019         * tree-loop-distribution.c (data_ref_segment_size): Return
26020         DR_STEP * (niters - 1).
26021         (compute_alias_check_pairs): Update call to the dr_with_seg_len
26022         constructor.
26023         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
26024         (vect_preserves_scalar_order_p): New function, split out from...
26025         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
26026         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
26027         (vect_vfa_access_size): New function.
26028         (vect_vfa_align): Likewise.
26029         (vect_compile_time_alias): Take access_size_a and access_b arguments.
26030         (dump_lower_bound): New function.
26031         (vect_check_lower_bound): Likewise.
26032         (vect_small_gap_p): Likewise.
26033         (vectorizable_with_step_bound_p): Likewise.
26034         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
26035         depencies if the vectorization factor is 1.  Convert the checks
26036         for nonzero steps into checks on the bounds of DR_STEP.  Try using
26037         a bunds check for variable steps if the minimum required step is
26038         relatively small. Update calls to the dr_with_seg_len
26039         constructor and to vect_compile_time_alias.
26040         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
26041         function.
26042         (vect_loop_versioning): Call it.
26043         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
26044         when retrying.
26045         (vect_estimate_min_profitable_iters): Account for any bounds checks.
26047 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26048             Alan Hayward  <alan.hayward@arm.com>
26049             David Sherwood  <david.sherwood@arm.com>
26051         * doc/sourcebuild.texi (vect_scatter_store): Document.
26052         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
26053         optabs.
26054         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
26055         Document.
26056         * genopinit.c (main): Add supports_vec_scatter_store and
26057         supports_vec_scatter_store_cached to target_optabs.
26058         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
26059         IFN_MASK_SCATTER_STORE.
26060         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
26061         functions.
26062         * internal-fn.h (internal_store_fn_p): Declare.
26063         (internal_fn_stored_value_index): Likewise.
26064         * internal-fn.c (scatter_store_direct): New macro.
26065         (expand_scatter_store_optab_fn): New function.
26066         (direct_scatter_store_optab_supported_p): New macro.
26067         (internal_store_fn_p): New function.
26068         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
26069         IFN_MASK_SCATTER_STORE.
26070         (internal_fn_mask_index): Likewise.
26071         (internal_fn_stored_value_index): New function.
26072         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
26073         for scatter stores.
26074         * optabs-query.h (supports_vec_scatter_store_p): Declare.
26075         * optabs-query.c (supports_vec_scatter_store_p): New function.
26076         * tree-vectorizer.h (vect_get_store_rhs): Declare.
26077         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
26078         true for scatter stores.
26079         (vect_gather_scatter_fn_p): Handle scatter stores too.
26080         (vect_check_gather_scatter): Consider using scatter stores if
26081         supports_vec_scatter_store_p.
26082         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
26083         scatter stores too.
26084         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26085         internal_fn_stored_value_index.
26086         (check_load_store_masking): Handle scatter stores too.
26087         (vect_get_store_rhs): Make public.
26088         (vectorizable_call): Use internal_store_fn_p.
26089         (vectorizable_store): Handle scatter store internal functions.
26090         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
26091         when deciding whether the end of the group has been reached.
26092         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
26093         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
26094         (mask_scatter_store<mode>): New insns.
26096 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26097             Alan Hayward  <alan.hayward@arm.com>
26098             David Sherwood  <david.sherwood@arm.com>
26100         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
26101         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
26102         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
26103         function.
26104         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
26105         Use vect_truncate_gather_scatter_offset if we can't treat the
26106         operation as a normal gather load or scatter store.
26107         (get_group_load_store_type): Take the gather_scatter_info
26108         as argument.  Try using a gather load or scatter store for
26109         single-element groups.
26110         (get_load_store_type): Update calls to get_group_load_store_type
26111         and vect_use_strided_gather_scatters_p.
26113 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26114             Alan Hayward  <alan.hayward@arm.com>
26115             David Sherwood  <david.sherwood@arm.com>
26117         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
26118         optional tree argument.
26119         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
26120         null target hooks.
26121         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
26122         but continue to use the current value as a fallback.
26123         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
26124         to compare the updates.
26125         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
26126         (get_load_store_type): Use it when handling a strided access.
26127         (vect_get_strided_load_store_ops): New function.
26128         (vect_get_data_ptr_increment): Likewise.
26129         (vectorizable_load): Handle strided gather loads.  Always pass
26130         a step to vect_create_data_ref_ptr and bump_vector_ptr.
26132 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26133             Alan Hayward  <alan.hayward@arm.com>
26134             David Sherwood  <david.sherwood@arm.com>
26136         * doc/md.texi (gather_load@var{m}): Document.
26137         (mask_gather_load@var{m}): Likewise.
26138         * genopinit.c (main): Add supports_vec_gather_load and
26139         supports_vec_gather_load_cached to target_optabs.
26140         * optabs-tree.c (init_tree_optimization_optabs): Use
26141         ggc_cleared_alloc to allocate target_optabs.
26142         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
26143         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
26144         functions.
26145         * internal-fn.h (internal_load_fn_p): Declare.
26146         (internal_gather_scatter_fn_p): Likewise.
26147         (internal_fn_mask_index): Likewise.
26148         (internal_gather_scatter_fn_supported_p): Likewise.
26149         * internal-fn.c (gather_load_direct): New macro.
26150         (expand_gather_load_optab_fn): New function.
26151         (direct_gather_load_optab_supported_p): New macro.
26152         (direct_internal_fn_optab): New function.
26153         (internal_load_fn_p): Likewise.
26154         (internal_gather_scatter_fn_p): Likewise.
26155         (internal_fn_mask_index): Likewise.
26156         (internal_gather_scatter_fn_supported_p): Likewise.
26157         * optabs-query.c (supports_at_least_one_mode_p): New function.
26158         (supports_vec_gather_load_p): Likewise.
26159         * optabs-query.h (supports_vec_gather_load_p): Declare.
26160         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
26161         and memory_type field.
26162         (NUM_PATTERNS): Bump to 15.
26163         * tree-vect-data-refs.c: Include internal-fn.h.
26164         (vect_gather_scatter_fn_p): New function.
26165         (vect_describe_gather_scatter_call): Likewise.
26166         (vect_check_gather_scatter): Try using internal functions for
26167         gather loads.  Recognize existing calls to a gather load function.
26168         (vect_analyze_data_refs): Consider using gather loads if
26169         supports_vec_gather_load_p.
26170         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
26171         (vect_get_gather_scatter_offset_type): Likewise.
26172         (vect_convert_mask_for_vectype): Likewise.
26173         (vect_add_conversion_to_patterm): Likewise.
26174         (vect_try_gather_scatter_pattern): Likewise.
26175         (vect_recog_gather_scatter_pattern): New pattern recognizer.
26176         (vect_vect_recog_func_ptrs): Add it.
26177         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26178         internal_fn_mask_index and internal_gather_scatter_fn_p.
26179         (check_load_store_masking): Take the gather_scatter_info as an
26180         argument and handle gather loads.
26181         (vect_get_gather_scatter_ops): New function.
26182         (vectorizable_call): Check internal_load_fn_p.
26183         (vectorizable_load): Likewise.  Handle gather load internal
26184         functions.
26185         (vectorizable_store): Update call to check_load_store_masking.
26186         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
26187         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
26188         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
26189         (aarch64_gather_scale_operand_d): New predicates.
26190         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
26191         (mask_gather_load<mode>): New insns.
26193 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26194             Alan Hayward  <alan.hayward@arm.com>
26195             David Sherwood  <david.sherwood@arm.com>
26197         * optabs.def (fold_left_plus_optab): New optab.
26198         * doc/md.texi (fold_left_plus_@var{m}): Document.
26199         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
26200         * internal-fn.c (fold_left_direct): Define.
26201         (expand_fold_left_optab_fn): Likewise.
26202         (direct_fold_left_optab_supported_p): Likewise.
26203         * fold-const-call.c (fold_const_fold_left): New function.
26204         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
26205         * tree-parloops.c (valid_reduction_p): New function.
26206         (gather_scalar_reductions): Use it.
26207         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
26208         (vect_finish_replace_stmt): Declare.
26209         * tree-vect-loop.c (fold_left_reduction_fn): New function.
26210         (needs_fold_left_reduction_p): New function, split out from...
26211         (vect_is_simple_reduction): ...here.  Accept reductions that
26212         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
26213         (vect_force_simple_reduction): Also store the reduction type in
26214         the assignment's STMT_VINFO_REDUC_TYPE.
26215         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
26216         (merge_with_identity): New function.
26217         (vect_expand_fold_left): Likewise.
26218         (vectorize_fold_left_reduction): Likewise.
26219         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
26220         scalar phi in place for it.  Check for target support and reject
26221         cases that would reassociate the operation.  Defer the transform
26222         phase to vectorize_fold_left_reduction.
26223         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
26224         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
26225         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
26227 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26229         * tree-if-conv.c (predicate_mem_writes): Remove redundant
26230         call to ifc_temp_var.
26232 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26233             Alan Hayward  <alan.hayward@arm.com>
26234             David Sherwood  <david.sherwood@arm.com>
26236         * target.def (legitimize_address_displacement): Take the original
26237         offset as a poly_int.
26238         * targhooks.h (default_legitimize_address_displacement): Update
26239         accordingly.
26240         * targhooks.c (default_legitimize_address_displacement): Likewise.
26241         * doc/tm.texi: Regenerate.
26242         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
26243         as an argument, moving assert of ad->disp == ad->disp_term to...
26244         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
26245         Try calling targetm.legitimize_address_displacement before expanding
26246         the address rather than afterwards, and adjust for the new interface.
26247         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
26248         Match the new hook interface.  Handle SVE addresses.
26249         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
26250         new hook interface.
26252 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26254         * Makefile.in (OBJS): Add early-remat.o.
26255         * target.def (select_early_remat_modes): New hook.
26256         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
26257         * doc/tm.texi: Regenerate.
26258         * targhooks.h (default_select_early_remat_modes): Declare.
26259         * targhooks.c (default_select_early_remat_modes): New function.
26260         * timevar.def (TV_EARLY_REMAT): New timevar.
26261         * passes.def (pass_early_remat): New pass.
26262         * tree-pass.h (make_pass_early_remat): Declare.
26263         * early-remat.c: New file.
26264         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
26265         function.
26266         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
26268 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26269             Alan Hayward  <alan.hayward@arm.com>
26270             David Sherwood  <david.sherwood@arm.com>
26272         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
26273         vfm1 with a bound_epilog parameter.
26274         (vect_do_peeling): Update calls accordingly, and move the prologue
26275         call earlier in the function.  Treat the base bound_epilog as 0 for
26276         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
26277         this base when peeling for gaps.
26278         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
26279         with fully-masked loops.
26280         (vect_estimate_min_profitable_iters): Handle the single peeled
26281         iteration in that case.
26283 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26284             Alan Hayward  <alan.hayward@arm.com>
26285             David Sherwood  <david.sherwood@arm.com>
26287         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26288         single-element interleaving even if the size is not a power of 2.
26289         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26290         accesses for single-element interleaving if the group size is
26291         not a power of 2.
26293 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26294             Alan Hayward  <alan.hayward@arm.com>
26295             David Sherwood  <david.sherwood@arm.com>
26297         * doc/md.texi (fold_extract_last_@var{m}): Document.
26298         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26299         * optabs.def (fold_extract_last_optab): New optab.
26300         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26301         * internal-fn.c (fold_extract_direct): New macro.
26302         (expand_fold_extract_optab_fn): Likewise.
26303         (direct_fold_extract_optab_supported_p): Likewise.
26304         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26305         * tree-vect-loop.c (vect_model_reduction_cost): Handle
26306         EXTRACT_LAST_REDUCTION.
26307         (get_initial_def_for_reduction): Do not create an initial vector
26308         for EXTRACT_LAST_REDUCTION reductions.
26309         (vectorizable_reduction): Leave the scalar phi in place for
26310         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
26311         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
26312         epilogue code for EXTRACT_LAST_REDUCTION and defer the
26313         transform phase to vectorizable_condition.
26314         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26315         split out from...
26316         (vect_finish_stmt_generation): ...here.
26317         (vect_finish_replace_stmt): New function.
26318         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26319         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26320         pattern.
26321         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
26323 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26324             Alan Hayward  <alan.hayward@arm.com>
26325             David Sherwood  <david.sherwood@arm.com>
26327         * doc/md.texi (extract_last_@var{m}): Document.
26328         * optabs.def (extract_last_optab): New optab.
26329         * internal-fn.def (EXTRACT_LAST): New internal function.
26330         * internal-fn.c (cond_unary_direct): New macro.
26331         (expand_cond_unary_optab_fn): Likewise.
26332         (direct_cond_unary_optab_supported_p): Likewise.
26333         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26334         loops using EXTRACT_LAST.
26335         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26336         (extract_last_<mode>): ...this optab.
26337         (vec_extract<mode><Vel>): Update accordingly.
26339 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26340             Alan Hayward  <alan.hayward@arm.com>
26341             David Sherwood  <david.sherwood@arm.com>
26343         * target.def (empty_mask_is_expensive): New hook.
26344         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26345         * doc/tm.texi: Regenerate.
26346         * targhooks.h (default_empty_mask_is_expensive): Declare.
26347         * targhooks.c (default_empty_mask_is_expensive): New function.
26348         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26349         if the target says that empty masks are expensive.
26350         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26351         New function.
26352         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26354 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26355             Alan Hayward  <alan.hayward@arm.com>
26356             David Sherwood  <david.sherwood@arm.com>
26358         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26359         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26360         (vect_use_loop_mask_for_alignment_p): New function.
26361         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26362         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26363         niters_skip argument.  Make sure that the first niters_skip elements
26364         of the first iteration are inactive.
26365         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26366         Update call to vect_set_loop_masks_directly.
26367         (get_misalign_in_elems): New function, split out from...
26368         (vect_gen_prolog_loop_niters): ...here.
26369         (vect_update_init_of_dr): Take a code argument that specifies whether
26370         the adjustment should be added or subtracted.
26371         (vect_update_init_of_drs): Likewise.
26372         (vect_prepare_for_masked_peels): New function.
26373         (vect_do_peeling): Skip prologue peeling if we're using a mask
26374         instead.  Update call to vect_update_inits_of_drs.
26375         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26376         mask_skip_niters.
26377         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26378         alignment.  Do not include the number of peeled iterations in
26379         the minimum threshold in that case.
26380         (vectorizable_induction): Adjust the start value down by
26381         LOOP_VINFO_MASK_SKIP_NITERS iterations.
26382         (vect_transform_loop): Call vect_prepare_for_masked_peels.
26383         Take the number of skipped iterations into account when calculating
26384         the loop bounds.
26385         * tree-vect-stmts.c (vect_gen_while_not): New function.
26387 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26388             Alan Hayward  <alan.hayward@arm.com>
26389             David Sherwood  <david.sherwood@arm.com>
26391         * doc/sourcebuild.texi (vect_fully_masked): Document.
26392         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26393         default value to 0.
26394         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26395         split out from...
26396         (vect_analyze_loop_2): ...here. Don't check the vectorization
26397         factor against the number of loop iterations if the loop is
26398         fully-masked.
26400 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26401             Alan Hayward  <alan.hayward@arm.com>
26402             David Sherwood  <david.sherwood@arm.com>
26404         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26405         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26406         (dump_groups): Update accordingly.
26407         (iv_use::mem_type): New member variable.
26408         (address_p): New function.
26409         (record_use): Add a mem_type argument and initialize the new
26410         mem_type field.
26411         (record_group_use): Add a mem_type argument.  Use address_p.
26412         Remove obsolete null checks of base_object.  Update call to record_use.
26413         (find_interesting_uses_op): Update call to record_group_use.
26414         (find_interesting_uses_cond): Likewise.
26415         (find_interesting_uses_address): Likewise.
26416         (get_mem_type_for_internal_fn): New function.
26417         (find_address_like_use): Likewise.
26418         (find_interesting_uses_stmt): Try find_address_like_use before
26419         calling find_interesting_uses_op.
26420         (addr_offset_valid_p): Use the iv mem_type field as the type
26421         of the addressed memory.
26422         (add_autoinc_candidates): Likewise.
26423         (get_address_cost): Likewise.
26424         (split_small_address_groups_p): Use address_p.
26425         (split_address_groups): Likewise.
26426         (add_iv_candidate_for_use): Likewise.
26427         (autoinc_possible_for_pair): Likewise.
26428         (rewrite_groups): Likewise.
26429         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26430         (determine_group_iv_cost): Update after split of USE_ADDRESS.
26431         (get_alias_ptr_type_for_ptr_address): New function.
26432         (rewrite_use_address): Rewrite address uses in calls that were
26433         identified by find_address_like_use.
26435 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26436             Alan Hayward  <alan.hayward@arm.com>
26437             David Sherwood  <david.sherwood@arm.com>
26439         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26440         TARGET_MEM_REFs.
26441         * gimple-expr.h (is_gimple_addressable: Likewise.
26442         * gimple-expr.c (is_gimple_address): Likewise.
26443         * internal-fn.c (expand_call_mem_ref): New function.
26444         (expand_mask_load_optab_fn): Use it.
26445         (expand_mask_store_optab_fn): Likewise.
26447 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26448             Alan Hayward  <alan.hayward@arm.com>
26449             David Sherwood  <david.sherwood@arm.com>
26451         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26452         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26453         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26454         (cond_umax@var{mode}): Document.
26455         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26456         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26457         (cond_umin_optab, cond_umax_optab): New optabs.
26458         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26459         (COND_IOR, COND_XOR): New internal functions.
26460         * internal-fn.h (get_conditional_internal_fn): Declare.
26461         * internal-fn.c (cond_binary_direct): New macro.
26462         (expand_cond_binary_optab_fn): Likewise.
26463         (direct_cond_binary_optab_supported_p): Likewise.
26464         (get_conditional_internal_fn): New function.
26465         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26466         Cope with reduction statements that are vectorized as calls rather
26467         than assignments.
26468         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26469         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26470         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26471         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26472         (UNSPEC_COND_EOR): New unspecs.
26473         (optab): Add mappings for them.
26474         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26475         (sve_int_op, sve_fp_op): New int attributes.
26477 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26478             Alan Hayward  <alan.hayward@arm.com>
26479             David Sherwood  <david.sherwood@arm.com>
26481         * optabs.def (while_ult_optab): New optab.
26482         * doc/md.texi (while_ult@var{m}@var{n}): Document.
26483         * internal-fn.def (WHILE_ULT): New internal function.
26484         * internal-fn.h (direct_internal_fn_supported_p): New override
26485         that takes two types as argument.
26486         * internal-fn.c (while_direct): New macro.
26487         (expand_while_optab_fn): New function.
26488         (convert_optab_supported_p): Likewise.
26489         (direct_while_optab_supported_p): New macro.
26490         * wide-int.h (wi::udiv_ceil): New function.
26491         * tree-vectorizer.h (rgroup_masks): New structure.
26492         (vec_loop_masks): New typedef.
26493         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26494         and fully_masked_p.
26495         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26496         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26497         (vect_max_vf): New function.
26498         (slpeel_make_loop_iterate_ntimes): Delete.
26499         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26500         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26501         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26502         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26503         internal-fn.h, stor-layout.h and optabs-query.h.
26504         (vect_set_loop_mask): New function.
26505         (add_preheader_seq): Likewise.
26506         (add_header_seq): Likewise.
26507         (interleave_supported_p): Likewise.
26508         (vect_maybe_permute_loop_masks): Likewise.
26509         (vect_set_loop_masks_directly): Likewise.
26510         (vect_set_loop_condition_masked): Likewise.
26511         (vect_set_loop_condition_unmasked): New function, split out from
26512         slpeel_make_loop_iterate_ntimes.
26513         (slpeel_make_loop_iterate_ntimes): Rename to..
26514         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
26515         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26516         (vect_do_peeling): Update call accordingly.
26517         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26518         loops.
26519         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26520         mask_compare_type, can_fully_mask_p and fully_masked_p.
26521         (release_vec_loop_masks): New function.
26522         (_loop_vec_info): Use it to free the loop masks.
26523         (can_produce_all_loop_masks_p): New function.
26524         (vect_get_max_nscalars_per_iter): Likewise.
26525         (vect_verify_full_masking): Likewise.
26526         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26527         retries, and free the mask rgroups before retrying.  Check loop-wide
26528         reasons for disallowing fully-masked loops.  Make the final decision
26529         about whether use a fully-masked loop or not.
26530         (vect_estimate_min_profitable_iters): Do not assume that peeling
26531         for the number of iterations will be needed for fully-masked loops.
26532         (vectorizable_reduction): Disable fully-masked loops.
26533         (vectorizable_live_operation): Likewise.
26534         (vect_halve_mask_nunits): New function.
26535         (vect_double_mask_nunits): Likewise.
26536         (vect_record_loop_mask): Likewise.
26537         (vect_get_loop_mask): Likewise.
26538         (vect_transform_loop): Handle the case in which the final loop
26539         iteration might handle a partial vector.  Call vect_set_loop_condition
26540         instead of slpeel_make_loop_iterate_ntimes.
26541         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26542         (check_load_store_masking): New function.
26543         (prepare_load_store_mask): Likewise.
26544         (vectorizable_store): Handle fully-masked loops.
26545         (vectorizable_load): Likewise.
26546         (supportable_widening_operation): Use vect_halve_mask_nunits for
26547         booleans.
26548         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26549         (vect_gen_while): New function.
26550         * config/aarch64/aarch64.md (umax<mode>3): New expander.
26551         (aarch64_uqdec<mode>): New insn.
26553 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26554             Alan Hayward  <alan.hayward@arm.com>
26555             David Sherwood  <david.sherwood@arm.com>
26557         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26558         (reduc_xor_scal_optab): New optabs.
26559         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26560         (reduc_xor_scal_@var{m}): Document.
26561         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26562         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26563         internal functions.
26564         * fold-const-call.c (fold_const_call): Handle them.
26565         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26566         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26567         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26568         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26569         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26570         (UNSPEC_XORV): New unspecs.
26571         (optab): Add entries for them.
26572         (BITWISEV): New int iterator.
26573         (bit_reduc_op): New int attributes.
26575 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26576             Alan Hayward  <alan.hayward@arm.com>
26577             David Sherwood  <david.sherwood@arm.com>
26579         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26580         * internal-fn.def (VEC_SHL_INSERT): New internal function.
26581         * optabs.def (vec_shl_insert_optab): New optab.
26582         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26583         (duplicate_and_interleave): Likewise.
26584         * tree-vect-loop.c: Include internal-fn.h.
26585         (neutral_op_for_slp_reduction): New function, split out from
26586         get_initial_defs_for_reduction.
26587         (get_initial_def_for_reduction): Handle option 2 for variable-length
26588         vectors by loading the neutral value into a vector and then shifting
26589         the initial value into element 0.
26590         (get_initial_defs_for_reduction): Replace the code argument with
26591         the neutral value calculated by neutral_op_for_slp_reduction.
26592         Use gimple_build_vector for constant-length vectors.
26593         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26594         but the first group_size elements have a neutral value.
26595         Use duplicate_and_interleave otherwise.
26596         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26597         Update call to get_initial_defs_for_reduction.  Handle SLP
26598         reductions for variable-length vectors by creating one vector
26599         result for each scalar result, with the elements associated
26600         with other scalar results stubbed out with the neutral value.
26601         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26602         Require IFN_VEC_SHL_INSERT for double reductions on
26603         variable-length vectors, or SLP reductions that have
26604         a neutral value.  Require can_duplicate_and_interleave_p
26605         support for variable-length unchained SLP reductions if there
26606         is no neutral value, such as for MIN/MAX reductions.  Also require
26607         the number of vector elements to be a multiple of the number of
26608         SLP statements when doing variable-length unchained SLP reductions.
26609         Update call to vect_create_epilog_for_reduction.
26610         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26611         and remove initial values.
26612         (duplicate_and_interleave): Make public.
26613         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26614         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26616 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26617             Alan Hayward  <alan.hayward@arm.com>
26618             David Sherwood  <david.sherwood@arm.com>
26620         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26621         (can_duplicate_and_interleave_p): New function.
26622         (vect_get_and_check_slp_defs): Take the vector of statements
26623         rather than just the current one.  Remove excess parentheses.
26624         Restriction rejectinon of vect_constant_def and vect_external_def
26625         for variable-length vectors to boolean types, or types for which
26626         can_duplicate_and_interleave_p is false.
26627         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26628         (duplicate_and_interleave): New function.
26629         (vect_get_constant_vectors): Use gimple_build_vector for
26630         constant-length vectors and suitable variable-length constant
26631         vectors.  Use duplicate_and_interleave for other variable-length
26632         vectors.  Don't defer the update when inserting new statements.
26634 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26635             Alan Hayward  <alan.hayward@arm.com>
26636             David Sherwood  <david.sherwood@arm.com>
26638         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26639         min_profitable_iters doesn't go negative.
26641 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26642             Alan Hayward  <alan.hayward@arm.com>
26643             David Sherwood  <david.sherwood@arm.com>
26645         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26646         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26647         * optabs.def (vec_mask_load_lanes_optab): New optab.
26648         (vec_mask_store_lanes_optab): Likewise.
26649         * internal-fn.def (MASK_LOAD_LANES): New internal function.
26650         (MASK_STORE_LANES): Likewise.
26651         * internal-fn.c (mask_load_lanes_direct): New macro.
26652         (mask_store_lanes_direct): Likewise.
26653         (expand_mask_load_optab_fn): Handle masked operations.
26654         (expand_mask_load_lanes_optab_fn): New macro.
26655         (expand_mask_store_optab_fn): Handle masked operations.
26656         (expand_mask_store_lanes_optab_fn): New macro.
26657         (direct_mask_load_lanes_optab_supported_p): Likewise.
26658         (direct_mask_store_lanes_optab_supported_p): Likewise.
26659         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26660         parameter.
26661         (vect_load_lanes_supported): Likewise.
26662         * tree-vect-data-refs.c (strip_conversion): New function.
26663         (can_group_stmts_p): Likewise.
26664         (vect_analyze_data_ref_accesses): Use it instead of checking
26665         for a pair of assignments.
26666         (vect_store_lanes_supported): Take a masked_p parameter.
26667         (vect_load_lanes_supported): Likewise.
26668         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26669         vect_store_lanes_supported and vect_load_lanes_supported.
26670         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26671         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26672         parameter.  Don't allow gaps for masked accesses.
26673         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
26674         and vect_load_lanes_supported.
26675         (get_load_store_type): Take a masked_p parameter and update
26676         call to get_group_load_store_type.
26677         (vectorizable_store): Update call to get_load_store_type.
26678         Handle IFN_MASK_STORE_LANES.
26679         (vectorizable_load): Update call to get_load_store_type.
26680         Handle IFN_MASK_LOAD_LANES.
26682 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26683             Alan Hayward  <alan.hayward@arm.com>
26684             David Sherwood  <david.sherwood@arm.com>
26686         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26687         modes for SVE.
26688         * config/aarch64/aarch64-protos.h
26689         (aarch64_sve_struct_memory_operand_p): Declare.
26690         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26691         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26692         (VPRED, vpred): Handle SVE structure modes.
26693         * config/aarch64/constraints.md (Utx): New constraint.
26694         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26695         (aarch64_sve_struct_nonimmediate_operand): New predicates.
26696         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26697         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26698         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26699         structure modes.  Split into pieces after RA.
26700         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26701         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26702         New patterns.
26703         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26704         SVE structure modes.
26705         (aarch64_classify_address): Likewise.
26706         (sizetochar): Move earlier in file.
26707         (aarch64_print_operand): Handle SVE register lists.
26708         (aarch64_array_mode): New function.
26709         (aarch64_sve_struct_memory_operand_p): Likewise.
26710         (TARGET_ARRAY_MODE): Redefine.
26712 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26713             Alan Hayward  <alan.hayward@arm.com>
26714             David Sherwood  <david.sherwood@arm.com>
26716         * target.def (array_mode): New target hook.
26717         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26718         * doc/tm.texi: Regenerate.
26719         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26720         * hooks.c (hook_optmode_mode_uhwi_none): New function.
26721         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26722         targetm.array_mode.
26723         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
26724         type sizes.
26726 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26727             Alan Hayward  <alan.hayward@arm.com>
26728             David Sherwood  <david.sherwood@arm.com>
26730         * fold-const.c (fold_binary_loc): Check the argument types
26731         rather than the result type when testing for a vector operation.
26733 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26735         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26736         * doc/tm.texi: Regenerate.
26738 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26739             Alan Hayward  <alan.hayward@arm.com>
26740             David Sherwood  <david.sherwood@arm.com>
26742         * doc/invoke.texi (-msve-vector-bits=): Document new option.
26743         (sve): Document new AArch64 extension.
26744         * doc/md.texi (w): Extend the description of the AArch64
26745         constraint to include SVE vectors.
26746         (Upl, Upa): Document new AArch64 predicate constraints.
26747         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26748         enum.
26749         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26750         (msve-vector-bits=): New option.
26751         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26752         SVE when these are disabled.
26753         (sve): New extension.
26754         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26755         modes.  Adjust their number of units based on aarch64_sve_vg.
26756         (MAX_BITSIZE_MODE_ANY_MODE): Define.
26757         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26758         aarch64_addr_query_type.
26759         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26760         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26761         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26762         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26763         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26764         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26765         (aarch64_simd_imm_zero_p): Delete.
26766         (aarch64_check_zero_based_sve_index_immediate): Declare.
26767         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26768         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26769         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26770         (aarch64_sve_float_mul_immediate_p): Likewise.
26771         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26772         rather than an rtx.
26773         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26774         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26775         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26776         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26777         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26778         (aarch64_regmode_natural_size): Likewise.
26779         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26780         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26781         left one place.
26782         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26783         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26784         for VG and the SVE predicate registers.
26785         (V_ALIASES): Add a "z"-prefixed alias.
26786         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26787         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26788         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26789         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26790         (REG_CLASS_NAMES): Add entries for them.
26791         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
26792         and the predicate registers.
26793         (aarch64_sve_vg): Declare.
26794         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26795         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26796         (REGMODE_NATURAL_SIZE): Define.
26797         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26798         SVE macros.
26799         * config/aarch64/aarch64.c: Include cfgrtl.h.
26800         (simd_immediate_info): Add a constructor for series vectors,
26801         and an associated step field.
26802         (aarch64_sve_vg): New variable.
26803         (aarch64_dbx_register_number): Handle VG and the predicate registers.
26804         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26805         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26806         (VEC_ANY_DATA, VEC_STRUCT): New constants.
26807         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26808         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26809         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26810         (aarch64_get_mask_mode): New functions.
26811         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26812         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26813         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
26814         predicate modes and predicate registers.  Explicitly restrict
26815         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
26816         to store a vector mode if it is recognized by
26817         aarch64_classify_vector_mode.
26818         (aarch64_regmode_natural_size): New function.
26819         (aarch64_hard_regno_caller_save_mode): Return the original mode
26820         for predicates.
26821         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26822         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26823         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26824         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26825         functions.
26826         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
26827         does not overlap dest if the function is frame-related.  Handle
26828         SVE constants.
26829         (aarch64_split_add_offset): New function.
26830         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26831         them aarch64_add_offset.
26832         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26833         and update call to aarch64_sub_sp.
26834         (aarch64_add_cfa_expression): New function.
26835         (aarch64_expand_prologue): Pass extra temporary registers to the
26836         functions above.  Handle the case in which we need to emit new
26837         DW_CFA_expressions for registers that were originally saved
26838         relative to the stack pointer, but now have to be expressed
26839         relative to the frame pointer.
26840         (aarch64_output_mi_thunk): Pass extra temporary registers to the
26841         functions above.
26842         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
26843         IP0 and IP1 values for SVE frames.
26844         (aarch64_expand_vec_series): New function.
26845         (aarch64_expand_sve_widened_duplicate): Likewise.
26846         (aarch64_expand_sve_const_vector): Likewise.
26847         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26848         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
26849         into the register, rather than emitting a SET directly.
26850         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26851         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26852         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26853         (offset_9bit_signed_scaled_p): New functions.
26854         (aarch64_replicate_bitmask_imm): New function.
26855         (aarch64_bitmask_imm): Use it.
26856         (aarch64_cannot_force_const_mem): Reject expressions involving
26857         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
26858         (aarch64_classify_index): Handle SVE indices, by requiring
26859         a plain register index with a scale that matches the element size.
26860         (aarch64_classify_address): Handle SVE addresses.  Assert that
26861         the mode of the address is VOIDmode or an integer mode.
26862         Update call to aarch64_classify_symbol.
26863         (aarch64_classify_symbolic_expression): Update call to
26864         aarch64_classify_symbol.
26865         (aarch64_const_vec_all_in_range_p): New function.
26866         (aarch64_print_vector_float_operand): Likewise.
26867         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
26868         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
26869         and the FP immediates 1.0 and 0.5.
26870         (aarch64_print_address_internal): Handle SVE addresses.
26871         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26872         (aarch64_regno_regclass): Handle predicate registers.
26873         (aarch64_secondary_reload): Handle big-endian reloads of SVE
26874         data modes.
26875         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26876         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26877         (aarch64_convert_sve_vector_bits): New function.
26878         (aarch64_override_options): Use it to handle -msve-vector-bits=.
26879         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26880         rather than an rtx.
26881         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26882         Handle SVE vector and predicate modes.  Accept VL-based constants
26883         that need only one temporary register, and VL offsets that require
26884         no temporary registers.
26885         (aarch64_conditional_register_usage): Mark the predicate registers
26886         as fixed if SVE isn't available.
26887         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26888         Return true for SVE vector and predicate modes.
26889         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26890         rather than an unsigned int.  Handle SVE modes.
26891         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
26892         SVE modes.
26893         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26894         if SVE is enabled.
26895         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26896         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26897         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26898         (aarch64_sve_float_mul_immediate_p): New functions.
26899         (aarch64_sve_valid_immediate): New function.
26900         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26901         Explicitly reject structure modes.  Check for INDEX constants.
26902         Handle PTRUE and PFALSE constants.
26903         (aarch64_check_zero_based_sve_index_immediate): New function.
26904         (aarch64_simd_imm_zero_p): Delete.
26905         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26906         vector modes.  Accept constants in the range of CNT[BHWD].
26907         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26908         ask for an Advanced SIMD mode.
26909         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26910         (aarch64_simd_vector_alignment): Handle SVE predicates.
26911         (aarch64_vectorize_preferred_vector_alignment): New function.
26912         (aarch64_simd_vector_alignment_reachable): Use it instead of
26913         the vector size.
26914         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26915         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26916         functions.
26917         (MAX_VECT_LEN): Delete.
26918         (expand_vec_perm_d): Add a vec_flags field.
26919         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26920         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26921         (aarch64_evpc_ext): Don't apply a big-endian lane correction
26922         for SVE modes.
26923         (aarch64_evpc_rev): Rename to...
26924         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
26925         (aarch64_evpc_rev_global): New function.
26926         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26927         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26928         MAX_VECT_LEN.
26929         (aarch64_evpc_sve_tbl): New function.
26930         (aarch64_expand_vec_perm_const_1): Update after rename of
26931         aarch64_evpc_rev.  Handle SVE permutes too, trying
26932         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26933         than aarch64_evpc_tbl.
26934         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26935         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26936         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26937         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26938         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26939         (aarch64_expand_sve_vcond): New functions.
26940         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26941         of aarch64_vector_mode_p.
26942         (aarch64_dwarf_poly_indeterminate_value): New function.
26943         (aarch64_compute_pressure_classes): Likewise.
26944         (aarch64_can_change_mode_class): Likewise.
26945         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26946         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26947         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26948         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26949         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26950         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26951         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26952         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26953         constraints.
26954         (Dn, Dl, Dr): Accept const as well as const_vector.
26955         (Dz): Likewise.  Compare against CONST0_RTX.
26956         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26957         of "vector" where appropriate.
26958         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26959         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26960         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26961         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26962         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26963         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26964         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26965         (v_int_equiv): Extend to SVE modes.
26966         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26967         mode attributes.
26968         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26969         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26970         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26971         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26972         (SVE_COND_FP_CMP): New int iterators.
26973         (perm_hilo): Handle the new unpack unspecs.
26974         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26975         attributes.
26976         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26977         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26978         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26979         (aarch64_equality_operator, aarch64_constant_vector_operand)
26980         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26981         (aarch64_sve_nonimmediate_operand): Likewise.
26982         (aarch64_sve_general_operand): Likewise.
26983         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26984         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26985         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26986         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26987         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26988         (aarch64_sve_float_arith_immediate): Likewise.
26989         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26990         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26991         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26992         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26993         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26994         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26995         (aarch64_sve_float_arith_operand): Likewise.
26996         (aarch64_sve_float_arith_with_sub_operand): Likewise.
26997         (aarch64_sve_float_mul_operand): Likewise.
26998         (aarch64_sve_vec_perm_operand): Likewise.
26999         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
27000         (aarch64_mov_operand): Accept const_poly_int and const_vector.
27001         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
27002         as well as const_vector.
27003         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
27004         in file.  Use CONST0_RTX and CONSTM1_RTX.
27005         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
27006         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
27007         Use aarch64_simd_imm_zero.
27008         * config/aarch64/aarch64-sve.md: New file.
27009         * config/aarch64/aarch64.md: Include it.
27010         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
27011         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
27012         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
27013         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
27014         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
27015         (sve): New attribute.
27016         (enabled): Disable instructions with the sve attribute unless
27017         TARGET_SVE.
27018         (movqi, movhi): Pass CONST_POLY_INT operaneds through
27019         aarch64_expand_mov_immediate.
27020         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
27021         CNT[BHSD] immediates.
27022         (movti): Split CONST_POLY_INT moves into two halves.
27023         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
27024         Split additions that need a temporary here if the destination
27025         is the stack pointer.
27026         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
27027         (*add<mode>3_poly_1): New instruction.
27028         (set_clobber_cc): New expander.
27030 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27032         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
27033         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
27034         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
27035         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
27036         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
27037         Change innermode from fixed_mode_size to machine_mode.
27038         (simplify_subreg): Update call accordingly.  Handle a constant-sized
27039         subreg of a variable-length CONST_VECTOR.
27041 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27042             Alan Hayward  <alan.hayward@arm.com>
27043             David Sherwood  <david.sherwood@arm.com>
27045         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
27046         (add_offset_to_base): New function, split out from...
27047         (create_mem_ref): ...here.  When handling a scale other than 1,
27048         check first whether the address is valid without the offset.
27049         Add it into the base if so, leaving the index and scale as-is.
27051 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
27053         PR c++/83778
27054         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
27055         fold_for_warn before checking if arg2 is INTEGER_CST.
27057 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
27059         * config/rs6000/predicates.md (load_multiple_operation): Delete.
27060         (store_multiple_operation): Delete.
27061         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
27062         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
27063         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
27064         guarded by TARGET_STRING.
27065         (rs6000_output_load_multiple): Delete.
27066         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
27067         OPTION_MASK_STRING / TARGET_STRING handling.
27068         (print_operand) <'N', 'O'>: Add comment that these are unused now.
27069         (const rs6000_opt_masks) <"string">: Change mask to 0.
27070         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
27071         (MASK_STRING): Delete.
27072         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
27073         parts.  Simplify.
27074         (load_multiple): Delete.
27075         (*ldmsi8): Delete.
27076         (*ldmsi7): Delete.
27077         (*ldmsi6): Delete.
27078         (*ldmsi5): Delete.
27079         (*ldmsi4): Delete.
27080         (*ldmsi3): Delete.
27081         (store_multiple): Delete.
27082         (*stmsi8): Delete.
27083         (*stmsi7): Delete.
27084         (*stmsi6): Delete.
27085         (*stmsi5): Delete.
27086         (*stmsi4): Delete.
27087         (*stmsi3): Delete.
27088         (movmemsi_8reg): Delete.
27089         (corresponding unnamed define_insn): Delete.
27090         (movmemsi_6reg): Delete.
27091         (corresponding unnamed define_insn): Delete.
27092         (movmemsi_4reg): Delete.
27093         (corresponding unnamed define_insn): Delete.
27094         (movmemsi_2reg): Delete.
27095         (corresponding unnamed define_insn): Delete.
27096         (movmemsi_1reg): Delete.
27097         (corresponding unnamed define_insn): Delete.
27098         * config/rs6000/rs6000.opt (mno-string): New.
27099         (mstring): Replace by deprecation warning stub.
27100         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
27102 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
27104         * regrename.c (regrename_do_replace): If replacing the same
27105         reg multiple times, try to reuse last created gen_raw_REG.
27107         PR debug/81155
27108         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
27109         main to workaround a bug in GDB.
27111 2018-01-12  Tom de Vries  <tom@codesourcery.com>
27113         PR target/83737
27114         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
27116 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
27118         PR rtl-optimization/80481
27119         * ira-color.c (get_cap_member): New function.
27120         (allocnos_conflict_by_live_ranges_p): Use it.
27121         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
27122         (setup_slot_coalesced_allocno_live_ranges): Ditto.
27124 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
27126         PR target/83628
27127         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
27128         (*saddl_se_1): Ditto.
27129         (*ssubsi_1): Ditto.
27130         (*ssubl_se_1): Ditto.
27132 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
27134         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
27135         rather than wi::to_widest for DR_INITs.
27136         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
27137         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
27138         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
27139         INTEGER_CSTs.
27140         (vect_analyze_group_access_1): Note that here.
27142 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
27144         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
27145         polynomial type sizes.
27147 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
27149         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
27150         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
27151         (gimple_add_tmp_var): Likewise.
27153 2018-01-12  Martin Liska  <mliska@suse.cz>
27155         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
27156         (gimple_alloc_sizes): Likewise.
27157         (dump_gimple_statistics): Use PRIu64 in printf format.
27158         * gimple.h: Change uint64_t to int.
27160 2018-01-12  Martin Liska  <mliska@suse.cz>
27162         * tree-core.h: Use uint64_t instead of int.
27163         * tree.c (tree_node_counts): Likewise.
27164         (tree_node_sizes): Likewise.
27165         (dump_tree_statistics): Use PRIu64 in printf format.
27167 2018-01-12  Martin Liska  <mliska@suse.cz>
27169         * Makefile.in: As qsort_chk is implemented in vec.c, add
27170         vec.o to linkage of gencfn-macros.
27171         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
27172         passing the info to record_node_allocation_statistics.
27173         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
27174         and pass the info.
27175         * ggc-common.c (struct ggc_usage): Add operator== and use
27176         it in operator< and compare function.
27177         * mem-stats.h (struct mem_usage): Likewise.
27178         * vec.c (struct vec_usage): Remove operator< and compare
27179         function. Can be simply inherited.
27181 2018-01-12  Martin Jambor  <mjambor@suse.cz>
27183         PR target/81616
27184         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
27185         * tree-ssa-math-opts.c: Include domwalk.h.
27186         (convert_mult_to_fma_1): New function.
27187         (fma_transformation_info): New type.
27188         (fma_deferring_state): Likewise.
27189         (cancel_fma_deferring): New function.
27190         (result_of_phi): Likewise.
27191         (last_fma_candidate_feeds_initial_phi): Likewise.
27192         (convert_mult_to_fma): Added deferring logic, split actual
27193         transformation to convert_mult_to_fma_1.
27194         (math_opts_dom_walker): New type.
27195         (math_opts_dom_walker::after_dom_children): New method, body moved
27196         here from pass_optimize_widening_mul::execute, added deferring logic
27197         bits.
27198         (pass_optimize_widening_mul::execute): Moved most of code to
27199         math_opts_dom_walker::after_dom_children.
27200         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
27201         * config/i386/i386.c (ix86_option_override_internal): Added
27202         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
27204 2018-01-12  Richard Biener  <rguenther@suse.de>
27206         PR debug/83157
27207         * dwarf2out.c (gen_variable_die): Do not reset old_die for
27208         inline instance vars.
27210 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
27212         PR target/81819
27213         * config/rx/rx.c (rx_is_restricted_memory_address):
27214         Handle SUBREG case.
27216 2018-01-12  Richard Biener  <rguenther@suse.de>
27218         PR tree-optimization/80846
27219         * target.def (split_reduction): New target hook.
27220         * targhooks.c (default_split_reduction): New function.
27221         * targhooks.h (default_split_reduction): Declare.
27222         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
27223         target requests first reduce vectors by combining low and high
27224         parts.
27225         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
27226         (get_vectype_for_scalar_type_and_size): Export.
27227         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
27228         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
27229         * doc/tm.texi: Regenerate.
27230         * config/i386/i386.c (ix86_split_reduction): Implement
27231         TARGET_VECTORIZE_SPLIT_REDUCTION.
27233 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
27235         PR target/83368
27236         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
27237         in PIC mode except for TARGET_VXWORKS_RTP.
27238         * config/sparc/sparc.c: Include cfgrtl.h.
27239         (TARGET_INIT_PIC_REG): Define.
27240         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
27241         (sparc_pic_register_p): New predicate.
27242         (sparc_legitimate_address_p): Use it.
27243         (sparc_legitimize_pic_address): Likewise.
27244         (sparc_delegitimize_address): Likewise.
27245         (sparc_mode_dependent_address_p): Likewise.
27246         (gen_load_pcrel_sym): Remove 4th parameter.
27247         (load_got_register): Adjust call to above.  Remove obsolete stuff.
27248         (sparc_expand_prologue): Do not call load_got_register here.
27249         (sparc_flat_expand_prologue): Likewise.
27250         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
27251         (sparc_use_pseudo_pic_reg): New function.
27252         (sparc_init_pic_reg): Likewise.
27253         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27254         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
27256 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
27258         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
27259         Add item for branch_cost.
27261 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
27263         PR rtl-optimization/83565
27264         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
27265         not extend the result to a larger mode for rotate operations.
27266         (num_sign_bit_copies1): Likewise.
27268 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27270         PR target/40411
27271         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
27272         -symbolic.
27273         Use values-Xc.o for -pedantic.
27274         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
27276 2018-01-12  Martin Liska  <mliska@suse.cz>
27278         PR ipa/83054
27279         * ipa-devirt.c (final_warning_record::grow_type_warnings):
27280         New function.
27281         (possible_polymorphic_call_targets): Use it.
27282         (ipa_devirt): Likewise.
27284 2018-01-12  Martin Liska  <mliska@suse.cz>
27286         * profile-count.h (enum profile_quality): Use 0 as invalid
27287         enum value of profile_quality.
27289 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
27291         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27292         -mext-string options.
27294 2018-01-12  Richard Biener  <rguenther@suse.de>
27296         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27297         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27298         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27299         Likewise.
27300         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27302 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
27304         * configure.ac (--with-long-double-format): Add support for the
27305         configuration option to change the default long double format on
27306         PowerPC systems.
27307         * config.gcc (powerpc*-linux*-*): Likewise.
27308         * configure: Regenerate.
27309         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27310         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27311         used without modification.
27313 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27315         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27316         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27317         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27318         MISC_BUILTIN_SPEC_BARRIER.
27319         (rs6000_init_builtins): Likewise.
27320         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27321         enum value.
27322         (speculation_barrier): New define_insn.
27323         * doc/extend.texi: Document __builtin_speculation_barrier.
27325 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
27327         PR target/83203
27328         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27329         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27330         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27331         iterators.
27332         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
27333         integral modes instead of "ss" and "sd".
27334         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27335         vectors with 32-bit and 64-bit elements.
27336         (vecdupssescalarmodesuffix): New mode attribute.
27337         (vec_dup<mode>): Use it.
27339 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
27341         PR target/83330
27342         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27343         frame if argument is passed on stack.
27345 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
27347         PR target/82682
27348         * ree.c (combine_reaching_defs): Optimize also
27349         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27350         reg2=any_extend(exp); reg1=reg2;, formatting fix.
27352 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
27354         PR middle-end/83189
27355         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27357 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
27359         PR middle-end/83718
27360         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27361         after they are computed.
27363 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
27365         PR tree-optimization/83695
27366         * gimple-loop-linterchange.cc
27367         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27368         reset cached scev information after interchange.
27369         (pass_linterchange::execute): Remove call to scev_reset_htab.
27371 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27373         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27374         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27375         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27376         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27377         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27378         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27379         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27380         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27381         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27382         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27383         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27384         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27385         (V_lane_reg): Likewise.
27386         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27387         New define_expand.
27388         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27389         (vfmal_lane_low<mode>_intrinsic,
27390         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27391         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27392         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27393         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27394         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27395         vfmsl_lane_high<mode>_intrinsic): New define_insns.
27397 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27399         * config/arm/arm-cpus.in (fp16fml): New feature.
27400         (ALL_SIMD): Add fp16fml.
27401         (armv8.2-a): Add fp16fml as an option.
27402         (armv8.3-a): Likewise.
27403         (armv8.4-a): Add fp16fml as part of fp16.
27404         * config/arm/arm.h (TARGET_FP16FML): Define.
27405         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27406         when appropriate.
27407         * config/arm/arm-modes.def (V2HF): Define.
27408         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27409         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27410         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27411         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27412         vfmsl_low, vfmsl_high): New set of builtins.
27413         * config/arm/iterators.md (PLUSMINUS): New code iterator.
27414         (vfml_op): New code attribute.
27415         (VFMLHALVES): New int iterator.
27416         (VFML, VFMLSEL): New mode attributes.
27417         (V_reg): Define mapping for V2HF.
27418         (V_hi, V_lo): New mode attributes.
27419         (VF_constraint): Likewise.
27420         (vfml_half, vfml_half_selector): New int attributes.
27421         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27422         define_expand.
27423         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27424         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27425         New define_insn.
27426         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27427         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27428         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27429         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
27430         documentation.
27431         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27432         Document new effective target and option set.
27434 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27436         * config/arm/arm-cpus.in (armv8_4): New feature.
27437         (ARMv8_4a): New fgroup.
27438         (armv8.4-a): New arch.
27439         * config/arm/arm-tables.opt: Regenerate.
27440         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27441         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27442         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27443         Add matching rules for -march=armv8.4-a and extensions.
27444         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27446 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
27448         PR target/81821
27449         * config/rx/rx.md (BW): New mode attribute.
27450         (sync_lock_test_and_setsi): Add mode suffix to insn output.
27452 2018-01-11  Richard Biener  <rguenther@suse.de>
27454         PR tree-optimization/83435
27455         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27456         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27457         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27459 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27460             Alan Hayward  <alan.hayward@arm.com>
27461             David Sherwood  <david.sherwood@arm.com>
27463         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27464         field.
27465         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
27466         (aarch64_print_address_internal): Use it to check for a zero offset.
27468 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27469             Alan Hayward  <alan.hayward@arm.com>
27470             David Sherwood  <david.sherwood@arm.com>
27472         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27473         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27474         Return a poly_int64 rather than a HOST_WIDE_INT.
27475         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27476         rather than a HOST_WIDE_INT.
27477         * config/aarch64/aarch64.h (aarch64_frame): Protect with
27478         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
27479         hard_fp_offset, frame_size, initial_adjust, callee_offset and
27480         final_offset from HOST_WIDE_INT to poly_int64.
27481         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27482         to_constant when getting the number of units in an Advanced SIMD
27483         mode.
27484         (aarch64_builtin_vectorized_function): Check for a constant number
27485         of units.
27486         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27487         GET_MODE_SIZE.
27488         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27489         attribute instead of GET_MODE_NUNITS.
27490         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27491         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27492         GET_MODE_SIZE for fixed-size registers.
27493         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27494         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27495         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27496         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27497         (aarch64_print_operand, aarch64_print_address_internal)
27498         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27499         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27500         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27501         Handle polynomial GET_MODE_SIZE.
27502         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
27503         wider than SImode without modification.
27504         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27505         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27506         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27507         passing and returning SVE modes.
27508         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27509         rather than GEN_INT.
27510         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27511         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27512         (aarch64_allocate_and_probe_stack_space): Likewise.
27513         (aarch64_layout_frame): Cope with polynomial offsets.
27514         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27515         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
27516         polynomial offsets.
27517         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27518         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27519         poly_int64 rather than a HOST_WIDE_INT.
27520         (aarch64_get_separate_components, aarch64_process_components)
27521         (aarch64_expand_prologue, aarch64_expand_epilogue)
27522         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27523         (aarch64_anchor_offset): New function, split out from...
27524         (aarch64_legitimize_address): ...here.
27525         (aarch64_builtin_vectorization_cost): Handle polynomial
27526         TYPE_VECTOR_SUBPARTS.
27527         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27528         GET_MODE_NUNITS.
27529         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27530         number of elements from the PARALLEL rather than the mode.
27531         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27532         rather than GET_MODE_BITSIZE.
27533         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27534         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27535         (aarch64_expand_vec_perm_const_1): Handle polynomial
27536         d->perm.length () and d->perm elements.
27537         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
27538         Apply to_constant to d->perm elements.
27539         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27540         polynomial CONST_VECTOR_NUNITS.
27541         (aarch64_move_pointer): Take amount as a poly_int64 rather
27542         than an int.
27543         (aarch64_progress_pointer): Avoid temporary variable.
27544         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27545         the mode attribute instead of GET_MODE.
27547 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27548             Alan Hayward  <alan.hayward@arm.com>
27549             David Sherwood  <david.sherwood@arm.com>
27551         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27552         x exists before using it.
27553         (aarch64_add_constant_internal): Rename to...
27554         (aarch64_add_offset_1): ...this.  Replace regnum with separate
27555         src and dest rtxes.  Handle the case in which they're different,
27556         including when the offset is zero.  Replace scratchreg with an rtx.
27557         Use 2 additions if there is no spare register into which we can
27558         move a 16-bit constant.
27559         (aarch64_add_constant): Delete.
27560         (aarch64_add_offset): Replace reg with separate src and dest
27561         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
27562         Use aarch64_add_offset_1.
27563         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27564         an rtx rather than an int.  Take the delta as a poly_int64
27565         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
27566         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27567         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27568         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27569         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27570         and aarch64_add_sp.
27571         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27572         aarch64_add_constant.
27574 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27576         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27577         Use scalar_float_mode.
27579 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27581         * config/aarch64/aarch64-simd.md
27582         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27583         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27584         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27585         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27586         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27587         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27588         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27589         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27590         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27591         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27593 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27595         PR target/83514
27596         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27597         targ_options->x_arm_arch_string is non NULL.
27599 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
27601         * config/aarch64/aarch64.h
27602         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
27604 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
27606         PR target/82096
27607         * expmed.c (emit_store_flag_force): Swap if const op0
27608         and change VOIDmode to mode of op0.
27610 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27612         PR rtl-optimization/83761
27613         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27614         than bytes to mode_for_size.
27616 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
27618         PR middle-end/83189
27619         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27620         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27621         profile.
27623 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
27625         PR middle-end/83575
27626         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27627         when in layout mode.
27628         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27629         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27630         partition fixup.
27632 2018-01-10  Michael Collison  <michael.collison@arm.com>
27634         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27635         * config/aarch64/aarch64-option-extension.def: Add
27636         AARCH64_OPT_EXTENSION of 'fp16fml'.
27637         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27638         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27639         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27640         * config/aarch64/constraints.md (Ui7): New constraint.
27641         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27642         (VFMLA_SEL_W): Ditto.
27643         (f16quad): Ditto.
27644         (f16mac1): Ditto.
27645         (VFMLA16_LOW): New int iterator.
27646         (VFMLA16_HIGH): Ditto.
27647         (UNSPEC_FMLAL): New unspec.
27648         (UNSPEC_FMLSL): Ditto.
27649         (UNSPEC_FMLAL2): Ditto.
27650         (UNSPEC_FMLSL2): Ditto.
27651         (f16mac): New code attribute.
27652         * config/aarch64/aarch64-simd-builtins.def
27653         (aarch64_fmlal_lowv2sf): Ditto.
27654         (aarch64_fmlsl_lowv2sf): Ditto.
27655         (aarch64_fmlalq_lowv4sf): Ditto.
27656         (aarch64_fmlslq_lowv4sf): Ditto.
27657         (aarch64_fmlal_highv2sf): Ditto.
27658         (aarch64_fmlsl_highv2sf): Ditto.
27659         (aarch64_fmlalq_highv4sf): Ditto.
27660         (aarch64_fmlslq_highv4sf): Ditto.
27661         (aarch64_fmlal_lane_lowv2sf): Ditto.
27662         (aarch64_fmlsl_lane_lowv2sf): Ditto.
27663         (aarch64_fmlal_laneq_lowv2sf): Ditto.
27664         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27665         (aarch64_fmlalq_lane_lowv4sf): Ditto.
27666         (aarch64_fmlsl_lane_lowv4sf): Ditto.
27667         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27668         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27669         (aarch64_fmlal_lane_highv2sf): Ditto.
27670         (aarch64_fmlsl_lane_highv2sf): Ditto.
27671         (aarch64_fmlal_laneq_highv2sf): Ditto.
27672         (aarch64_fmlsl_laneq_highv2sf): Ditto.
27673         (aarch64_fmlalq_lane_highv4sf): Ditto.
27674         (aarch64_fmlsl_lane_highv4sf): Ditto.
27675         (aarch64_fmlalq_laneq_highv4sf): Ditto.
27676         (aarch64_fmlsl_laneq_highv4sf): Ditto.
27677         * config/aarch64/aarch64-simd.md:
27678         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27679         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27680         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27681         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27682         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27683         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27684         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27685         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27686         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27687         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27688         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27689         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27690         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27691         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27692         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27693         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27694         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27695         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27696         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27697         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27698         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27699         (vfmlsl_low_u32): Ditto.
27700         (vfmlalq_low_u32): Ditto.
27701         (vfmlslq_low_u32): Ditto.
27702         (vfmlal_high_u32): Ditto.
27703         (vfmlsl_high_u32): Ditto.
27704         (vfmlalq_high_u32): Ditto.
27705         (vfmlslq_high_u32): Ditto.
27706         (vfmlal_lane_low_u32): Ditto.
27707         (vfmlsl_lane_low_u32): Ditto.
27708         (vfmlal_laneq_low_u32): Ditto.
27709         (vfmlsl_laneq_low_u32): Ditto.
27710         (vfmlalq_lane_low_u32): Ditto.
27711         (vfmlslq_lane_low_u32): Ditto.
27712         (vfmlalq_laneq_low_u32): Ditto.
27713         (vfmlslq_laneq_low_u32): Ditto.
27714         (vfmlal_lane_high_u32): Ditto.
27715         (vfmlsl_lane_high_u32): Ditto.
27716         (vfmlal_laneq_high_u32): Ditto.
27717         (vfmlsl_laneq_high_u32): Ditto.
27718         (vfmlalq_lane_high_u32): Ditto.
27719         (vfmlslq_lane_high_u32): Ditto.
27720         (vfmlalq_laneq_high_u32): Ditto.
27721         (vfmlslq_laneq_high_u32): Ditto.
27722         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27723         (AARCH64_FL_FOR_ARCH8_4): New.
27724         (AARCH64_ISA_F16FML): New ISA flag.
27725         (TARGET_F16FML): New feature flag for fp16fml.
27726         (doc/invoke.texi): Document new fp16fml option.
27728 2018-01-10  Michael Collison  <michael.collison@arm.com>
27730         * config/aarch64/aarch64-builtins.c:
27731         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27732         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27733         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27734         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27735         (AARCH64_ISA_SHA3): New ISA flag.
27736         (TARGET_SHA3): New feature flag for sha3.
27737         * config/aarch64/iterators.md (sha512_op): New int attribute.
27738         (CRYPTO_SHA512): New int iterator.
27739         (UNSPEC_SHA512H): New unspec.
27740         (UNSPEC_SHA512H2): Ditto.
27741         (UNSPEC_SHA512SU0): Ditto.
27742         (UNSPEC_SHA512SU1): Ditto.
27743         * config/aarch64/aarch64-simd-builtins.def
27744         (aarch64_crypto_sha512hqv2di): New builtin.
27745         (aarch64_crypto_sha512h2qv2di): Ditto.
27746         (aarch64_crypto_sha512su0qv2di): Ditto.
27747         (aarch64_crypto_sha512su1qv2di): Ditto.
27748         (aarch64_eor3qv8hi): Ditto.
27749         (aarch64_rax1qv2di): Ditto.
27750         (aarch64_xarqv2di): Ditto.
27751         (aarch64_bcaxqv8hi): Ditto.
27752         * config/aarch64/aarch64-simd.md:
27753         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27754         (aarch64_crypto_sha512su0qv2di): Ditto.
27755         (aarch64_crypto_sha512su1qv2di): Ditto.
27756         (aarch64_eor3qv8hi): Ditto.
27757         (aarch64_rax1qv2di): Ditto.
27758         (aarch64_xarqv2di): Ditto.
27759         (aarch64_bcaxqv8hi): Ditto.
27760         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27761         (vsha512h2q_u64): Ditto.
27762         (vsha512su0q_u64): Ditto.
27763         (vsha512su1q_u64): Ditto.
27764         (veor3q_u16): Ditto.
27765         (vrax1q_u64): Ditto.
27766         (vxarq_u64): Ditto.
27767         (vbcaxq_u16): Ditto.
27768         * config/arm/types.md (crypto_sha512): New type attribute.
27769         (crypto_sha3): Ditto.
27770         (doc/invoke.texi): Document new sha3 option.
27772 2018-01-10  Michael Collison  <michael.collison@arm.com>
27774         * config/aarch64/aarch64-builtins.c:
27775         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27776         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27777         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27778         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27779         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27780         (AARCH64_ISA_SM4): New ISA flag.
27781         (TARGET_SM4): New feature flag for sm4.
27782         * config/aarch64/aarch64-simd-builtins.def
27783         (aarch64_sm3ss1qv4si): Ditto.
27784         (aarch64_sm3tt1aq4si): Ditto.
27785         (aarch64_sm3tt1bq4si): Ditto.
27786         (aarch64_sm3tt2aq4si): Ditto.
27787         (aarch64_sm3tt2bq4si): Ditto.
27788         (aarch64_sm3partw1qv4si): Ditto.
27789         (aarch64_sm3partw2qv4si): Ditto.
27790         (aarch64_sm4eqv4si): Ditto.
27791         (aarch64_sm4ekeyqv4si): Ditto.
27792         * config/aarch64/aarch64-simd.md:
27793         (aarch64_sm3ss1qv4si): Ditto.
27794         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27795         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27796         (aarch64_sm4eqv4si): Ditto.
27797         (aarch64_sm4ekeyqv4si): Ditto.
27798         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27799         (sm3part_op): Ditto.
27800         (CRYPTO_SM3TT): Ditto.
27801         (CRYPTO_SM3PART): Ditto.
27802         (UNSPEC_SM3SS1): New unspec.
27803         (UNSPEC_SM3TT1A): Ditto.
27804         (UNSPEC_SM3TT1B): Ditto.
27805         (UNSPEC_SM3TT2A): Ditto.
27806         (UNSPEC_SM3TT2B): Ditto.
27807         (UNSPEC_SM3PARTW1): Ditto.
27808         (UNSPEC_SM3PARTW2): Ditto.
27809         (UNSPEC_SM4E): Ditto.
27810         (UNSPEC_SM4EKEY): Ditto.
27811         * config/aarch64/constraints.md (Ui2): New constraint.
27812         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27813         * config/arm/types.md (crypto_sm3): New type attribute.
27814         (crypto_sm4): Ditto.
27815         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27816         (vsm3tt1aq_u32): Ditto.
27817         (vsm3tt1bq_u32): Ditto.
27818         (vsm3tt2aq_u32): Ditto.
27819         (vsm3tt2bq_u32): Ditto.
27820         (vsm3partw1q_u32): Ditto.
27821         (vsm3partw2q_u32): Ditto.
27822         (vsm4eq_u32): Ditto.
27823         (vsm4ekeyq_u32): Ditto.
27824         (doc/invoke.texi): Document new sm4 option.
27826 2018-01-10  Michael Collison  <michael.collison@arm.com>
27828         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27829         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27830         (AARCH64_FL_FOR_ARCH8_4): New.
27831         (AARCH64_FL_V8_4): New flag.
27832         (doc/invoke.texi): Document new armv8.4-a option.
27834 2018-01-10  Michael Collison  <michael.collison@arm.com>
27836         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27837         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27838         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27839         * config/aarch64/aarch64-option-extension.def: Add
27840         AARCH64_OPT_EXTENSION of 'sha2'.
27841         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27842         (crypto): Disable sha2 and aes if crypto disabled.
27843         (crypto): Enable aes and sha2 if enabled.
27844         (simd): Disable sha2 and aes if simd disabled.
27845         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27846         New flags.
27847         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27848         (TARGET_SHA2): New feature flag for sha2.
27849         (TARGET_AES): New feature flag for aes.
27850         * config/aarch64/aarch64-simd.md:
27851         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27852         conditional on TARGET_AES.
27853         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27854         (aarch64_crypto_sha1hsi): Make pattern conditional
27855         on TARGET_SHA2.
27856         (aarch64_crypto_sha1hv4si): Ditto.
27857         (aarch64_be_crypto_sha1hv4si): Ditto.
27858         (aarch64_crypto_sha1su1v4si): Ditto.
27859         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27860         (aarch64_crypto_sha1su0v4si): Ditto.
27861         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27862         (aarch64_crypto_sha256su0v4si): Ditto.
27863         (aarch64_crypto_sha256su1v4si): Ditto.
27864         (doc/invoke.texi): Document new aes and sha2 options.
27866 2018-01-10  Martin Sebor  <msebor@redhat.com>
27868         PR tree-optimization/83781
27869         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27870         as string arrays.
27872 2018-01-11  Martin Sebor  <msebor@gmail.com>
27873             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27875         PR tree-optimization/83501
27876         PR tree-optimization/81703
27878         * tree-ssa-strlen.c (get_string_cst): Rename...
27879         (get_string_len): ...to this.  Handle global constants.
27880         (handle_char_store): Adjust.
27882 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
27883             Jim Wilson  <jimw@sifive.com>
27885         * config/riscv/riscv-protos.h (riscv_output_return): New.
27886         * config/riscv/riscv.c (struct machine_function): New naked_p field.
27887         (riscv_attribute_table, riscv_output_return),
27888         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27889         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27890         (riscv_compute_frame_info): Only compute frame->mask if not a naked
27891         function.
27892         (riscv_expand_prologue): Add early return for naked function.
27893         (riscv_expand_epilogue): Likewise.
27894         (riscv_function_ok_for_sibcall): Return false for naked function.
27895         (riscv_set_current_function): New.
27896         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27897         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27898         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27899         * doc/extend.texi (RISC-V Function Attributes): New.
27901 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
27903         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27904         check for 128-bit long double before checking TCmode.
27905         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27906         128-bit long doubles before checking TFmode or TCmode.
27907         (FLOAT128_IBM_P): Likewise.
27909 2018-01-10  Martin Sebor  <msebor@redhat.com>
27911         PR tree-optimization/83671
27912         * builtins.c (c_strlen): Unconditionally return zero for the empty
27913         string.
27914         Use -Warray-bounds for warnings.
27915         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27916         for non-constant array indices with COMPONENT_REF, arrays of
27917         arrays, and pointers to arrays.
27918         (gimple_fold_builtin_strlen): Determine and set length range for
27919         non-constant character arrays.
27921 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
27923         PR middle-end/81897
27924         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27925         empty blocks.
27927 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
27929         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27931 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
27933         PR target/83399
27934         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27935         VECTOR_MEM_ALTIVEC_OR_VSX_P.
27936         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27937         indexed_or_indirect_operand predicate.
27938         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27939         (*vsx_le_perm_load_v8hi): Likewise.
27940         (*vsx_le_perm_load_v16qi): Likewise.
27941         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27942         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27943         (*vsx_le_perm_store_v8hi): Likewise.
27944         (*vsx_le_perm_store_v16qi): Likewise.
27945         (eight unnamed splitters): Likewise.
27947 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
27949         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27950         * config/rs6000/emmintrin.h: Likewise.
27951         * config/rs6000/mmintrin.h: Likewise.
27952         * config/rs6000/xmmintrin.h: Likewise.
27954 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
27956         PR c++/43486
27957         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27958         "public_flag".
27959         * tree.c (tree_nop_conversion): Return true for location wrapper
27960         nodes.
27961         (maybe_wrap_with_location): New function.
27962         (selftest::check_strip_nops): New function.
27963         (selftest::test_location_wrappers): New function.
27964         (selftest::tree_c_tests): Call it.
27965         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27966         (maybe_wrap_with_location): New decl.
27967         (EXPR_LOCATION_WRAPPER_P): New macro.
27968         (location_wrapper_p): New inline function.
27969         (tree_strip_any_location_wrapper): New inline function.
27971 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
27973         PR target/83735
27974         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27975         stack_realign_offset for the largest alignment of stack slot
27976         actually used.
27977         (ix86_find_max_used_stack_alignment): New function.
27978         (ix86_finalize_stack_frame_flags): Use it.  Set
27979         max_used_stack_alignment if we don't realign stack.
27980         * config/i386/i386.h (machine_function): Add
27981         max_used_stack_alignment.
27983 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
27985         * config/arm/arm.opt (-mbranch-cost): New option.
27986         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27987         account.
27989 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
27991         PR target/83629
27992         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27993         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27995 2018-01-10  Richard Biener  <rguenther@suse.de>
27997         PR debug/83765
27998         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27999         early out so it also covers the case where we have a non-NULL
28000         origin.
28002 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
28004         PR tree-optimization/83753
28005         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
28006         for non-strided grouped accesses if the number of elements is 1.
28008 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
28010         PR target/81616
28011         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
28012         * i386.h (TARGET_USE_GATHER): Define.
28013         * x86-tune.def (X86_TUNE_USE_GATHER): New.
28015 2018-01-10  Martin Liska  <mliska@suse.cz>
28017         PR bootstrap/82831
28018         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
28019         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
28020         partitioning.
28021         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
28022         CLEANUP_NO_PARTITIONING is not set.
28024 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
28026         * doc/rtl.texi: Remove documentation of (const ...) wrappers
28027         for vectors, as a partial revert of r254296.
28028         * rtl.h (const_vec_p): Delete.
28029         (const_vec_duplicate_p): Don't test for vector CONSTs.
28030         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
28031         * expmed.c (make_tree): Likewise.
28033         Revert:
28034         * common.md (E, F): Use CONSTANT_P instead of checking for
28035         CONST_VECTOR.
28036         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
28037         checking for CONST_VECTOR.
28039 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
28041         PR middle-end/83575
28042         * predict.c (force_edge_cold): Handle in more sane way edges
28043         with no prediction.
28045 2018-01-09  Carl Love  <cel@us.ibm.com>
28047         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
28048         V4SI, V4SF types.
28049         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
28050         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
28051         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
28052         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
28053         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
28054         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
28055         * config/rs6000/rs6000-protos.h: Add extern defition for
28056         rs6000_generate_float2_double_code.
28057         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
28058         function.
28059         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
28060         (float2_v2df): Add define_expand.
28062 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
28064         PR target/83628
28065         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
28066         op_mode in the force_to_mode call.
28068 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
28070         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
28071         instead of checking each element individually.
28072         (aarch64_evpc_uzp): Likewise.
28073         (aarch64_evpc_zip): Likewise.
28074         (aarch64_evpc_ext): Likewise.
28075         (aarch64_evpc_rev): Likewise.
28076         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
28077         instead of checking each element individually.  Return true without
28078         generating rtl if
28079         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
28080         whether all selected elements come from the same input, instead of
28081         checking each element individually.  Remove calls to gen_rtx_REG,
28082         start_sequence and end_sequence and instead assert that no rtl is
28083         generated.
28085 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
28087         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
28088         order of HIGH and CONST checks.
28090 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
28092         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
28093         if the destination isn't an SSA_NAME.
28095 2018-01-09  Richard Biener  <rguenther@suse.de>
28097         PR tree-optimization/83668
28098         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
28099         move prologue...
28100         (canonicalize_loop_form): ... here, renamed from ...
28101         (canonicalize_loop_closed_ssa_form): ... this and amended to
28102         swap successor edges for loop exit blocks to make us use
28103         the RPO order we need for initial schedule generation.
28105 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
28107         PR tree-optimization/64811
28108         * match.pd: When optimizing comparisons with Inf, avoid
28109         introducing or losing exceptions from comparisons with NaN.
28111 2018-01-09  Martin Liska  <mliska@suse.cz>
28113         PR sanitizer/82517
28114         * asan.c (shadow_mem_size): Add gcc_assert.
28116 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
28118         Don't save registers in main().
28120         PR target/83738
28121         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
28122         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
28123         * config/avr/avr.c (avr_set_current_function): Don't error if
28124         naked, OS_task or OS_main are specified at the same time.
28125         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
28126         OS_main.
28127         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
28128         attribute.
28129         * common/config/avr/avr-common.c (avr_option_optimization_table):
28130         Switch on -mmain-is-OS_task for optimizing compilations.
28132 2018-01-09  Richard Biener  <rguenther@suse.de>
28134         PR tree-optimization/83572
28135         * graphite.c: Include cfganal.h.
28136         (graphite_transform_loops): Connect infinite loops to exit
28137         and remove fake edges at the end.
28139 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
28141         * ipa-inline.c (edge_badness): Revert accidental checkin.
28143 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
28145         PR ipa/80763
28146         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
28147         symbols; not inline clones.
28149 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
28151         PR target/83507
28152         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
28153         hard registers.  Formatting fixes.
28155         PR preprocessor/83722
28156         * gcc.c (try_generate_repro): Pass
28157         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
28158         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
28159         do_report_bug.
28161 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
28162             Kito Cheng  <kito.cheng@gmail.com>
28164         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
28165         (riscv_leaf_function_p): Delete.
28166         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
28168 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28170         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
28171         function.
28172         (do_ifelse): New function.
28173         (do_isel): New function.
28174         (do_sub3): New function.
28175         (do_add3): New function.
28176         (do_load_mask_compare): New function.
28177         (do_overlap_load_compare): New function.
28178         (expand_compare_loop): New function.
28179         (expand_block_compare): Call expand_compare_loop() when appropriate.
28180         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
28181         option description.
28182         (-mblock-compare-inline-loop-limit): New option.
28184 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28186         PR target/83677
28187         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
28188         Reverse order of second and third operands in first alternative.
28189         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
28190         of first and second elements in UNSPEC_VPERMR vector.
28191         (altivec_expand_vec_perm_le): Likewise.
28193 2018-01-08  Jeff Law  <law@redhat.com>
28195         PR rtl-optimizatin/81308
28196         * tree-switch-conversion.c (cfg_altered): New file scoped static.
28197         (process_switch): If group_case_labels makes a change, then set
28198         cfg_altered.
28199         (pass_convert_switch::execute): If a switch is converted, then
28200         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
28202         PR rtl-optimization/81308
28203         * recog.c (split_all_insns): Conditionally cleanup the CFG after
28204         splitting insns.
28206 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
28208         PR target/83663 - Revert r255946
28209         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
28210         generation for cases where splatting a value is not useful.
28211         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
28212         across a vec_duplicate and a paradoxical subreg forming a vector
28213         mode to a vec_concat.
28215 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28217         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
28218         -march=armv8.3-a variants.
28219         * config/arm/t-multilib: Likewise.
28220         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
28222 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28224         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
28225         to generate rtl.
28226         (cceq_ior_compare_complement): Give it a name so I can use it, and
28227         change boolean_or_operator predicate to boolean_operator so it can
28228         be used to generate a crand.
28229         (eqne): New code iterator.
28230         (bd/bd_neg): New code_attrs.
28231         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
28232         a single define_insn.
28233         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
28234         decrement (bdnzt/bdnzf/bdzt/bdzf).
28235         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
28236         with the new names of the branch decrement patterns, and added the
28237         names of the branch decrement conditional patterns.
28239 2018-01-08  Richard Biener  <rguenther@suse.de>
28241         PR tree-optimization/83563
28242         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
28243         cache.
28245 2018-01-08  Richard Biener  <rguenther@suse.de>
28247         PR middle-end/83713
28248         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
28250 2018-01-08  Richard Biener  <rguenther@suse.de>
28252         PR tree-optimization/83685
28253         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
28254         references to abnormals.
28256 2018-01-08  Richard Biener  <rguenther@suse.de>
28258         PR lto/83719
28259         * dwarf2out.c (output_indirect_strings): Handle empty
28260         skeleton_debug_str_hash.
28261         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
28263 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
28265         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
28266         (emit_store_direct): Likewise.
28267         (arc_trampoline_adjust_address): Likewise.
28268         (arc_asm_trampoline_template): New function.
28269         (arc_initialize_trampoline): Use asm_trampoline_template.
28270         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
28271         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
28272         * config/arc/arc.md (flush_icache): Delete pattern.
28274 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
28276         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
28277         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
28278         munaligned-access.
28280 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
28282         PR target/83681
28283         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28284         by not USED_FOR_TARGET.
28285         (make_pass_resolve_sw_modes): Likewise.
28287 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
28289         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28290         USED_FOR_TARGET.
28292 2018-01-08  Richard Biener  <rguenther@suse.de>
28294         PR middle-end/83580
28295         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28297 2018-01-08  Richard Biener  <rguenther@suse.de>
28299         PR middle-end/83517
28300         * match.pd ((t * 2) / 2) -> t): Add missing :c.
28302 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
28304         PR middle-end/81897
28305         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28306         basic blocks with a small number of successors.
28307         (convert_control_dep_chain_into_preds): Improve handling of
28308         forwarder blocks.
28309         (dump_predicates): Split apart into...
28310         (dump_pred_chain): ...here...
28311         (dump_pred_info): ...and here.
28312         (can_one_predicate_be_invalidated_p): Add debugging printfs.
28313         (can_chain_union_be_invalidated_p): Improve check for invalidation
28314         of paths.
28315         (uninit_uses_cannot_happen): Avoid unnecessary if
28316         convert_control_dep_chain_into_preds yielded nothing.
28318 2018-01-06  Martin Sebor  <msebor@redhat.com>
28320         PR tree-optimization/83640
28321         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28322         subtracting negative offset from size.
28323         (builtin_access::overlap): Adjust offset bounds of the access to fall
28324         within the size of the object if possible.
28326 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
28328         PR rtl-optimization/83699
28329         * expmed.c (extract_bit_field_1): Restrict the vector usage of
28330         extract_bit_field_as_subreg to cases in which the extracted
28331         value is also a vector.
28333         * lra-constraints.c (process_alt_operands): Test for the equivalence
28334         substitutions when detecting a possible reload cycle.
28336 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
28338         PR debug/83480
28339         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28340         by default if flag_selective_schedling{,2}.  Formatting fixes.
28342         PR rtl-optimization/83682
28343         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28344         if it has non-VECTOR_MODE element mode.
28345         (vec_duplicate_p): Likewise.
28347         PR middle-end/83694
28348         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28349         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28351 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
28353         PR target/83604
28354         * config/i386/i386-builtin.def
28355         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28356         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28357         Require also OPTION_MASK_ISA_AVX512F in addition to
28358         OPTION_MASK_ISA_GFNI.
28359         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28360         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28361         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28362         to OPTION_MASK_ISA_GFNI.
28363         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28364         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28365         OPTION_MASK_ISA_AVX512BW.
28366         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28367         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28368         addition to OPTION_MASK_ISA_GFNI.
28369         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28370         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28371         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28372         to OPTION_MASK_ISA_GFNI.
28373         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28374         a requirement for all ISAs rather than any of them with a few
28375         exceptions.
28376         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28377         processing.
28378         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28379         bitmasks to be enabled with 3 exceptions, instead of requiring any
28380         enabled ISA with lots of exceptions.
28381         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28382         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28383         Change avx512bw in isa attribute to avx512f.
28384         * config/i386/sgxintrin.h: Add license boilerplate.
28385         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
28386         to __AVX512F__ and __AVX512VL to __AVX512VL__.
28387         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28388         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28389         defined.
28390         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28391         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28392         temporarily sse2 rather than sse if not enabled already.
28394         PR target/83604
28395         * config/i386/sse.md (VI248_VLBW): Rename to ...
28396         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
28397         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28398         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28399         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28400         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28401         mode iterator instead of VI248_VLBW.
28403 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
28405         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28406         (record_modified): Skip clobbers; add debug output.
28407         (param_change_prob): Use sreal frequencies.
28409 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
28411         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28412         punt for user-aligned variables.
28414 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
28416         * tree-chrec.c (chrec_contains_symbols): Return true for
28417         POLY_INT_CST.
28419 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
28421         PR target/82439
28422         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28423         of (x|y) == x for BICS pattern.
28425 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
28427         PR tree-optimization/83605
28428         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28429         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28430         can throw.
28432 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
28434         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28435         * config/epiphany/rtems.h: New file.
28437 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
28438             Uros Bizjak  <ubizjak@gmail.com>
28440         PR target/83554
28441         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28442         QIreg_operand instead of register_operand predicate.
28443         * config/i386/i386.c (ix86_rop_should_change_byte_p,
28444         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28445         comments instead of -fmitigate[-_]rop.
28447 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28449         PR bootstrap/81926
28450         * cgraphunit.c (symbol_table::compile): Switch to text_section
28451         before calling assembly_start debug hook.
28452         * run-rtl-passes.c (run_rtl_passes): Likewise.
28453         Include output.h.
28455 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28457         * tree-vrp.c (extract_range_from_binary_expr_1): Check
28458         range_int_cst_p rather than !symbolic_range_p before calling
28459         extract_range_from_multiplicative_op_1.
28461 2018-01-04  Jeff Law  <law@redhat.com>
28463         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28464         redundant test in assertion.
28466 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28468         * doc/rtl.texi: Document machine_mode wrapper classes.
28470 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28472         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28473         using tree_to_uhwi.
28475 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28477         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28478         the VEC_PERM_EXPR fold to fail.
28480 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
28482         PR debug/83585
28483         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28484         to switched_sections.
28486 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28488         PR target/83680
28489         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28490         test for d.testing.
28492 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
28494         PR target/83387
28495         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28496         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28498 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
28500         PR debug/83666
28501         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28502         is BLKmode and bitpos not zero or mode change is needed.
28504 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28506         PR target/83675
28507         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28508         TARGET_VIS2.
28510 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
28512         PR target/83628
28513         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28514         instead of MULT rtx.  Update all corresponding splitters.
28515         (*saddl_se): Ditto.
28516         (*ssub<modesuffix>): Ditto.
28517         (*ssubl_se): Ditto.
28518         (*cmp_sadd_di): Update split patterns.
28519         (*cmp_sadd_si): Ditto.
28520         (*cmp_sadd_sidi): Ditto.
28521         (*cmp_ssub_di): Ditto.
28522         (*cmp_ssub_si): Ditto.
28523         (*cmp_ssub_sidi): Ditto.
28524         * config/alpha/predicates.md (const23_operand): New predicate.
28525         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28526         Look for ASHIFT, not MULT inner operand.
28527         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28529 2018-01-04  Martin Liska  <mliska@suse.cz>
28531         PR gcov-profile/83669
28532         * gcov.c (output_intermediate_file): Add version to intermediate
28533         gcov file.
28534         * doc/gcov.texi: Document new field 'version' in intermediate
28535         file format. Fix location of '-k' option of gcov command.
28537 2018-01-04  Martin Liska  <mliska@suse.cz>
28539         PR ipa/82352
28540         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28542 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
28544         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28546 2018-01-03  Martin Sebor  <msebor@redhat.com>
28548         PR tree-optimization/83655
28549         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28550         checking calls with invalid arguments.
28552 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28554         * tree-vect-stmts.c (vect_get_store_rhs): New function.
28555         (vectorizable_mask_load_store): Delete.
28556         (vectorizable_call): Return false for masked loads and stores.
28557         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
28558         instead of gimple_assign_rhs1.
28559         (vectorizable_load): Handle IFN_MASK_LOAD.
28560         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28562 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28564         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28565         split out from..,
28566         (vectorizable_mask_load_store): ...here.
28567         (vectorizable_load): ...and here.
28569 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28571         * tree-vect-stmts.c (vect_build_all_ones_mask)
28572         (vect_build_zero_merge_argument): New functions, split out from...
28573         (vectorizable_load): ...here.
28575 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28577         * tree-vect-stmts.c (vect_check_store_rhs): New function,
28578         split out from...
28579         (vectorizable_mask_load_store): ...here.
28580         (vectorizable_store): ...and here.
28582 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28584         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28585         split out from...
28586         (vectorizable_mask_load_store): ...here.
28588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28590         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28591         (vect_model_store_cost): Take a vec_load_store_type instead of a
28592         vect_def_type.
28593         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28594         (vect_model_store_cost): Take a vec_load_store_type instead of a
28595         vect_def_type.
28596         (vectorizable_mask_load_store): Update accordingly.
28597         (vectorizable_store): Likewise.
28598         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28600 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28602         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28603         IFN_MASK_LOAD calls here rather than...
28604         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28606 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28607             Alan Hayward  <alan.hayward@arm.com>
28608             David Sherwood  <david.sherwood@arm.com>
28610         * expmed.c (extract_bit_field_1): For vector extracts,
28611         fall back to extract_bit_field_as_subreg if vec_extract
28612         isn't available.
28614 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28615             Alan Hayward  <alan.hayward@arm.com>
28616             David Sherwood  <david.sherwood@arm.com>
28618         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28619         they are variable or constant sized.
28620         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28621         slots for constant-sized data.
28623 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28624             Alan Hayward  <alan.hayward@arm.com>
28625             David Sherwood  <david.sherwood@arm.com>
28627         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28628         handling COND_EXPRs with boolean comparisons, try to find a better
28629         basis for the mask type than the boolean itself.
28631 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28633         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28634         is calculated and how it can be overridden.
28635         * genmodes.c (max_bitsize_mode_any_mode): New variable.
28636         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28637         if defined.
28638         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28639         if nonzero.
28641 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28642             Alan Hayward  <alan.hayward@arm.com>
28643             David Sherwood  <david.sherwood@arm.com>
28645         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28646         Remove the mode argument.
28647         (aarch64_simd_valid_immediate): Remove the mode and inverse
28648         arguments.
28649         * config/aarch64/iterators.md (bitsize): New iterator.
28650         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28651         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28652         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28653         aarch64_simd_valid_immediate.
28654         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28655         (aarch64_reg_or_bic_imm): Likewise.
28656         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28657         with an insn_type enum and msl with a modifier_type enum.
28658         Replace element_width with a scalar_mode.  Change the shift
28659         to unsigned int.  Add constructors for scalar_float_mode and
28660         scalar_int_mode elements.
28661         (aarch64_vect_float_const_representable_p): Delete.
28662         (aarch64_can_const_movi_rtx_p)
28663         (aarch64_simd_scalar_immediate_valid_for_move)
28664         (aarch64_simd_make_constant): Update call to
28665         aarch64_simd_valid_immediate.
28666         (aarch64_advsimd_valid_immediate_hs): New function.
28667         (aarch64_advsimd_valid_immediate): Likewise.
28668         (aarch64_simd_valid_immediate): Remove mode and inverse
28669         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
28670         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28671         and aarch64_float_const_representable_p on the result.
28672         (aarch64_output_simd_mov_immediate): Remove mode argument.
28673         Update call to aarch64_simd_valid_immediate and use of
28674         simd_immediate_info.
28675         (aarch64_output_scalar_simd_mov_immediate): Update call
28676         accordingly.
28678 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28679             Alan Hayward  <alan.hayward@arm.com>
28680             David Sherwood  <david.sherwood@arm.com>
28682         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28683         (mode_nunits): Likewise CONST_MODE_NUNITS.
28684         * machmode.def (ADJUST_NUNITS): Document.
28685         * genmodes.c (mode_data::need_nunits_adj): New field.
28686         (blank_mode): Update accordingly.
28687         (adj_nunits): New variable.
28688         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28689         parameter.
28690         (emit_mode_size_inline): Set need_bytesize_adj for all modes
28691         listed in adj_nunits.
28692         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28693         listed in adj_nunits.  Don't emit case statements for such modes.
28694         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28695         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
28696         nothing if adj_nunits is nonnull.
28697         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28698         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28699         (emit_mode_fbit): Update use of print_maybe_const_decl.
28700         (emit_move_size): Likewise.  Treat the array as non-const
28701         if adj_nunits.
28702         (emit_mode_adjustments): Handle adj_nunits.
28704 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28706         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28707         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28708         (VECTOR_MODES): Use it.
28709         (make_vector_modes): Take the prefix as an argument.
28711 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28712             Alan Hayward  <alan.hayward@arm.com>
28713             David Sherwood  <david.sherwood@arm.com>
28715         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28716         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28717         for MODE_VECTOR_BOOL.
28718         * machmode.def (VECTOR_BOOL_MODE): Document.
28719         * genmodes.c (VECTOR_BOOL_MODE): New macro.
28720         (make_vector_bool_mode): New function.
28721         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28722         MODE_VECTOR_BOOL.
28723         * lto-streamer-in.c (lto_input_mode_table): Likewise.
28724         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28725         Likewise.
28726         * stor-layout.c (int_mode_for_mode): Likewise.
28727         * tree.c (build_vector_type_for_mode): Likewise.
28728         * varasm.c (output_constant_pool_2): Likewise.
28729         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28730         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
28731         for MODE_VECTOR_BOOL.
28732         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28733         of mode class checks.
28734         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28735         instead of a list of mode class checks.
28736         (expand_vector_scalar_condition): Likewise.
28737         (type_for_widest_vector_mode): Handle BImode as an inner mode.
28739 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28740             Alan Hayward  <alan.hayward@arm.com>
28741             David Sherwood  <david.sherwood@arm.com>
28743         * machmode.h (mode_size): Change from unsigned short to
28744         poly_uint16_pod.
28745         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28746         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28747         or if measurement_type is not polynomial.
28748         (fixed_size_mode::includes_p): Check for constant-sized modes.
28749         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28750         return a poly_uint16 rather than an unsigned short.
28751         (emit_mode_size): Change the type of mode_size from unsigned short
28752         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
28753         (emit_mode_adjustments): Cope with polynomial vector sizes.
28754         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28755         for GET_MODE_SIZE.
28756         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28757         for GET_MODE_SIZE.
28758         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28759         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28760         * caller-save.c (setup_save_areas): Likewise.
28761         (replace_reg_with_saved_mem): Likewise.
28762         * calls.c (emit_library_call_value_1): Likewise.
28763         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28764         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28765         (gen_lowpart_for_combine): Likewise.
28766         * convert.c (convert_to_integer_1): Likewise.
28767         * cse.c (equiv_constant, cse_insn): Likewise.
28768         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28769         (cselib_subst_to_values): Likewise.
28770         * dce.c (word_dce_process_block): Likewise.
28771         * df-problems.c (df_word_lr_mark_ref): Likewise.
28772         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28773         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28774         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28775         (rtl_for_decl_location): Likewise.
28776         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28777         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28778         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28779         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28780         (expand_expr_real_1): Likewise.
28781         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28782         (pad_below): Likewise.
28783         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28784         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28785         * ira.c (get_subreg_tracking_sizes): Likewise.
28786         * ira-build.c (ira_create_allocno_objects): Likewise.
28787         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28788         (ira_sort_regnos_for_alter_reg): Likewise.
28789         * ira-costs.c (record_operand_costs): Likewise.
28790         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28791         (resolve_simple_move): Likewise.
28792         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28793         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28794         (lra_constraints): Likewise.
28795         (CONST_POOL_OK_P): Reject variable-sized modes.
28796         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28797         (add_pseudo_to_slot, lra_spill): Likewise.
28798         * omp-low.c (omp_clause_aligned_alignment): Likewise.
28799         * optabs-query.c (get_best_extraction_insn): Likewise.
28800         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28801         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28802         (expand_mult_highpart, valid_multiword_target_p): Likewise.
28803         * recog.c (offsettable_address_addr_space_p): Likewise.
28804         * regcprop.c (maybe_mode_change): Likewise.
28805         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28806         * regrename.c (build_def_use): Likewise.
28807         * regstat.c (dump_reg_info): Likewise.
28808         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28809         (find_reloads, find_reloads_subreg_address): Likewise.
28810         * reload1.c (eliminate_regs_1): Likewise.
28811         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28812         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28813         (simplify_binary_operation_1, simplify_subreg): Likewise.
28814         * targhooks.c (default_function_arg_padding): Likewise.
28815         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28816         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28817         (verify_gimple_assign_ternary): Likewise.
28818         * tree-inline.c (estimate_move_cost): Likewise.
28819         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28820         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28821         (get_address_cost_ainc): Likewise.
28822         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28823         (vect_supportable_dr_alignment): Likewise.
28824         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28825         (vectorizable_reduction): Likewise.
28826         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28827         (vectorizable_operation, vectorizable_load): Likewise.
28828         * tree.c (build_same_sized_truth_vector_type): Likewise.
28829         * valtrack.c (cleanup_auto_inc_dec): Likewise.
28830         * var-tracking.c (emit_note_insn_var_location): Likewise.
28831         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28832         (ADDR_VEC_ALIGN): Likewise.
28834 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28835             Alan Hayward  <alan.hayward@arm.com>
28836             David Sherwood  <david.sherwood@arm.com>
28838         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28839         unsigned short.
28840         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28841         or if measurement_type is polynomial.
28842         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28843         * combine.c (make_extraction): Likewise.
28844         * dse.c (find_shift_sequence): Likewise.
28845         * dwarf2out.c (mem_loc_descriptor): Likewise.
28846         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28847         (extract_bit_field, extract_low_bits): Likewise.
28848         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28849         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28850         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28851         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28852         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28853         * reload.c (find_reloads): Likewise.
28854         * reload1.c (alter_reg): Likewise.
28855         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28856         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28857         * tree-if-conv.c (predicate_mem_writes): Likewise.
28858         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28859         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28860         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28861         * valtrack.c (dead_debug_insert_temp): Likewise.
28862         * varasm.c (mergeable_constant_section): Likewise.
28863         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28865 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28866             Alan Hayward  <alan.hayward@arm.com>
28867             David Sherwood  <david.sherwood@arm.com>
28869         * expr.c (expand_assignment): Cope with polynomial mode sizes
28870         when assigning to a CONCAT.
28872 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28873             Alan Hayward  <alan.hayward@arm.com>
28874             David Sherwood  <david.sherwood@arm.com>
28876         * machmode.h (mode_precision): Change from unsigned short to
28877         poly_uint16_pod.
28878         (mode_to_precision): Return a poly_uint16 rather than an unsigned
28879         short.
28880         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28881         or if measurement_type is not polynomial.
28882         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
28883         in which the mode is already known to be a scalar_int_mode.
28884         * genmodes.c (emit_mode_precision): Change the type of mode_precision
28885         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
28886         initializer.
28887         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28888         for GET_MODE_PRECISION.
28889         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28890         for GET_MODE_PRECISION.
28891         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28892         as polynomial.
28893         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28894         (expand_field_assignment, make_extraction): Likewise.
28895         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28896         (get_last_value): Likewise.
28897         * convert.c (convert_to_integer_1): Likewise.
28898         * cse.c (cse_insn): Likewise.
28899         * expr.c (expand_expr_real_1): Likewise.
28900         * lra-constraints.c (simplify_operand_subreg): Likewise.
28901         * optabs-query.c (can_atomic_load_p): Likewise.
28902         * optabs.c (expand_atomic_load): Likewise.
28903         (expand_atomic_store): Likewise.
28904         * ree.c (combine_reaching_defs): Likewise.
28905         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28906         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28907         * tree.h (type_has_mode_precision_p): Likewise.
28908         * ubsan.c (instrument_si_overflow): Likewise.
28910 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28911             Alan Hayward  <alan.hayward@arm.com>
28912             David Sherwood  <david.sherwood@arm.com>
28914         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28915         polynomial numbers of units.
28916         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28917         (valid_vector_subparts_p): New function.
28918         (build_vector_type): Remove temporary shim and take the number
28919         of units as a poly_uint64 rather than an int.
28920         (build_opaque_vector_type): Take the number of units as a
28921         poly_uint64 rather than an int.
28922         * tree.c (build_vector_from_ctor): Handle polynomial
28923         TYPE_VECTOR_SUBPARTS.
28924         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28925         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28926         (build_vector_from_val): If the number of units is variable,
28927         use build_vec_duplicate_cst for constant operands and
28928         VEC_DUPLICATE_EXPR otherwise.
28929         (make_vector_type): Remove temporary is_constant ().
28930         (build_vector_type, build_opaque_vector_type): Take the number of
28931         units as a poly_uint64 rather than an int.
28932         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28933         VECTOR_CST_NELTS.
28934         * cfgexpand.c (expand_debug_expr): Likewise.
28935         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28936         (store_constructor, expand_expr_real_1): Likewise.
28937         (const_scalar_mask_from_tree): Likewise.
28938         * fold-const-call.c (fold_const_reduction): Likewise.
28939         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28940         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28941         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28942         (fold_relational_const): Likewise.
28943         (native_interpret_vector): Likewise.  Change the size from an
28944         int to an unsigned int.
28945         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28946         TYPE_VECTOR_SUBPARTS.
28947         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28948         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28949         duplicating a non-constant operand into a variable-length vector.
28950         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28951         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28952         * ipa-icf.c (sem_variable::equals): Likewise.
28953         * match.pd: Likewise.
28954         * omp-simd-clone.c (simd_clone_subparts): Likewise.
28955         * print-tree.c (print_node): Likewise.
28956         * stor-layout.c (layout_type): Likewise.
28957         * targhooks.c (default_builtin_vectorization_cost): Likewise.
28958         * tree-cfg.c (verify_gimple_comparison): Likewise.
28959         (verify_gimple_assign_binary): Likewise.
28960         (verify_gimple_assign_ternary): Likewise.
28961         (verify_gimple_assign_single): Likewise.
28962         * tree-pretty-print.c (dump_generic_node): Likewise.
28963         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28964         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28965         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28966         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28967         (vect_shift_permute_load_chain): Likewise.
28968         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28969         (expand_vector_condition, optimize_vector_constructor): Likewise.
28970         (lower_vec_perm, get_compute_type): Likewise.
28971         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28972         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28973         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28974         (vect_recog_mask_conversion_pattern): Likewise.
28975         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28976         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28977         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28978         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28979         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28980         (vectorizable_shift, vectorizable_operation, vectorizable_store)
28981         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28982         (supportable_widening_operation): Likewise.
28983         (supportable_narrowing_operation): Likewise.
28984         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28985         Likewise.
28986         * varasm.c (output_constant): Likewise.
28988 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28989             Alan Hayward  <alan.hayward@arm.com>
28990             David Sherwood  <david.sherwood@arm.com>
28992         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28993         so that both the length == 3 and length != 3 cases set up their
28994         own permute vectors.  Add comments explaining why we know the
28995         number of elements is constant.
28996         (vect_permute_load_chain): Likewise.
28998 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28999             Alan Hayward  <alan.hayward@arm.com>
29000             David Sherwood  <david.sherwood@arm.com>
29002         * machmode.h (mode_nunits): Change from unsigned char to
29003         poly_uint16_pod.
29004         (ONLY_FIXED_SIZE_MODES): New macro.
29005         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
29006         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
29007         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
29008         New typedefs.
29009         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
29010         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
29011         or if measurement_type is not polynomial.
29012         * genmodes.c (ZERO_COEFFS): New macro.
29013         (emit_mode_nunits_inline): Make mode_nunits_inline return a
29014         poly_uint16.
29015         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
29016         Use ZERO_COEFFS when emitting initializers.
29017         * data-streamer.h (bp_pack_poly_value): New function.
29018         (bp_unpack_poly_value): Likewise.
29019         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29020         for GET_MODE_NUNITS.
29021         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29022         for GET_MODE_NUNITS.
29023         * tree.c (make_vector_type): Remove temporary shim and make
29024         the real function take the number of units as a poly_uint64
29025         rather than an int.
29026         (build_vector_type_for_mode): Handle polynomial nunits.
29027         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
29028         * emit-rtl.c (const_vec_series_p_1): Likewise.
29029         (gen_rtx_CONST_VECTOR): Likewise.
29030         * fold-const.c (test_vec_duplicate_folding): Likewise.
29031         * genrecog.c (validate_pattern): Likewise.
29032         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
29033         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29034         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
29035         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
29036         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
29037         * rtlanal.c (subreg_get_info): Likewise.
29038         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29039         (vect_grouped_load_supported): Likewise.
29040         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
29041         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
29042         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
29043         (simplify_const_unary_operation, simplify_binary_operation_1)
29044         (simplify_const_binary_operation, simplify_ternary_operation)
29045         (test_vector_ops_duplicate, test_vector_ops): Likewise.
29046         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
29047         instead of CONST_VECTOR_NUNITS.
29048         * varasm.c (output_constant_pool_2): Likewise.
29049         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
29050         explicit-encoded elements in the XVEC for variable-length vectors.
29052 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29054         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
29056 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29057             Alan Hayward  <alan.hayward@arm.com>
29058             David Sherwood  <david.sherwood@arm.com>
29060         * coretypes.h (fixed_size_mode): Declare.
29061         (fixed_size_mode_pod): New typedef.
29062         * builtins.h (target_builtins::x_apply_args_mode)
29063         (target_builtins::x_apply_result_mode): Change type to
29064         fixed_size_mode_pod.
29065         * builtins.c (apply_args_size, apply_result_size, result_vector)
29066         (expand_builtin_apply_args_1, expand_builtin_apply)
29067         (expand_builtin_return): Update accordingly.
29069 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29071         * cse.c (hash_rtx_cb): Hash only the encoded elements.
29072         * cselib.c (cselib_hash_rtx): Likewise.
29073         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
29074         CONST_VECTOR encoding.
29076 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
29077             Jeff Law  <law@redhat.com>
29079         PR target/83641
29080         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
29081         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
29082         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
29083         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
29085         PR target/83641
29086         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
29087         explicitly probe *sp in a noreturn function if there were any callee
29088         register saves or frame pointer is needed.
29090 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
29092         PR debug/83621
29093         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
29094         BLKmode for ternary, binary or unary expressions.
29096         PR debug/83645
29097         * var-tracking.c (delete_vta_debug_insn): New inline function.
29098         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
29099         insns from get_insns () to NULL instead of each bb separately.
29100         Use delete_vta_debug_insn.  No longer static.
29101         (vt_debug_insns_local, variable_tracking_main_1): Adjust
29102         delete_vta_debug_insns callers.
29103         * rtl.h (delete_vta_debug_insns): Declare.
29104         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
29105         instead of variable_tracking_main.
29107 2018-01-03  Martin Sebor  <msebor@redhat.com>
29109         PR tree-optimization/83603
29110         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
29111         arguments past the endof the argument list in functions declared
29112         without a prototype.
29113         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
29114         Avoid checking when arguments are null.
29116 2018-01-03  Martin Sebor  <msebor@redhat.com>
29118         PR c/83559
29119         * doc/extend.texi (attribute const): Fix a typo.
29120         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
29121         issuing -Wsuggest-attribute for void functions.
29123 2018-01-03  Martin Sebor  <msebor@redhat.com>
29125         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
29126         offset_int::from instead of wide_int::to_shwi.
29127         (maybe_diag_overlap): Remove assertion.
29128         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
29129         * gimple-ssa-sprintf.c (format_directive): Same.
29130         (parse_directive): Same.
29131         (sprintf_dom_walker::compute_format_length): Same.
29132         (try_substitute_return_value): Same.
29134 2018-01-03  Jeff Law  <law@redhat.com>
29136         PR middle-end/83654
29137         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
29138         non-constant residual for zero at runtime and avoid probing in
29139         that case.  Reorganize code for trailing problem to mirror handling
29140         of the residual.
29142 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
29144         PR tree-optimization/83501
29145         * tree-ssa-strlen.c (get_string_cst): New.
29146         (handle_char_store): Call get_string_cst.
29148 2018-01-03  Martin Liska  <mliska@suse.cz>
29150         PR tree-optimization/83593
29151         * tree-ssa-strlen.c: Include tree-cfg.h.
29152         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
29153         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
29154         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
29155         to false.
29156         (strlen_dom_walker::before_dom_children): Call
29157         gimple_purge_dead_eh_edges. Dump tranformation with details
29158         dump flags.
29159         (strlen_dom_walker::before_dom_children): Update call by adding
29160         new argument cleanup_eh.
29161         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
29163 2018-01-03  Martin Liska  <mliska@suse.cz>
29165         PR ipa/83549
29166         * cif-code.def (VARIADIC_THUNK): New enum value.
29167         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
29168         thunks.
29170 2018-01-03  Jan Beulich  <jbeulich@suse.com>
29172         * sse.md (mov<mode>_internal): Tighten condition for when to use
29173         vmovdqu<ssescalarsize> for TI and OI modes.
29175 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
29177         Update copyright years.
29179 2018-01-03  Martin Liska  <mliska@suse.cz>
29181         PR ipa/83594
29182         * ipa-visibility.c (function_and_variable_visibility): Skip
29183         functions with noipa attribure.
29185 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
29187         * gcc.c (process_command): Update copyright notice dates.
29188         * gcov-dump.c (print_version): Ditto.
29189         * gcov.c (print_version): Ditto.
29190         * gcov-tool.c (print_version): Ditto.
29191         * gengtype.c (create_file): Ditto.
29192         * doc/cpp.texi: Bump @copying's copyright year.
29193         * doc/cppinternals.texi: Ditto.
29194         * doc/gcc.texi: Ditto.
29195         * doc/gccint.texi: Ditto.
29196         * doc/gcov.texi: Ditto.
29197         * doc/install.texi: Ditto.
29198         * doc/invoke.texi: Ditto.
29200 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29202         * vector-builder.h (vector_builder::m_full_nelts): Change from
29203         unsigned int to poly_uint64.
29204         (vector_builder::full_nelts): Update prototype accordingly.
29205         (vector_builder::new_vector): Likewise.
29206         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
29207         (vector_builder::operator ==): Likewise.
29208         (vector_builder::finalize): Likewise.
29209         * int-vector-builder.h (int_vector_builder::int_vector_builder):
29210         Take the number of elements as a poly_uint64 rather than an
29211         unsigned int.
29212         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
29213         from unsigned int to poly_uint64.
29214         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
29215         (vec_perm_indices::new_vector): Likewise.
29216         (vec_perm_indices::length): Likewise.
29217         (vec_perm_indices::nelts_per_input): Likewise.
29218         (vec_perm_indices::input_nelts): Likewise.
29219         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
29220         number of elements per input as a poly_uint64 rather than an
29221         unsigned int.  Use the original encoding for variable-length
29222         vectors, rather than clamping each individual element.
29223         For the second and subsequent elements in each pattern,
29224         clamp the step and base before clamping their sum.
29225         (vec_perm_indices::series_p): Handle polynomial element counts.
29226         (vec_perm_indices::all_in_range_p): Likewise.
29227         (vec_perm_indices_to_tree): Likewise.
29228         (vec_perm_indices_to_rtx): Likewise.
29229         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
29230         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
29231         (tree_vector_builder::new_binary_operation): Handle polynomial
29232         element counts.  Return false if we need to know the number
29233         of elements at compile time.
29234         * fold-const.c (fold_vec_perm): Punt if the number of elements
29235         isn't known at compile time.
29237 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29239         * vec-perm-indices.h (vec_perm_builder): Change element type
29240         from HOST_WIDE_INT to poly_int64.
29241         (vec_perm_indices::element_type): Update accordingly.
29242         (vec_perm_indices::clamp): Handle polynomial element_types.
29243         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29244         (vec_perm_indices::all_in_range_p): Likewise.
29245         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
29246         than shwi trees.
29247         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
29248         polynomial vec_perm_indices element types.
29249         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
29250         * fold-const.c (fold_vec_perm): Likewise.
29251         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
29252         * tree-vect-generic.c (lower_vec_perm): Likewise.
29253         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29254         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
29255         element type to HOST_WIDE_INT.
29257 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29258             Alan Hayward  <alan.hayward@arm.com>
29259             David Sherwood  <david.sherwood@arm.com>
29261         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
29262         rather than an int.  Use plus_constant.
29263         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
29264         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
29266 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29267             Alan Hayward  <alan.hayward@arm.com>
29268             David Sherwood  <david.sherwood@arm.com>
29270         * calls.c (emit_call_1, expand_call): Change struct_value_size from
29271         a HOST_WIDE_INT to a poly_int64.
29273 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29274             Alan Hayward  <alan.hayward@arm.com>
29275             David Sherwood  <david.sherwood@arm.com>
29277         * calls.c (load_register_parameters): Cope with polynomial
29278         mode sizes.  Require a constant size for BLKmode parameters
29279         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
29280         forces a parameter to be padded at the lsb end in order to
29281         fill a complete number of words, require the parameter size
29282         to be ordered wrt UNITS_PER_WORD.
29284 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29285             Alan Hayward  <alan.hayward@arm.com>
29286             David Sherwood  <david.sherwood@arm.com>
29288         * reload1.c (spill_stack_slot_width): Change element type
29289         from unsigned int to poly_uint64_pod.
29290         (alter_reg): Treat mode sizes as polynomial.
29292 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29293             Alan Hayward  <alan.hayward@arm.com>
29294             David Sherwood  <david.sherwood@arm.com>
29296         * reload.c (complex_word_subreg_p): New function.
29297         (reload_inner_reg_of_subreg, push_reload): Use it.
29299 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29300             Alan Hayward  <alan.hayward@arm.com>
29301             David Sherwood  <david.sherwood@arm.com>
29303         * lra-constraints.c (process_alt_operands): Reject matched
29304         operands whose sizes aren't ordered.
29305         (match_reload): Refer to this check here.
29307 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29308             Alan Hayward  <alan.hayward@arm.com>
29309             David Sherwood  <david.sherwood@arm.com>
29311         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29312         that the mode size is in the set {1, 2, 4, 8, 16}.
29314 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29315             Alan Hayward  <alan.hayward@arm.com>
29316             David Sherwood  <david.sherwood@arm.com>
29318         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29319         Use plus_constant instead of gen_rtx_PLUS.
29321 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29322             Alan Hayward  <alan.hayward@arm.com>
29323             David Sherwood  <david.sherwood@arm.com>
29325         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29326         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29327         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29328         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29329         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29330         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29331         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29332         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29333         * config/i386/i386.c (ix86_push_rounding): ...this new function.
29334         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29335         a poly_int64.
29336         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29337         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29338         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29339         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29340         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29341         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29342         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29343         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29344         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29345         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29346         function.
29347         * expr.c (emit_move_resolve_push): Treat the input and result
29348         of PUSH_ROUNDING as a poly_int64.
29349         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29350         (emit_push_insn): Likewise.
29351         * lra-eliminations.c (mark_not_eliminable): Likewise.
29352         * recog.c (push_operand): Likewise.
29353         * reload1.c (elimination_effects): Likewise.
29354         * rtlanal.c (nonzero_bits1): Likewise.
29355         * calls.c (store_one_arg): Likewise.  Require the padding to be
29356         known at compile time.
29358 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29359             Alan Hayward  <alan.hayward@arm.com>
29360             David Sherwood  <david.sherwood@arm.com>
29362         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29363         Use plus_constant instead of gen_rtx_PLUS.
29365 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29366             Alan Hayward  <alan.hayward@arm.com>
29367             David Sherwood  <david.sherwood@arm.com>
29369         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29370         rather than an int.
29372 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29373             Alan Hayward  <alan.hayward@arm.com>
29374             David Sherwood  <david.sherwood@arm.com>
29376         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29377         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29378         via stack temporaries.  Treat the mode size as polynomial too.
29380 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29381             Alan Hayward  <alan.hayward@arm.com>
29382             David Sherwood  <david.sherwood@arm.com>
29384         * expr.c (expand_expr_real_2): When handling conversions involving
29385         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29386         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
29387         as a poly_uint64 too.
29389 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29390             Alan Hayward  <alan.hayward@arm.com>
29391             David Sherwood  <david.sherwood@arm.com>
29393         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29395 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29396             Alan Hayward  <alan.hayward@arm.com>
29397             David Sherwood  <david.sherwood@arm.com>
29399         * combine.c (can_change_dest_mode): Handle polynomial
29400         REGMODE_NATURAL_SIZE.
29401         * expmed.c (store_bit_field_1): Likewise.
29402         * expr.c (store_constructor): Likewise.
29403         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29404         and polynomial REGMODE_NATURAL_SIZE.
29405         (gen_lowpart_common): Likewise.
29406         * reginfo.c (record_subregs_of_mode): Likewise.
29407         * rtlanal.c (read_modify_subreg_p): Likewise.
29409 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29410             Alan Hayward  <alan.hayward@arm.com>
29411             David Sherwood  <david.sherwood@arm.com>
29413         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29414         numbers of elements.
29416 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29417             Alan Hayward  <alan.hayward@arm.com>
29418             David Sherwood  <david.sherwood@arm.com>
29420         * match.pd: Cope with polynomial numbers of vector elements.
29422 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29423             Alan Hayward  <alan.hayward@arm.com>
29424             David Sherwood  <david.sherwood@arm.com>
29426         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29427         in a POINTER_PLUS_EXPR.
29429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29430             Alan Hayward  <alan.hayward@arm.com>
29431             David Sherwood  <david.sherwood@arm.com>
29433         * omp-simd-clone.c (simd_clone_subparts): New function.
29434         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29435         (ipa_simd_modify_function_body): Likewise.
29437 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29438             Alan Hayward  <alan.hayward@arm.com>
29439             David Sherwood  <david.sherwood@arm.com>
29441         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29442         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29443         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29444         (expand_vector_condition, vector_element): Likewise.
29445         (subparts_gt): New function.
29446         (get_compute_type): Use subparts_gt.
29447         (count_type_subparts): Delete.
29448         (expand_vector_operations_1): Use subparts_gt instead of
29449         count_type_subparts.
29451 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29452             Alan Hayward  <alan.hayward@arm.com>
29453             David Sherwood  <david.sherwood@arm.com>
29455         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29456         (vect_compile_time_alias): ...this new function.  Do the calculation
29457         on poly_ints rather than trees.
29458         (vect_prune_runtime_alias_test_list): Update call accordingly.
29460 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29461             Alan Hayward  <alan.hayward@arm.com>
29462             David Sherwood  <david.sherwood@arm.com>
29464         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29465         numbers of units.
29466         (vect_schedule_slp_instance): Likewise.
29468 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29469             Alan Hayward  <alan.hayward@arm.com>
29470             David Sherwood  <david.sherwood@arm.com>
29472         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29473         constant and extern definitions for variable-length vectors.
29474         (vect_get_constant_vectors): Note that the number of units
29475         is known to be constant.
29477 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29478             Alan Hayward  <alan.hayward@arm.com>
29479             David Sherwood  <david.sherwood@arm.com>
29481         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29482         of units as polynomial.  Choose between WIDE and NARROW based
29483         on multiple_p.
29485 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29486             Alan Hayward  <alan.hayward@arm.com>
29487             David Sherwood  <david.sherwood@arm.com>
29489         * tree-vect-stmts.c (simd_clone_subparts): New function.
29490         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29492 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29493             Alan Hayward  <alan.hayward@arm.com>
29494             David Sherwood  <david.sherwood@arm.com>
29496         * tree-vect-stmts.c (vectorizable_call): Treat the number of
29497         vectors as polynomial.  Use build_index_vector for
29498         IFN_GOMP_SIMD_LANE.
29500 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29501             Alan Hayward  <alan.hayward@arm.com>
29502             David Sherwood  <david.sherwood@arm.com>
29504         * tree-vect-stmts.c (get_load_store_type): Treat the number of
29505         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29506         for variable-length vectors.
29507         (vectorizable_mask_load_store): Treat the number of units as
29508         polynomial, asserting that it is constant if the condition has
29509         already been enforced.
29510         (vectorizable_store, vectorizable_load): Likewise.
29512 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29513             Alan Hayward  <alan.hayward@arm.com>
29514             David Sherwood  <david.sherwood@arm.com>
29516         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29517         of units as polynomial.  Punt if we can't tell at compile time
29518         which vector contains the final result.
29520 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29521             Alan Hayward  <alan.hayward@arm.com>
29522             David Sherwood  <david.sherwood@arm.com>
29524         * tree-vect-loop.c (vectorizable_induction): Treat the number
29525         of units as polynomial.  Punt on SLP inductions.  Use an integer
29526         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
29527         cast of such a series for variable-length floating-point
29528         reductions.
29530 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29531             Alan Hayward  <alan.hayward@arm.com>
29532             David Sherwood  <david.sherwood@arm.com>
29534         * tree.h (build_index_vector): Declare.
29535         * tree.c (build_index_vector): New function.
29536         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29537         of units as polynomial, forcibly converting it to a constant if
29538         vectorizable_reduction has already enforced the condition.
29539         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
29540         to create a {1,2,3,...} vector.
29541         (vectorizable_reduction): Treat the number of units as polynomial.
29542         Choose vectype_in based on the largest scalar element size rather
29543         than the smallest number of units.  Enforce the restrictions
29544         relied on above.
29546 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29547             Alan Hayward  <alan.hayward@arm.com>
29548             David Sherwood  <david.sherwood@arm.com>
29550         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29551         number of units as polynomial.
29553 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29554             Alan Hayward  <alan.hayward@arm.com>
29555             David Sherwood  <david.sherwood@arm.com>
29557         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29558         * target.def (autovectorize_vector_sizes): Return the vector sizes
29559         by pointer, using vector_sizes rather than a bitmask.
29560         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29561         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29562         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29563         Likewise.
29564         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29565         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29566         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29567         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29568         * omp-general.c (omp_max_vf): Likewise.
29569         * omp-low.c (omp_clause_aligned_alignment): Likewise.
29570         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29571         * tree-vect-loop.c (vect_analyze_loop): Likewise.
29572         * tree-vect-slp.c (vect_slp_bb): Likewise.
29573         * doc/tm.texi: Regenerate.
29574         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29575         to a poly_uint64.
29576         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29577         the vector size as a poly_uint64 rather than an unsigned int.
29578         (current_vector_size): Change from an unsigned int to a poly_uint64.
29579         (get_vectype_for_scalar_type): Update accordingly.
29580         * tree.h (build_truth_vector_type): Take the size and number of
29581         units as a poly_uint64 rather than an unsigned int.
29582         (build_vector_type): Add a temporary overload that takes
29583         the number of units as a poly_uint64 rather than an unsigned int.
29584         * tree.c (make_vector_type): Likewise.
29585         (build_truth_vector_type): Take the number of units as a poly_uint64
29586         rather than an unsigned int.
29588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29589             Alan Hayward  <alan.hayward@arm.com>
29590             David Sherwood  <david.sherwood@arm.com>
29592         * target.def (get_mask_mode): Take the number of units and length
29593         as poly_uint64s rather than unsigned ints.
29594         * targhooks.h (default_get_mask_mode): Update accordingly.
29595         * targhooks.c (default_get_mask_mode): Likewise.
29596         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29597         * doc/tm.texi: Regenerate.
29599 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29600             Alan Hayward  <alan.hayward@arm.com>
29601             David Sherwood  <david.sherwood@arm.com>
29603         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29604         * omp-general.c (omp_max_vf): Likewise.
29605         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29606         (expand_omp_simd): Handle polynomial safelen.
29607         * omp-low.c (omplow_simd_context): Add a default constructor.
29608         (omplow_simd_context::max_vf): Change from int to poly_uint64.
29609         (lower_rec_simd_input_clauses): Update accordingly.
29610         (lower_rec_input_clauses): Likewise.
29612 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29613             Alan Hayward  <alan.hayward@arm.com>
29614             David Sherwood  <david.sherwood@arm.com>
29616         * tree-vectorizer.h (vect_nunits_for_cost): New function.
29617         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29618         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29619         (vect_analyze_slp_cost): Likewise.
29620         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29621         (vect_model_load_cost): Likewise.
29623 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29624             Alan Hayward  <alan.hayward@arm.com>
29625             David Sherwood  <david.sherwood@arm.com>
29627         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29628         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29629         from an unsigned int * to a poly_uint64_pod *.
29630         (calculate_unrolling_factor): New function.
29631         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
29633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29634             Alan Hayward  <alan.hayward@arm.com>
29635             David Sherwood  <david.sherwood@arm.com>
29637         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29638         from an unsigned int to a poly_uint64.
29639         (_loop_vec_info::slp_unrolling_factor): Likewise.
29640         (_loop_vec_info::vectorization_factor): Change from an int
29641         to a poly_uint64.
29642         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29643         (vect_get_num_vectors): New function.
29644         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29645         (vect_get_num_copies): Use vect_get_num_vectors.
29646         (vect_analyze_data_ref_dependences): Change max_vf from an int *
29647         to an unsigned int *.
29648         (vect_analyze_data_refs): Change min_vf from an int * to a
29649         poly_uint64 *.
29650         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29651         than an unsigned HOST_WIDE_INT.
29652         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29653         (vect_analyze_data_ref_dependence): Change max_vf from an int *
29654         to an unsigned int *.
29655         (vect_analyze_data_ref_dependences): Likewise.
29656         (vect_compute_data_ref_alignment): Handle polynomial vf.
29657         (vect_enhance_data_refs_alignment): Likewise.
29658         (vect_prune_runtime_alias_test_list): Likewise.
29659         (vect_shift_permute_load_chain): Likewise.
29660         (vect_supportable_dr_alignment): Likewise.
29661         (dependence_distance_ge_vf): Take the vectorization factor as a
29662         poly_uint64 rather than an unsigned HOST_WIDE_INT.
29663         (vect_analyze_data_refs): Change min_vf from an int * to a
29664         poly_uint64 *.
29665         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29666         vfm1 as a poly_uint64 rather than an int.  Make the same change
29667         for the returned bound_scalar.
29668         (vect_gen_vector_loop_niters): Handle polynomial vf.
29669         (vect_do_peeling): Likewise.  Update call to
29670         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29671         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29672         be constant.
29673         * tree-vect-loop.c (vect_determine_vectorization_factor)
29674         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29675         (vect_get_known_peeling_cost): Likewise.
29676         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29677         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29678         (vect_transform_loop): Likewise.  Use the lowest possible VF when
29679         updating the upper bounds of the loop.
29680         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
29681         rather than an int.
29682         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29683         polynomial unroll factors.
29684         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29685         (vect_make_slp_decision): Likewise.
29686         (vect_supported_load_permutation_p): Likewise, and polynomial
29687         vf too.
29688         (vect_analyze_slp_cost): Handle polynomial vf.
29689         (vect_slp_analyze_node_operations): Likewise.
29690         (vect_slp_analyze_bb_1): Likewise.
29691         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29692         than an unsigned HOST_WIDE_INT.
29693         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29694         (vectorizable_load): Handle polynomial vf.
29695         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29696         a poly_uint64.
29697         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29699 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29700             Alan Hayward  <alan.hayward@arm.com>
29701             David Sherwood  <david.sherwood@arm.com>
29703         * match.pd: Handle bit operations involving three constants
29704         and try to fold one pair.
29706 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29708         * tree-vect-loop-manip.c: Include gimple-fold.h.
29709         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29710         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
29711         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29712         Add a path that uses a step of VF instead of 1, but disable it
29713         for now.
29714         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29715         and niters_no_overflow parameters.  Update calls to
29716         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29717         Create a new SSA name if the latter choses to use a ste other
29718         than zero, and return it via niters_vector_mult_vf_var.
29719         * tree-vect-loop.c (vect_transform_loop): Update calls to
29720         vect_do_peeling, vect_gen_vector_loop_niters and
29721         slpeel_make_loop_iterate_ntimes.
29722         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29723         (vect_gen_vector_loop_niters): Update declarations after above changes.
29725 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
29727         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29728         128-bit round to integer instructions.
29729         (ceil<mode>2): Likewise.
29730         (btrunc<mode>2): Likewise.
29731         (round<mode>2): Likewise.
29733 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29735         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29736         unaligned VSX load/store on P8/P9.
29737         (expand_block_clear): Allow the use of unaligned VSX
29738         load/store on P8/P9.
29740 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29742         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29743         New function.
29744         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29745         swap associated with both a load and a store.
29747 2018-01-02  Andrew Waterman  <andrew@sifive.com>
29749         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29750         * config/riscv/riscv.md (clear_cache): Use it.
29752 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
29754         * web.c: Remove out-of-date comment.
29756 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29758         * expr.c (fixup_args_size_notes): Check that any existing
29759         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29760         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29761         (emit_single_push_insn): ...here.
29763 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29765         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29766         (const_vector_encoded_nelts): New function.
29767         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29768         (const_vector_int_elt, const_vector_elt): Declare.
29769         * emit-rtl.c (const_vector_int_elt_1): New function.
29770         (const_vector_elt): Likewise.
29771         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29772         of CONST_VECTOR_ELT.
29774 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29776         * expr.c: Include rtx-vector-builder.h.
29777         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29778         directly on the tree encoding.
29779         (const_vector_from_tree): Likewise.
29780         * optabs.c: Include rtx-vector-builder.h.
29781         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29782         sequence of "u" values.
29783         * vec-perm-indices.c: Include rtx-vector-builder.h.
29784         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29785         directly on the vec_perm_indices encoding.
29787 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29789         * doc/rtl.texi (const_vector): Describe new encoding scheme.
29790         * Makefile.in (OBJS): Add rtx-vector-builder.o.
29791         * rtx-vector-builder.h: New file.
29792         * rtx-vector-builder.c: Likewise.
29793         * rtl.h (rtx_def::u2): Add a const_vector field.
29794         (CONST_VECTOR_NPATTERNS): New macro.
29795         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29796         (CONST_VECTOR_DUPLICATE_P): Likewise.
29797         (CONST_VECTOR_STEPPED_P): Likewise.
29798         (CONST_VECTOR_ENCODED_ELT): Likewise.
29799         (const_vec_duplicate_p): Check for a duplicated vector encoding.
29800         (unwrap_const_vec_duplicate): Likewise.
29801         (const_vec_series_p): Check for a non-duplicated vector encoding.
29802         Say that the function only returns true for integer vectors.
29803         * emit-rtl.c: Include rtx-vector-builder.h.
29804         (gen_const_vec_duplicate_1): Delete.
29805         (gen_const_vector): Call gen_const_vec_duplicate instead of
29806         gen_const_vec_duplicate_1.
29807         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29808         (gen_const_vec_duplicate): Use rtx_vector_builder.
29809         (gen_const_vec_series): Likewise.
29810         (gen_rtx_CONST_VECTOR): Likewise.
29811         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29812         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29813         Build a new vector rather than modifying a CONST_VECTOR in-place.
29814         (handle_special_swappables): Update call accordingly.
29815         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29816         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29817         Build a new vector rather than modifying a CONST_VECTOR in-place.
29818         (handle_special_swappables): Update call accordingly.
29820 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29822         * simplify-rtx.c (simplify_const_binary_operation): Use
29823         CONST_VECTOR_ELT instead of XVECEXP.
29825 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29827         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29828         the selector elements to be different from the data elements
29829         if the selector is a VECTOR_CST.
29830         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29831         ssizetype for the selector.
29833 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29835         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29836         before testing each element individually.
29837         * tree-vect-generic.c (lower_vec_perm): Likewise.
29839 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29841         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29842         * selftest-run-tests.c (selftest::run_tests): Call it.
29843         * vector-builder.h (vector_builder::operator ==): New function.
29844         (vector_builder::operator !=): Likewise.
29845         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29846         (vec_perm_indices::all_from_input_p): New function.
29847         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29848         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29849         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29850         instead of reading the VECTOR_CST directly.  Detect whether both
29851         vector inputs are the same before constructing the vec_perm_indices,
29852         and update the number of inputs argument accordingly.  Use the
29853         utility functions added above.  Only construct sel2 if we need to.
29855 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29857         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29858         the broadcast of the low byte.
29859         (expand_mult_highpart): Use an explicit encoding for the permutes.
29860         * optabs-query.c (can_mult_highpart_p): Likewise.
29861         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29862         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29863         (vectorizable_bswap): Likewise.
29864         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29865         explicit encoding for the power-of-2 permutes.
29866         (vect_permute_store_chain): Likewise.
29867         (vect_grouped_load_supported): Likewise.
29868         (vect_permute_load_chain): Likewise.
29870 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29872         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29873         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29874         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29875         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29876         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29877         (vect_gen_perm_mask_any): Likewise.
29879 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29881         * int-vector-builder.h: New file.
29882         * vec-perm-indices.h: Include int-vector-builder.h.
29883         (vec_perm_indices): Redefine as an int_vector_builder.
29884         (auto_vec_perm_indices): Delete.
29885         (vec_perm_builder): Redefine as a stand-alone class.
29886         (vec_perm_indices::vec_perm_indices): New function.
29887         (vec_perm_indices::clamp): Likewise.
29888         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29889         (vec_perm_indices::new_vector): New function.
29890         (vec_perm_indices::new_expanded_vector): Update for new
29891         vec_perm_indices class.
29892         (vec_perm_indices::rotate_inputs): New function.
29893         (vec_perm_indices::all_in_range_p): Operate directly on the
29894         encoded form, without computing elided elements.
29895         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29896         encoding.  Update for new vec_perm_indices class.
29897         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29898         the given vec_perm_builder.
29899         (expand_vec_perm_var): Update vec_perm_builder constructor.
29900         (expand_mult_highpart): Use vec_perm_builder instead of
29901         auto_vec_perm_indices.
29902         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29903         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
29904         or double series encoding as appropriate.
29905         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29906         vec_perm_indices instead of auto_vec_perm_indices.
29907         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29908         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29909         (vect_permute_store_chain): Likewise.
29910         (vect_grouped_load_supported): Likewise.
29911         (vect_permute_load_chain): Likewise.
29912         (vect_shift_permute_load_chain): Likewise.
29913         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29914         (vect_transform_slp_perm_load): Likewise.
29915         (vect_schedule_slp_instance): Likewise.
29916         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29917         (vectorizable_mask_load_store): Likewise.
29918         (vectorizable_bswap): Likewise.
29919         (vectorizable_store): Likewise.
29920         (vectorizable_load): Likewise.
29921         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29922         vec_perm_indices instead of auto_vec_perm_indices.  Use
29923         tree_to_vec_perm_builder to read the vector from a tree.
29924         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29925         vec_perm_builder instead of a vec_perm_indices.
29926         (have_whole_vector_shift): Use vec_perm_builder and
29927         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
29928         truncation to calc_vec_perm_mask_for_shift.
29929         (vect_create_epilog_for_reduction): Likewise.
29930         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29931         from auto_vec_perm_indices to vec_perm_indices.
29932         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29933         instead of changing individual elements.
29934         (aarch64_vectorize_vec_perm_const): Use new_vector to install
29935         the vector in d.perm.
29936         * config/arm/arm.c (expand_vec_perm_d::perm): Change
29937         from auto_vec_perm_indices to vec_perm_indices.
29938         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29939         instead of changing individual elements.
29940         (arm_vectorize_vec_perm_const): Use new_vector to install
29941         the vector in d.perm.
29942         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29943         Update vec_perm_builder constructor.
29944         (rs6000_expand_interleave): Likewise.
29945         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29946         (rs6000_expand_interleave): Likewise.
29948 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29950         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29951         to qimode could truncate the indices.
29952         * optabs.c (expand_vec_perm_var): Likewise.
29954 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29956         * Makefile.in (OBJS): Add vec-perm-indices.o.
29957         * vec-perm-indices.h: New file.
29958         * vec-perm-indices.c: Likewise.
29959         * target.h (vec_perm_indices): Replace with a forward class
29960         declaration.
29961         (auto_vec_perm_indices): Move to vec-perm-indices.h.
29962         * optabs.h: Include vec-perm-indices.h.
29963         (expand_vec_perm): Delete.
29964         (selector_fits_mode_p, expand_vec_perm_var): Declare.
29965         (expand_vec_perm_const): Declare.
29966         * target.def (vec_perm_const_ok): Replace with...
29967         (vec_perm_const): ...this new hook.
29968         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29969         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29970         * doc/tm.texi: Regenerate.
29971         * optabs.def (vec_perm_const): Delete.
29972         * doc/md.texi (vec_perm_const): Likewise.
29973         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29974         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29975         expand_vec_perm for constant permutation vectors.  Assert that
29976         the mode of variable permutation vectors is the integer equivalent
29977         of the mode that is being permuted.
29978         * optabs-query.h (selector_fits_mode_p): Declare.
29979         * optabs-query.c: Include vec-perm-indices.h.
29980         (selector_fits_mode_p): New function.
29981         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29982         is defined, instead of checking whether the vec_perm_const_optab
29983         exists.  Use targetm.vectorize.vec_perm_const instead of
29984         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
29985         fit in the vector mode before using a variable permute.
29986         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29987         vec_perm_indices instead of an rtx.
29988         (expand_vec_perm): Replace with...
29989         (expand_vec_perm_const): ...this new function.  Take the selector
29990         as a vec_perm_indices rather than an rtx.  Also take the mode of
29991         the selector.  Update call to shift_amt_for_vec_perm_mask.
29992         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29993         Use vec_perm_indices::new_expanded_vector to expand the original
29994         selector into bytes.  Check whether the indices fit in the vector
29995         mode before using a variable permute.
29996         (expand_vec_perm_var): Make global.
29997         (expand_mult_highpart): Use expand_vec_perm_const.
29998         * fold-const.c: Includes vec-perm-indices.h.
29999         * tree-ssa-forwprop.c: Likewise.
30000         * tree-vect-data-refs.c: Likewise.
30001         * tree-vect-generic.c: Likewise.
30002         * tree-vect-loop.c: Likewise.
30003         * tree-vect-slp.c: Likewise.
30004         * tree-vect-stmts.c: Likewise.
30005         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
30006         Delete.
30007         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
30008         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
30009         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
30010         (aarch64_vectorize_vec_perm_const): ...this new function.
30011         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30012         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30013         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
30014         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
30015         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30016         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30017         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
30018         into...
30019         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
30020         check for NEON modes.
30021         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
30022         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
30023         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
30024         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
30025         into...
30026         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
30027         the old VEC_PERM_CONST conditions.
30028         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
30029         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
30030         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
30031         (ia64_vectorize_vec_perm_const_ok): Merge into...
30032         (ia64_vectorize_vec_perm_const): ...this new function.
30033         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
30034         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
30035         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
30036         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
30037         * config/mips/mips.c (mips_expand_vec_perm_const)
30038         (mips_vectorize_vec_perm_const_ok): Merge into...
30039         (mips_vectorize_vec_perm_const): ...this new function.
30040         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
30041         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
30042         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
30043         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
30044         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
30045         (rs6000_expand_vec_perm_const): Delete.
30046         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
30047         Delete.
30048         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30049         (altivec_expand_vec_perm_const_le): Take each operand individually.
30050         Operate on constant selectors rather than rtxes.
30051         (altivec_expand_vec_perm_const): Likewise.  Update call to
30052         altivec_expand_vec_perm_const_le.
30053         (rs6000_expand_vec_perm_const): Delete.
30054         (rs6000_vectorize_vec_perm_const_ok): Delete.
30055         (rs6000_vectorize_vec_perm_const): New function.
30056         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30057         an element count and rtx array.
30058         (rs6000_expand_extract_even): Update call accordingly.
30059         (rs6000_expand_interleave): Likewise.
30060         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
30061         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
30062         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
30063         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
30064         (rs6000_expand_vec_perm_const): Delete.
30065         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30066         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30067         (altivec_expand_vec_perm_const_le): Take each operand individually.
30068         Operate on constant selectors rather than rtxes.
30069         (altivec_expand_vec_perm_const): Likewise.  Update call to
30070         altivec_expand_vec_perm_const_le.
30071         (rs6000_expand_vec_perm_const): Delete.
30072         (rs6000_vectorize_vec_perm_const_ok): Delete.
30073         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
30074         reference to the SPE evmerge intructions.
30075         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30076         an element count and rtx array.
30077         (rs6000_expand_extract_even): Update call accordingly.
30078         (rs6000_expand_interleave): Likewise.
30079         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
30080         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
30081         new function.
30082         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30084 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30086         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
30087         vector mode and that that mode matches the mode of the data
30088         being permuted.
30089         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
30090         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
30091         directly using expand_vec_perm_1 when forcing selectors into
30092         registers.
30093         (expand_vec_perm_var): New function, split out from expand_vec_perm.
30095 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30097         * optabs-query.h (can_vec_perm_p): Delete.
30098         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
30099         * optabs-query.c (can_vec_perm_p): Split into...
30100         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
30101         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
30102         particular selector is valid.
30103         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30104         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30105         (vect_grouped_load_supported): Likewise.
30106         (vect_shift_permute_load_chain): Likewise.
30107         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30108         (vect_transform_slp_perm_load): Likewise.
30109         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30110         (vectorizable_bswap): Likewise.
30111         (vect_gen_perm_mask_checked): Likewise.
30112         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
30113         implementations of variable permutation vectors into account
30114         when deciding which selector to use.
30115         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
30116         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
30117         with a false third argument.
30118         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
30119         to test whether the constant selector is valid and can_vec_perm_var_p
30120         to test whether a variable selector is valid.
30122 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30124         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
30125         * optabs-query.c (can_vec_perm_p): Likewise.
30126         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
30127         instead of vec_perm_indices.
30128         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
30129         (vect_gen_perm_mask_checked): Likewise,
30130         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
30131         (vect_gen_perm_mask_checked): Likewise,
30133 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30135         * optabs-query.h (qimode_for_vec_perm): Declare.
30136         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
30137         (qimode_for_vec_perm): ...this new function.
30138         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
30140 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30142         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
30143         does not have a conditional at the top.
30145 2018-01-02  Richard Biener  <rguenther@suse.de>
30147         * ipa-inline.c (big_speedup_p): Fix expression.
30149 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
30151         PR target/81616
30152         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
30153         for generic 4->6.
30155 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
30157         PR target/81616
30158         Generic tuning.
30159         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
30160         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
30161         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
30162         cond_taken_branch_cost 3->4.
30164 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
30166         PR tree-optimization/83581
30167         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
30168         TODO_cleanup_cfg if any changes have been made.
30170         PR middle-end/83608
30171         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
30172         convert_modes if target mode has the right side, but different mode
30173         class.
30175         PR middle-end/83609
30176         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
30177         last argument when extracting from CONCAT.  If either from_real or
30178         from_imag is NULL, use expansion through memory.  If result is not
30179         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
30180         the parts directly to inner mode, if even that fails, use expansion
30181         through memory.
30183         PR middle-end/83623
30184         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
30185         check for bswap in mode rather than HImode and use that in expand_unop
30186         too.
30188 Copyright (C) 2018 Free Software Foundation, Inc.
30190 Copying and distribution of this file, with or without modification,
30191 are permitted in any medium without royalty provided the copyright
30192 notice and this notice are preserved.